Thank you for contributing to Myna.
Open a pull request against main with a clear description of your changes. When opening the pull request, complete the repository PR template to include details relevant to your change. All pull requests must pass CI checks and be approved by at least one Myna developer.
The recommended workflow uses uv and the checked-in uv.lock file. Install the
development tools from the repository root with:
uv sync --frozen --extra devIf you prefer pip, the equivalent install is:
pip install -e .[dev]If you change dependencies locally, rerun uv lock and commit the updated uv.lock.
Use pre-commit to ensure local changes are ready for review.
First, install pre-commit locally:
uv tool install pre-commit --with pre-commit-uvThen commit normally and allow hooks to run. You can run pre-commit in the repo root
directory to manually run pre-commit hooks at any time.
To skip hooks for a single commit, use --no-verify. You can also run checks manually using the commands below.
Myna uses ruff for formatting and linting. Run these from the repository root:
uv run ruff format
uv run ruff checkpylint also runs in GitHub CI for deeper analysis. Some warnings are allowed, but CI will fail if too many new warnings reduce quality below the configured threshold.
Myna uses pytest. Run all tests from the repository root:
uv run pytestUse Conventional Commits:
<type>(<optional scope>): <description>
<optional body>
<optional footer>
build: Changes that affect the build system or external dependencieschore: Other changes that don't modify src or test filesci: Changes to CI configuration files and scriptsdocs: Documentation only changesfeat: A new featurefix: A bug fixperf: A code change that improves performancerefactor: A code change that neither fixes a bug nor adds a featurerevert: Reverts a previous commitstyle: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc.)test: Adding missing tests or correcting existing tests
Scope is optional, but recommended when it improves clarity.
- Use lowercase, short, subsystem-focused names.
- Prefer one scope when possible.
- Use multiple scopes only for tightly related areas.
Multi-scope format:
<type>(<scope1>, <scope2>): <description>
Suggested scopes:
cliworkflowmetadatacomponentsfilesutilsdatabaseadditivefoamopenfoamexacathesisrvedeerbnpycubitadamantineperegrinetestsdocsci
Examples:
feat(cli): add dry-run flag to configure commandrefactor(workflow, metadata): simplify metadata loading in run pipeline
- Use imperative voice (
add,fix,update). - Start with a lowercase word.
- Do not end with punctuation.
- Keep it concise and specific.
Examples:
- Valid:
fix(metadata): handle missing layer-thickness field - Invalid:
fix(metadata): Fixed missing layer-thickness field
Breaking changes are considered to be anything which breaks a previous user input or user interface. Breaking changes also include substantive change to application behavior due to internal changes (e.g. new default values).
Use either:
-
!before the colon:<type>(<optional scope>)!: <description> -
A
BREAKING CHANGE:footer:<type>(<optional scope>): <description> <optional body> BREAKING CHANGE: <description of the breaking change>
PR titles follow the same format and types as commit messages:
<type>(<optional scope>): <description>
Breaking-change PR title:
<type>(<optional scope>)!: <description>
Examples:
feat(cli): add support for batch exportsfix(database)!: remove deprecated peregrine schema alias
Branch names follow a similar convention to commit messages:
<type>/<description>
Branch types are the same as commit types:
build: Changes that affect the build system or external dependencieschore: Other changes that don't modify src or test filesci: Changes to CI configuration files and scriptsdocs: Documentation only changesfeat: A new featurefix: A bug fixperf: A code change that improves performancerefactor: A code change that neither fixes a bug nor adds a featurerevert: Reverts a previous commitstyle: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc.)test: Adding missing tests or correcting existing tests
- Use lowercase, hyphen-separated words.
- Keep it concise and specific.
- Include issue identifiers when useful.
Examples:
feat/add-export-supportci/fix-pipelinefix/113-handle-missing-field