Local Development
Checklist before publishing the package
- Install
pip install twine --dev - Make sure to update
REQUIREDandEXTRASlists insetup.pybased on what's required by the library and what's required only for development. To ease local development, we will continue to maintainrequirements.txtwhich includes every package. - Bump the version constant
VERSIONinsetup.py - Commit the version bump change in setup.py (It is okay to not push, but commit is required)
- Run setup test
python setup.py test
- Publish package to PyPI
python setup.py upload
- Enter PyPi credentials (note: you must be added to the project as a maintainer)
Generating Documentation
-
Generate on local for testing
portray server
-
Publishing the docs to https://localcoinswap.github.io/substrate-utils/
- Please make sure the docs look as expected on local
- Checkout to
docs-branchbranchgit checkout docs-branch- Only difference between
masteranddocs-branchis that thesite/is not gitignored indocs-branch
- Merge
masterintodocs-branchgit merge master- Add the merge commit
- Run
portray as_html --overwrite(Read portray docs to know more) - That will generate html docs in
site/directory, it will overwrite the existing content - Commit the changes and push to
docs-branchgit add site/git commitgit push origin docs-branch --force
- Run this nested git command to publish the changes in
gh-pagesbranch (which serves the static html)
git push origin `git subtree split --prefix site docs-branch`:gh-pages --force