Tests are run using tox and/or pytest.
tox -e py37
or directly:
pytest
Code conforms to the black
and PEP8 style guides. Before checking in code, please run the linters:
black .
flake8
pylint rcsbsearchapi
These are tested by the 'lint' tox environment:
tox -e lint
Docs are written in the MyST superset of markdown. Google style docstrings are preferred for API documentation.
Building with tox:
tox -e docs
Building manually:
cd docs
make html
For live updates, you can also install the sphinx-autobuild
tool (pip or conda)
pip install sphinx-autobuild
cd docs
make livehtml
Which runs:
sphinx-autobuild -z rcsbsearchapi docs docs/_build/html
-
Set up GPG key (for signing the tag)
-
pip install twine
-
Generate API token at TestPyPI and PyPI and add to .pypirc:
[distutils] index-servers= pypi testpypi [pypi] username = token password = pypi-... [testpypi] repository: https://test.pypi.org/legacy/ username = token password = pypi-...
-
chmod 600 ~/.pypirc
-
Test
tox
-
Build
python setup.py sdist bdist_wheel
-
Tag
git tag -s -a v0.1.0
-
Run checks
twine check dist/* git verify-tag v0.1.0
-
Push to testing
twine upload --repository testpypi -s --identity 780796DF dist/*
-
Push!
git push git push --tags twine upload -s --identity 780796DF dist/*
-
Bump version number