Skip to content

Latest commit

 

History

History
105 lines (63 loc) · 1.72 KB

CONTRIBUTING.md

File metadata and controls

105 lines (63 loc) · 1.72 KB

Contributing

Testing

Tests are run using tox and/or pytest.

tox -e py37

or directly:

pytest

Code Style

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

Building docs

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

Making a release

Setup

  • 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

Release

  1. Test

     tox
    
  2. Build

     python setup.py sdist bdist_wheel
    
  3. Tag

     git tag -s -a v0.1.0
    
  4. Run checks

     twine check dist/*
     git verify-tag v0.1.0
    
  5. Push to testing

     twine upload --repository testpypi -s --identity 780796DF dist/*
    
  6. Push!

     git push
     git push --tags
     twine upload -s --identity 780796DF dist/*
    
  7. Bump version number