Nextdoor / ndserviceregistry

Nextdoor ServiceRegistry Foundational Python Class
27 stars 12 forks source link

Add pep8, pyflakes, unit and integration tests to setup.py #26

Closed diranged closed 10 years ago

diranged commented 10 years ago

Bump nd_service_registry to 0.3.0a1. Adds the following cleanup items:

  1. Pep8, Pyflakes, Unit and Integration Tests to setup.py
  2. Documentation cleanup
  3. Make TravisCI execute pep8, pyflakes and unit tests through setup.py
  4. Document how to use Vagrant to run integration tests
diranged commented 10 years ago

The pep8/pyflakes requirements are put into requirements.test.txt in https://github.com/diranged/ndserviceregistry/commit/2a6772d9eae5054772f4015f75f5782fc3257fbd

mrterry commented 10 years ago

looks good to me.

diranged commented 10 years ago

Last bugfix.. this fixes the final package so its actually installable.

Matts-MacBook-Pro:ndserviceregistry-diranged diranged$ python setup.py clean sdist
running clean
running sdist
running check
reading manifest template 'MANIFEST.in'
warning: no files found matching '*' under directory 'extras'
writing manifest file 'MANIFEST'
creating nd_service_registry-0.3.0a1
creating nd_service_registry-0.3.0a1/nd_service_registry
creating nd_service_registry-0.3.0a1/nd_service_registry/bin
creating nd_service_registry-0.3.0a1/nd_service_registry/bin/ndsr
making hard links in nd_service_registry-0.3.0a1...
hard linking README -> nd_service_registry-0.3.0a1
hard linking README.rst -> nd_service_registry-0.3.0a1
hard linking requirements.test.txt -> nd_service_registry-0.3.0a1
hard linking requirements.txt -> nd_service_registry-0.3.0a1
hard linking setup.py -> nd_service_registry-0.3.0a1
hard linking nd_service_registry/__init__.py -> nd_service_registry-0.3.0a1/nd_service_registry
hard linking nd_service_registry/exceptions.py -> nd_service_registry-0.3.0a1/nd_service_registry
hard linking nd_service_registry/funcs.py -> nd_service_registry-0.3.0a1/nd_service_registry
hard linking nd_service_registry/funcs_tests.py -> nd_service_registry-0.3.0a1/nd_service_registry
hard linking nd_service_registry/lock.py -> nd_service_registry-0.3.0a1/nd_service_registry
hard linking nd_service_registry/lock_integration.py -> nd_service_registry-0.3.0a1/nd_service_registry
hard linking nd_service_registry/registration.py -> nd_service_registry-0.3.0a1/nd_service_registry
hard linking nd_service_registry/shims.py -> nd_service_registry-0.3.0a1/nd_service_registry
hard linking nd_service_registry/version.py -> nd_service_registry-0.3.0a1/nd_service_registry
hard linking nd_service_registry/watcher.py -> nd_service_registry-0.3.0a1/nd_service_registry
hard linking nd_service_registry/bin/__init__.py -> nd_service_registry-0.3.0a1/nd_service_registry/bin
hard linking nd_service_registry/bin/ndsr/__init__.py -> nd_service_registry-0.3.0a1/nd_service_registry/bin/ndsr
hard linking nd_service_registry/bin/ndsr/get.py -> nd_service_registry-0.3.0a1/nd_service_registry/bin/ndsr
hard linking nd_service_registry/bin/ndsr/get_tests.py -> nd_service_registry-0.3.0a1/nd_service_registry/bin/ndsr
hard linking nd_service_registry/bin/ndsr/ndsr.py -> nd_service_registry-0.3.0a1/nd_service_registry/bin/ndsr
creating dist
Creating tar archive
removing 'nd_service_registry-0.3.0a1' (and everything under it)

Matts-MacBook-Pro:ndserviceregistry-diranged diranged$ sudo pip install dist/nd_service_registry-0.3.0a1.tar.gz
Unpacking ./dist/nd_service_registry-0.3.0a1.tar.gz
  Running setup.py egg_info for package from file:///Users/diranged/git/ndserviceregistry-diranged/dist/nd_service_registry-0.3.0a1.tar.gz

Requirement already satisfied (use --upgrade to upgrade): kazoo>=1.1 in /Library/Python/2.7/site-packages (from nd-service-registry==0.3.0a1)
Requirement already satisfied (use --upgrade to upgrade): setuptools in /Library/Python/2.7/site-packages/setuptools-1.4.1-py2.7.egg (from nd-service-registry==0.3.0a1)
Requirement already satisfied (use --upgrade to upgrade): python-gflags in /Users/diranged/Library/Python/2.7/lib/python/site-packages (from nd-service-registry==0.3.0a1)
Requirement already satisfied (use --upgrade to upgrade): pyyaml in /Library/Python/2.7/site-packages (from nd-service-registry==0.3.0a1)
Requirement already satisfied (use --upgrade to upgrade): zope.interface>=3.8.0 in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from kazoo>=1.1->nd-service-registry==0.3.0a1)
Installing collected packages: nd-service-registry
  Running setup.py install for nd-service-registry

    Installing ndsr script to /usr/local/bin
Successfully installed nd-service-registry
Cleaning up...

Matts-MacBook-Pro:ndserviceregistry-diranged diranged$ ndsr
2013-12-01 10:05:24,666 - nd_service_registry.bin.ndsr.ndsr - INFO - Connecting to server localhost:2181
2013-12-01 10:05:24,666 - nd_service_registry - INFO - Initializing ServiceRegistry object
2013-12-01 10:05:24,666 - nd_service_registry - INFO - Connecting to Zookeeper Service (localhost:2181)
2013-12-01 10:05:24,668 - kazoo.client - WARNING - Connection dropped: socket connection error: Connection refused
2013-12-01 10:05:25,476 - kazoo.client - WARNING - Connection dropped: socket connection error: Connection refused