Skip to content

Comments

Code cleanup#5

Merged
hubot merged 16 commits intomasterfrom
code-cleanup
Dec 2, 2016
Merged

Code cleanup#5
hubot merged 16 commits intomasterfrom
code-cleanup

Conversation

@pombredanne
Copy link
Member

@pombredanne pombredanne commented Dec 1, 2016

This PR has a number of code cleanup and starts by merging the PR #1 from @sschuberth
The main changes are about using absolute imports, normalizing header comments and some formatting (and eventually a relaxed formatting for long lines to promote code readability over PEP8 strictly). Of note is that nose is no longer a hard dependency for tests and the tests run equally well with py.test (and much faster with py.test)

sschuberth and others added 15 commits November 23, 2016 15:10
This way dependencies can be easily installed via "python setup.py
develop".
Examples should be the code examples.
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
 * remove nose dep by vendoring the snippets needed
 * use unittest instead

Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
 * use absolute imports and print function
 * correct minor errors
 * relax PEP8 line length for readability
 * do not override standard functions and exception
   names
 * update header comments
 * set spdx as a pkg_resources namespace for #2
 

Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License. No newline at end of file
__import__('pkg_resources').declare_namespace(__name__)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that this makes spdx a "namespace" .... this is provisional and to eventually avoid conflicts with other packages published on Pypi that already use the spdx namespace.

@pombredanne pombredanne mentioned this pull request Dec 1, 2016
Copy link
Member

@sschuberth sschuberth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commit efb342c should probably then remove the "dev-requirements.txt" file altogether.

 * use a standard unittest test runner available with
   python setup.py test
 * remove nose dependency. The test can still run alright with nose
   or pytest
 * update README.md with test instructiosna and improve README

Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
@pombredanne
Copy link
Member Author

@sschuberth Thanks! I pushed a new commit at http://git.spdx.org/?p=spdx-tools-python.git;a=commit;h=2be174cee7a6a8d3b84db85da986c09f75b4d755 to remove the nose dependency altogether and add support to run the plain python setup.py test

Eventually it may get mirrored here

@pombredanne
Copy link
Member Author

Yeah. Sounds like the sync does not take three days anymore. Any way the word @ the SPDX mailing list is that we are moving it all to Github alright!

@pombredanne
Copy link
Member Author

@neverpanic any feedback? or shall I merge?

@neverpanic
Copy link
Contributor

@pombredanne Feel free to merge, we'll rebase on top of your changes.

@pombredanne
Copy link
Member Author

@neverpanic thanks and sorry if that makes the rebasing a tad engaged !

@hubot hubot merged commit 2be174c into master Dec 2, 2016
@neverpanic
Copy link
Contributor

No problem at all, I'm sure we'll manage :)

@sschuberth sschuberth deleted the code-cleanup branch February 27, 2017 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants