- Make sure you follow PEP 008 style guide conventions.
- Commit messages should start with a capital letter ("Updated models", not "updated models").
- Write new tests and run old tests! Make sure that % test coverage does not decrease.
Pre-release
- create branch off of master named
feature/<examplefeature>
orbugfix/<>
and make desired changes. - edit CHANGELOG.md with changes under a new section called
Development
- create, review, and merge PR for feature/examplefeature
- repeat steps 1-3 if desired for other features as convenient, though preference is for frequent version bumps
Releasing
- make a new branch called release/vX.X.X
- bump version - edit
__version__.py
with the new version - Rename
Development
section with the new version in CHANGELOG.md - commit changes
- create a tag called vX.X.X on release/vX.X.X branch
- push tag and branch
- submit to pypi with
pipenv run python setup.py upload
(must have proper credentials) - merge release branch to master
Release command cheatsheet
git checkout master
git pull
git checkout -b release/vX.X.X
# then bump versions
vim eeweather/__version__.py
vim CHANGELOG.md
git commit -am "Bump version"
git tag vX.X.X
git push -u origin release/vX.X.X --tags
docker-compose run --rm pipenv run python setup.py upload
git checkout master
git pull
git merge release/vX.X.X
git push
Or, use the ./bump_version.sh X.X.X Y.Y.Y
command to generate some more
specific commands.
The interal source file database needs to be periodically updated.
TODO: automate this!
Here are is the current process to use to update the internal db.
git checkout master
git pull
git checkout -b feature/update-db-YYYY-MM-DD
# Rebuild the internal DB
docker-compose build
docker-compose run --rm eeweather rebuild-db
git commit -am "Rebuild db YYYY-MM-DD"
vim CHANGELOG.md # write "Update internal database (YYYY-MM-DD)."
# Update the tests and snapshots if everything looks good
docker-compose run --rm test
docker-compose run --rm test --snapshot-update
Then make a PR and review as normal. Rinse and repeat as necessary.