Local Development
Checklist before publishing the package
- Install
pip install twine --dev
- Make sure to update
REQUIRED
andEXTRAS
lists insetup.py
based on what's required by the library and what's required only for development. To ease local development, we will continue to maintainrequirements.txt
which includes every package. - Bump the version constant
VERSION
insetup.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-branch
branchgit checkout docs-branch
- Only difference between
master
anddocs-branch
is that thesite/
is not gitignored indocs-branch
- Merge
master
intodocs-branch
git 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-branch
git add site/
git commit
git push origin docs-branch --force
- Run this nested git command to publish the changes in
gh-pages
branch (which serves the static html)
git push origin `git subtree split --prefix site docs-branch`:gh-pages --force