|
| 1 | +# Developer Documentation |
| 2 | +This file primarily contains useful information for developers of `ScalaFunctional` |
| 3 | + |
| 4 | +## Release Process |
| 5 | +For every release, the following process is used. |
| 6 | + |
| 7 | +1. From the project directory, run `./run-tests.sh` to insure unit tests pass (on python 2 and 3), |
| 8 | +and that pylint succeeds |
| 9 | +2. Push commit which is the candidate release to Github master |
| 10 | +3. Wait for tests to pass on [TravisCI](https://travis-ci.org/EntilZha/ScalaFunctional) |
| 11 | +4. Wait for coverage to complete at 100% on [Coveralls](https://coveralls.io/github/EntilZha/ScalaFunctional) |
| 12 | +5. Wait for docs to complete building successfully at [scalafunctional.readthedocs.org/en/latest](http://scalafunctional.readthedocs.org/en/latest/) |
| 13 | +6. Create an empty `virtualenv` by running `virtualenv env_directory` and activate it by running |
| 14 | +`source env_directory/bin/activate` |
| 15 | +7. Install `ScalaFunctional` into the virtualenv by running `python setup.py install` |
| 16 | +8. Run a python terminal session and insure that `import functional` returns with no errors |
| 17 | +9. Deactivate the `virtualenv` by running `deactivate` |
| 18 | +10. Repeat steps 6-9 but instead use a python3 interpreter |
| 19 | +11. Build the source distribution using `python setup.py sdist` |
| 20 | +12. Build the wheel distribution using `python bdist_wheel` |
| 21 | +13. Assuming a `.pypirc` file like below, double check that `dist/` has the source and wheel |
| 22 | +distributions |
| 23 | +14. Run `twine upload -r test dist/*` to upload `ScalaFunctional` to the test PyPi server |
| 24 | +15. Browse to the [pypi test server](testpypi.python.org) and insure the webpage looks correct and |
| 25 | +that the upload was done correctly. |
| 26 | +16. Create a new `virtualenv` and install the package using `pip install -i https://testpypi.python.org/pypi scalafunctional`. |
| 27 | +Test that the install completes correctly and that `functional` is importable. This may require |
| 28 | +installing dependencies from regular `pip` which are not on the test servers like `future`, `six`, |
| 29 | +and `enum34` if running python 2. |
| 30 | +17. Repeat step 16 using python 3. |
| 31 | +18. If all these steps run, than the candidate release commit will become the new release which |
| 32 | +means uploading to live pypi and tagging the commit as a release |
| 33 | +19. Run `twine upload -r pypi dist/*` to publish `ScalaFunctional` to the live PyPi server. |
| 34 | +20. Repeat steps 16 and 17 using the live pip repositories |
| 35 | +21. Tag the release on git with `git tag -a vX.X.X`. Then run `git push` and `git push --tags` |
| 36 | +22. On Github, create/edit the release page to match the changelog and add discussion |
| 37 | +23. Celebrate! |
| 38 | + |
| 39 | + |
| 40 | +### `.pypirc` file |
| 41 | +```bash |
| 42 | +[distutils] |
| 43 | +index-servers = |
| 44 | + pypi |
| 45 | + test |
| 46 | + |
| 47 | +[pypi] |
| 48 | +repository: https://pypi.python.org/pypi |
| 49 | + |
| 50 | +[test] |
| 51 | +repository: https://testpypi.python.org/pypi |
| 52 | +``` |
0 commit comments