This README-dev is intended for maintainers of the repository for information on releases, standards, and anything that isn't pertinent to the wider community.
The PyPi package is kept under the Las Cumbres Observatory PyPi account. The dev and main branches are deployed automatically by TravisCI upon tagging either branch.
In order to trigger a PyPi deployment of either dev or main, the branch must be given an annotated tag that matches the correct version format. The version formats are as follows:
Dev | Main | All other branches | |
---|---|---|---|
Tagged | Push to PyPi | Push to PyPi | No effect |
Not tagged | No effect | No effect | No effect |
Tagged branches must follow the semantic versioning syntax. Tagged versions will not be deployed unless they match the validation regex. The version format is as follows:
Dev | Main | |
---|---|---|
x.y.z-alpha.w | x.y.z |
Following deployment of a release, a Github Release is created, and this should be filled in with the relevant release notes.
This section of this document is a work-in-progress
-
Meet pre-deployment criteria.
- Includes appropriate release notes, including breaking changes, in
releasenotes.md
. - Pass Codacy code quality check.
- Doesn't decrease Coveralls test coverage.
- Passes Travis tests and code style check.
- Successfully builds ReadTheDocs documentation (not an automated check) (TODO: fix webhook).
- One review approval by a repository owner.
- Includes appropriate release notes, including breaking changes, in
-
Merge your feature branch into the
dev
branchgit checkout dev
git merge feature/your_feature_branch
-
Tag the release, triggering GitHub and PyPI actions:
Release tags must follow semantic versioning syntax.
git tag -a x.y.z-alpha.w -m "x.y.z-alpha.w"
git push --tags
- Pushing the tags causes Travis to create a draft release in GitHub and push to PyPI
-
Deploy
tom-demo-dev
with new features demonstrated, pullingtomtoolkit==x.y.z-alpha.w
from PyPI.Examples:
- Release of observation templates should include saving an observation template and submitting an observation via the observation_template
- Release of manual facility interface should include an implementation of the new interface
- Release of a new template tag should include that template tag in a template
-
Edit the Release Notes in GitHub
When the tags were pushed above, GitHub created draft Release Notes which need to be filled out. (These can be found by following the
releases
link on the front page of the repo. Or, here).Edit, Update, and repeat until satisfied. Release notes should contain (as needed):
- Links to Read the Docs API (docstring) docs
- Links to Read the Docs higher level docs
- Link to Tom Demo feature demonstration
- Links to issues that have been fixed
-
Publish the Release
When satisfied with the Release Notes,
Publish Release
. Repo watchers are notified by email.
The public release deployment workflow parallels the pre-release deployment work flow and more details for a particular step may be found above.
-
Create PR:
main <- dev
-
Meet pre-deployment criteria.
- Include docstrings for any new or updated methods
- Include tutorial documentation for any new major features as needed
- Pass Codacy code quality check.
- Doesn't decrease Coveralls test coverage.
- Passes Travis tests and code style check.
- Successfully builds ReadTheDocs documentation (not an automated check) (TODO: fix webhook).
-
Merge PR
- Must be a repository owner to merge.
-
Tag the release, triggering GitHub and PyPI actions:
git tag -a x.y.z -m "Release x.y.z"
-- must follow semantic versioninggit push --tags
Triggers Travis to:- build, build
- push release to PyPI
- create GitHub draft release
-
deploy
tom-demo
with new features demonstrated, pullingtomtoolkit==x.y.z
from PyPI -
Update Release Notes in GitHub draft release.
This should be the accumulation of the all the dev-release release notes: For example, release notes for releases x.y.z-alpha.1, x.y.z-alpha.2, etc. should be combined into release notes for release x.y.z.
-
Publish Release
-
Post notification to Slack, Tom Toolkit workspace, #general channel. (In the future, we hope to have automated release notification to a dedicated #releases slack channel).
cd /path/to/tom_base/docs
pip install -r requirements.txt # make sure sphinx is installed to your venv
make html # make clean first, if things are weird
- point a browser to the html files in
./_build/html/
to proof read before deployment
pip install pycodestyle
pycodestyle tom_* --exclude=*/migrations/* --max-line-length=120
-
./manage.py test
-
Examples for running specific tests or test suites:
./manage.py test tom_targets.tests
./manage.py test tom_targets.tests.tests.TestTargetDetail
./manage.py test tom_targets.tests.tests.TestTargetDetail.test_sidereal_target_detail