Make sure that you have the repository installed.
To install all requirements for the development setup, execute
pip install --upgrade -r requirements.txt -r test-requirements.txt -r dev-requirements.txt
Sphinx Documentation Setup¶
With Notepad++ under Windows, you can run the make_html.bat file in the
docs directory to create the documentation and show undocumented code.
To install the code climate command line interface (cli), read about it in their github repository You need docker to be installed. Under Linux you can execute this in the Terminal to install docker:
wget -qO- https://get.docker.com/ | sh sudo usermod -aG docker $USER
Then, log in and out. Then, you can install the command line interface:
wget -qO- https://github.com/codeclimate/codeclimate/archive/master.tar.gz | tar xvz cd codeclimate-* && sudo make install
Then, go to the ObservableList repository and analyze it.
After installation you can run
pip install -r requirements.in -r test-requirements.in -r dev-requirements.in pip-compile --output-file requirements.txt requirements.in pip-compile --output-file test-requirements.txt test-requirements.in pip-compile --output-file dev-requirements.txt dev-requirements.in pip-sync requirements.txt dev-requirements.txt test-requirements.txt pip install --upgrade -r requirements.txt -r test-requirements.txt -r dev-requirements.txt
pip-sync uninstalls every package you do not need and
writes the fix package versions to the requirements files.
Continuous Integration to Pypi¶
Before you put something on Pypi, ensure the following:
- The version is in the master branch on github.
- The tests run by travis-ci run successfully.
Pypi is automatically deployed by travis. See here. To upload new versions, tag them with git and push them.
Manual Upload to the Python Package Index¶
However, here you can see how to upload this package manually.
Throughout this chapter,
<new_version> refers to a a string of the form
<STEP> represent numbers and
<MATURITY> can be a letter to indicate how mature the release is.
- Create a new branch for the version.
git checkout -b <new_version>
- Increase the
- no letter at the end means release
bin the end means Beta
ain the end means Alpha
- Commit and upload this version.
git add ObservableList/__init__.py git commit -m "version <new_version>" git push origin <new_version>
- Create a pull-request.
- Wait for travis-ci to pass the tests.
- Merge the pull-request.
- Checkout the master branch and pull the changes from the commit.
git checkout master git pull
- Tag the version at the master branch with a
vin the beginning and push it to github.
git tag v<new_version> git push origin v<new_version>
- Upload the code to Pypi.