Setuptools#9
Closed
earthgecko wants to merge 3 commits into
Closed
Conversation
added 3 commits
June 17, 2014 18:15
This rather longish commit provides a complete build infrastructure based on setuptools that allows to install skyline like any other python application. For setuptools to work correctly, a few fundamental changes had to be made apart from minor fixes. The most fundamental changes are: * Inside the src directory a dedicated skyline folder / package has been created to ensure that the skyline classes do not interfere with other python packages. * The python scripts called by the bash scripts that encapsulate the real functionality of skyline are now generated by setuptools. For this to work the scripts had to be converted to real modules, which means that a dash in the name was not acceptable. In case anyone has used these scripts directly, the name has now changed. It might be possible to restore the behavior by adding symlinks or small bash wrapper scripts inside the src tree, but this isn't done so far. The general bash scripts in bin reflect the changed names. * The settings.py.example has been renamed to settings.py so that setuptools can directly execute the unit tests without requiring user interaction. In the future, providing a settings.py with defaults that do not require any user interaction, might make skyline completely usable out of the box. In detail, the following changes have been made: * .gitignore: added stuff generated by setuptools, removed settings.py, which is now part of the distribution so that unit tests can execute without user interaction * .travis.yml: updated to new build system. Unit tests now executed through setup.py. Calling nose is still posible, though * MANIFEST.in: added a setuptools manifest to package the static files for the webapp * bin/*.d: updated to new script names for in-source use. Moreover, an if-else branch was added to decided whether the scripts should call the python files directly when called inside the source tree, or the generated setuptools wrapper scripts in case of a real installation * setup.cfg: contains settings for running the nose tests from within setuptools by calling python setup.py test * setup.py: The real build system logic. Some values are quite empty still, since I do not know the correct contents. Please updated accordingly. * src: moved all files to skyline package, made every folder a python package by adding an __ini__.py file to be discoverable by setuptools. * src/*/*-agent.py: renamed to agent.py to have a python module name so that setuptools can use these modules as entry point for console scripts. Moreover, executed script contents were moved to a run function which is then callable as a setuptools entry point. Module main functionality has been preserved by calling the run function inside the main block. Several smaller content changes had to be made to preserve the functionality after these changes. * src/*.py, tests/*.py: Manual changes to the pythonpath have been removed since with a real package structure, everything is now done automatically by python and for testing by the setuptools nose integration. * webapp.py: added a route to server anomalies.json from any configured location to /anomalies.json. This is necessary, since users should not modify the contents of the installed python egg just to push the updated anomaly detections to a path that is served by the webserver. * skyline.js: Fetch anomalies from /anomalies.json as described above. This enables the user to specify any location he wants for the generated json file. * horizon/listen.py: Explicitly added the StringIO import. No idea how this could work before. * utils/*.py: Updated imports to reflect new package structure
Oops, seems I missed this change for the initial commit.
Owner
Author
|
This has been superseded by the crucible branch. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Merge @languitar changes for setuptools and more pythonic structure that was submitted as:
Provide a setuptools-based build infrastructure #93 - etsy/skyline#91