Skip to content

Latest commit

 

History

History
115 lines (82 loc) · 3.81 KB

CONTRIBUTING.md

File metadata and controls

115 lines (82 loc) · 3.81 KB

How to contribute to MLM specification or stac-model

Project setup

  1. If you don't have Poetry installed run:
make poetry-install

This installs Poetry as a standalone application.
For more details, see also the Poetry Documentation.
If you prefer, you can simply install it inside your virtual environment.

  1. Initialize project dependencies with poetry and install pre-commit hooks:
make install-dev
make pre-commit-install

PR submission

Before submitting your code please do the following steps:

  1. Add any changes you want
  2. Add tests for the new changes
  3. Edit documentation if you have changed something significant

You're then ready to run and test your contributions.

  1. Run linting checks:
make lint-all
  1. Run tests (including your new ones) with
make test
  1. Upload your changes to your fork, then make a PR from there to the main repo:
git checkout -b your-branch
git add .
git commit -m ":tada: Initial commit"
git remote add origin https://github.com/your-fork/mlm-extension.git
git push -u origin your-branch

Building and releasing

Warning

There are multiple types of releases for this repository:

  1. Release for MLM specification (usually, this should include one for stac-model as well to support it)
  2. Release for stac-model only

Building a new version of MLM specification

  • Checkout to the main branch by making sure the CI passed all previous tests.
  • Bump the version with bump-my-version bump --verbose <version-level>.
    • Consider using --dry-run beforehand to inspect the changes.
    • The <version-level> should be one of major, minor, or patch.
      Alternatively, the version can be set explicitly with --new-version <version> patch.
      For more details, refer to the Semantic Versions standard;
  • Make a commit to GitHub and push the corresponding auto-generated v{MAJOR}.{MINOR}.{PATCH} tag.
  • Validate that the CI validated everything once again.
  • Create a GitHub release with the created tag.

Warning

  • Ensure the "Set as the latest release" option is selected ✔️.
  • Ensure the diff ranges from the previous MLM version, and not an intermediate stac-model release.

Building a new version of stac-model

  • Apply any relevant changes and CHANGELOG.md entries in a PR that modifies stac-model.
  • Bump the version with poetry version <version>.
    • You can pass the new version explicitly, or a rule such as major, minor, or patch.
      For more details, refer to the Semantic Versions standard;
  • Once CI validation succeeded, merge the corresponding PR branch.
  • Checkout to main branch that contais the freshly created merge commit.
  • Push the tag stac-model-v{MAJOR}.{MINOR}.{PATCH}. The CI should auto-publish it to PyPI.
  • Create a GitHub release

Warning

  • Ensure the "Set as the latest release" option is deselected ❌.
  • Ensure the diff ranges from the previous release of stac-model, not an intermediate MLM release.

Other help

You can contribute by spreading a word about this library. It would also be a huge contribution to write a short article on how you are using this project. You can also share how the ML Model extension does or does not serve your needs with us in the GitHub Discussions or raise Issues for bugs.