Developing / Testing¶
Getting Set Up¶
First, get your Python environment set up:
mkvirtualenv datasheets
pip install -e . -r requirements-dev.txt
Various testing functionality exists:
make test
- Run tests for both Python 2 and 3pytest
- Run tests for whichever Python version is in your virtualenvmake coverage
- Check code coverage
Manual tests also exist in the tests/manual_testing.ipynb
Jupyter Notebook. To run the manual
tests, install Jupyter Notebook (pip install jupyter notebook
), then run jupyter notebook
,
open the file in the browser, and execute each cell.
Releasing A New Version¶
If you make a PR that gets merged into master, a new version of datasheets can be created as follows.
Increment the
__version__
in thedatasheets/__init__.py
file and commit that change.Push a new git tag to the repo by doing:
- Write the tag message in a dummy file called
tag_message
. We do this to allow multi-line tag messages git tag x.x.x -F tag_message
git push --tags origin master
- Write the tag message in a dummy file called
Run
make release_pypitest
to test that you can release to pypi.Run
make release_pypi
to actually push the release to pypi.