Skip to content

Latest commit

 

History

History
81 lines (61 loc) · 2.2 KB

CONTRIBUTING.md

File metadata and controls

81 lines (61 loc) · 2.2 KB

Contributing

Guidelines

  • 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.

Release process

Pre-release

  1. create branch off of master named feature/<examplefeature> or bugfix/<> and make desired changes.
  2. edit CHANGELOG.md with changes under a new section called Development
  3. create, review, and merge PR for feature/examplefeature
  4. repeat steps 1-3 if desired for other features as convenient, though preference is for frequent version bumps

Releasing

  1. make a new branch called release/vX.X.X
  2. bump version - edit __version__.py with the new version
  3. Rename Development section with the new version in CHANGELOG.md
  4. commit changes
  5. create a tag called vX.X.X on release/vX.X.X branch
  6. push tag and branch
  7. submit to pypi with pipenv run python setup.py upload (must have proper credentials)
  8. 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.

Updating the internal db

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.