1
0
mirror of synced 2024-11-14 10:27:45 +01:00
jubeatools/docs/repo maintenance.md

1.7 KiB

Repository maintenance

Setting up a dev environment

  1. Clone the git repo
    $ git clone git@github.com:Stepland/jubeatools.git
  2. Install a recent version of Python (currently 3.8 is enough)
  3. Install poetry (jubeatools uses poetry to deal with many aspects of the project's life-cycle)
  4. Install jubeatools (with dev dependencies)
    $ poetry install
  5. Run the tests
    $ poetry run pytest
  6. If everything went well you can now use jubeatools's commandline
    $ poetry run jubeatools

Making a new release

Sanity checks before anything serious happens, from the repo's root :

  1. Format the code
    $ poetry run sh ./utils/format_code.sh
  2. Run checks
    $ poetry run sh ./utils/check_code.sh
  3. Make sure the unit tests pass
    $ poetry run pytest
  4. Fix all encountered errors
  5. Rince and repeat until everything is ok

Now that this is done you can move on to actually making a new version, while still being in the repo's root :

  1. Update CHANGELOG.md (I like to follow this changelog style: https://keepachangelog.com/en/1.0.0/)

  2. Update README.md if you've just added support for a new format

  3. Commit everything you want in the new release

  4. Run the script
    $ poetry run python utils/bump_version.py {rule}

    {rule} will usually be one of patch, minor or major. But it can be anything poetry version handles.

    Add --commit to let the script create the commit and tag for you as well

  5. Inspect the result for mistakes

  6. (If you used --no-commit)

    • Commit the version-bumped files
    • Add a tag with the format vX.Y.Z (don't forget the v at the start)
  7. Push the version bump commit and the tag

  8. Build & publish
    $ poetry publish --build