-
Notifications
You must be signed in to change notification settings - Fork 175
Project Management docs
- Distribution channels
- GitHub Wiki management
- Installing multiple Python versions
- Goodreads
- Releasing
AUR (ArchLinux)
The Wiki is handled as a Git submodule of the project.
The submodule is "mounted" under the '/wiki' folder.
These are the instructions to setup the submodule:
$ cd <PYOWM-root>
$ git submodule add https://github.com/csparpa/pyowm.wiki.git wiki
$ git submodule init
Clone the wiki as a submodule by running: git submodule update --init
On Ubuntu:
$ sudo apt-add-repository ppa:deadsnakes/ppa
$ sudo apt-get update
$ sudo apt-get install python3.2 python 3.3
- Jeff Knupp on open sourcing a Python project the right way
- Guide on setuptools
- Setup.py constant values reference
- CODE
- update version on constants.py
- update setup.py and Pipfile
- update city ID files with:
cd scripts & python generate_city_id_files.py ../pyowm/weatherapi25/cityids
- then check outputs --> and don't forget to gzip them! - update README.md
- update technical docs in
docs
folder - run unit tests with:
tox
- run integration tests
- generate documentation locally with:
cd scripts & bash generate_sphinx_docx.sh
- then fix any warnings/errors - push dump commit
- GITHUB
- new pull request: merge develop branch into master branch
- close milestone on GitHub
- update GitHub Wiki pages
- update CHANGELOG
- update DEPRECATIONS
- tag release on GitHub
- DISTRIBUTION
- generate new Docker image with:
cd scripts & bash generate_docker_image.sh <x.y.z>
- push Docker image to DockerHub with:
cd scripts & bash publish_to_dockerhub.sh <x.y.z>
- generate pypi distributions with:
cd scripts & bash generate_pypi_dist.sh
- upload release on pypi:
cd scripts & bash publish_to_pypi.sh
- test locally that installation via pip works:
bash tests/installation_test.sh
- RELATED PROJECTS
- check for domain entities changes and update Django models on django-pyowm
Use a virtualenv:
$ cd && virtualenv pipfilelocker
$ source pipfilelocker/bin/activate
$ pip install pipenv
$ cd <path-to-pyowm-folder>
$ pipenv lock
$ deactivate # deactivate venv
$ cd && rm -rf pipfilelocker # remove venv
First install Sphinx:
$> easy_install sphinx
Then setup the docs folder: move to the main project folder and launch
$> mkdir sphinx
$> sphinx-apidoc -A "<authorname>" -F -o sphinx pyowm/
Sphinx will create its configuration stuff under the sphinx/ subfolder Modify the sphinx/conf.py file by adding/uncommenting this line:
sys.path.insert(0, os.path.abspath('..'))
Now you are ready to generate HTML docs by launching:
$> cd sphinx/
$> make html
HTML docs will be generated under sphinx/_build/html
cd scripts
python generate_city_id_files.py
python2.7 setup.py sdist --format=zip # source dist
python2.7 setup.py bdist_egg # py27 egg
python3.2 setup.py bdist_egg # py32 egg
python3.3 setup.py bdist_egg # py33 egg
python3.4 setup.py bdist_egg # py34 egg
python3.5 setup.py bdist_egg # py35 egg
python3.6 setup.py bdist_egg # py36 egg
twine upload dist/* # upload to pypi
The following commands are to be issued using a specific Python interpreter (eg: if you launch them using Python 3.3 it will result in 3.3-compatible artifacts (.zip with sources, .egg and win installer) being uploaded to the Cheesehop. Enter the main project directory and issue:
$> <path-to-python-interpreter> setup.py sdist register upload # Raw source dist
$> <path-to-python-interpreter> setup.py bdist_egg upload # Eggball
$> <path-to-python-interpreter> setup.py bdist_wininst upload # Windows .exe installer
If you don't want artifacts to be uploaded but just be created locally, omit the upload
switch.
Some references: