Development¶
Download source code from Github.
$ git clone https://github.com/wateraccounting/IHEWAcollect.git
$ cd IHEWAcollect
In the PyCharm IDE, change “Project Structure -> Source Folders” to “src”
From the root of the project
$ python setup.py --version
Format scripts by PEP8
$ autopep8 --in-place --aggressive src/IHEWAcollect/base/base.py
Flake8, pre-commit
$ pre-commit install
$ pre-commit run --all-files
[INFO] Initializing environment for git://github.com/pre-commit/pre-commit-hooks.
[INFO] Initializing environment for https://github.com/pre-commit/mirrors-isort.
[INFO] Installing environment for git://github.com/pre-commit/pre-commit-hooks.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://github.com/pre-commit/mirrors-isort.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
Unit test
$ python setup.py test
Read the Docs
$ python setup.py doctest
$ python setup.py docs
Upload to PyPI
In IDE, commit the changes “v0.0.1”
In IDE, Version Control -> Log, select this commit
In IDE, add version tag, select VCS -> Git -> tag
In IDE, Tag window -> Tag Name, type “v0.0.1”
In cmd, build package, type
python setup.py sdist bdist_wheel
In cmd, validate build, type
twine check dist/IHEWAcollect-0.0.1*
In cmd, upload build, type
twine upload dist/IHEWAcollect-0.0.1*
In IDE, push the commit, with Tag label: “HEAD”, “master”, “v0.0.1”
In Github, select Release to “create a new release” or “Draft a new release”
In Github, Tag version, type “v0.0.1”
In Github, @ Target, select this commit
In Github, Publish release