-
Notifications
You must be signed in to change notification settings - Fork 4
Migrate to cava-devops centralised CI/CD #28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
a08811d
Changes that come with the KnowledgeResource changes in oa-configurator
nicoloesch bc5dec4
Implement cava-devops changes for new CI/CD
nicoloesch bdca318
Run merge.yml only on main
nicoloesch a39ca3c
Revert falsely commited KnowledgeResource commit
nicoloesch f388c2d
Remove stale docs extra, fix release-drafter permissions
nicoloesch 5ddcf4e
Support ty as static type checker
nicoloesch e0e1246
Fix ty static typing
nicoloesch 79f3ddf
Grant correct CI permission
nicoloesch File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| # Contributing | ||
|
|
||
| ## Development setup | ||
|
|
||
| ```bash | ||
| uv sync --all-extras --dev | ||
| uv run pytest -q | ||
| uv run ruff check . | ||
| ``` | ||
|
|
||
| ## Opening a pull request | ||
|
|
||
| 1. Apply **exactly one** label before merging: | ||
|
|
||
| | Label | When to use | | ||
| |---|---| | ||
| | `breaking` | Public API change, backward-incompatible | | ||
| | `feature` | New functionality, backward-compatible | | ||
| | `fix` | Bug fix | | ||
| | `dependencies` | Dependency version update | | ||
| | `chore` | CI changes, refactoring, test additions, docs — anything that does not affect the public-facing package. Bypasses the label gate; excluded from the changelog and does not bump the version. | | ||
|
|
||
| 2. When merging (squash), write a clear extended description in the merge dialog. That text — not the PR's opening description — becomes the changelog entry for this change. Leave it blank for `chore` PRs. | ||
|
|
||
| ## Versioning and releases | ||
|
|
||
| Versions are derived from git tags; there is no version string in any source file. Releases are triggered by a maintainer publishing the standing draft release on the repository's Releases page. There is no automated commit-back to `main`. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| name: "🐞 Bug Report" | ||
| description: Report a reproducible bug. | ||
| type: "Bug" | ||
| body: | ||
| - type: checkboxes | ||
| attributes: | ||
| label: Pre-flight | ||
| options: | ||
| - label: I searched existing issues and this is not a duplicate. | ||
| required: true | ||
|
|
||
| - type: textarea | ||
| id: summary | ||
| attributes: | ||
| label: Summary | ||
| description: One or two sentences describing the bug. | ||
| validations: | ||
| required: true | ||
|
|
||
| - type: textarea | ||
| id: reproduction | ||
| attributes: | ||
| label: Reproduction | ||
| description: Steps and/or a minimal code example that reproduces the issue. Wrap code in triple backticks. | ||
| placeholder: | | ||
| 1. Import X and call Y with Z | ||
| 2. Observe error | ||
|
|
||
| ```python | ||
| # minimal example | ||
| ``` | ||
| validations: | ||
| required: true | ||
|
|
||
| - type: textarea | ||
| id: actual | ||
| attributes: | ||
| label: Actual behaviour | ||
| validations: | ||
| required: true | ||
|
|
||
| - type: textarea | ||
| id: expected | ||
| attributes: | ||
| label: Expected behaviour | ||
| validations: | ||
| required: true | ||
|
|
||
| - type: textarea | ||
| id: logs | ||
| attributes: | ||
| label: Error output | ||
| description: Full traceback if applicable. Formatted automatically. | ||
| render: python-traceback | ||
|
|
||
| - type: textarea | ||
| id: system | ||
| attributes: | ||
| label: System info | ||
| description: | | ||
| Run this in your environment and paste the output: | ||
|
|
||
| ```shell | ||
| python <(curl -s https://raw.githubusercontent.com/AustralianCancerDataNetwork/cava-devops/main/scripts/cava_system_info.py) | ||
| ``` | ||
| render: shell |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| blank_issues_enabled: false | ||
| contact_links: | ||
| - name: Discussions | ||
| url: https://github.com/orgs/AustralianCancerDataNetwork/discussions | ||
| about: Questions and general discussion about the CAVA stack. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| name: "🚀 Feature Request" | ||
| description: Propose a new feature or enhancement. | ||
| type: "Feature" | ||
| body: | ||
| - type: checkboxes | ||
| attributes: | ||
| label: Pre-flight | ||
| options: | ||
| - label: I searched existing issues and this has not been requested before. | ||
| required: true | ||
|
|
||
| - type: textarea | ||
| id: problem | ||
| attributes: | ||
| label: Problem or motivation | ||
| description: What are you trying to do that you currently cannot? | ||
| validations: | ||
| required: true | ||
|
|
||
| - type: textarea | ||
| id: proposal | ||
| attributes: | ||
| label: Proposed solution | ||
| description: How would you like this to work? | ||
| validations: | ||
| required: true | ||
|
|
||
| - type: textarea | ||
| id: alternatives | ||
| attributes: | ||
| label: Alternatives considered | ||
| description: Other approaches you considered and why you ruled them out. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| name: "❗ Something is not working" | ||
| description: Something behaves unexpectedly but you are not sure if it is a bug. | ||
| body: | ||
| - type: checkboxes | ||
| attributes: | ||
| label: Pre-flight | ||
| options: | ||
| - label: I searched existing issues for this problem. | ||
| required: true | ||
|
|
||
| - type: textarea | ||
| id: summary | ||
| attributes: | ||
| label: Problem summary | ||
| description: 1-2 sentences describing what is not working. | ||
| validations: | ||
| required: true | ||
|
|
||
| - type: textarea | ||
| id: reproduction | ||
| attributes: | ||
| label: Reproduction | ||
| description: Steps and/or a minimal code example. Wrap code in triple backticks. | ||
| placeholder: | | ||
| 1. Import X and call Y with Z | ||
| 2. Observe unexpected behaviour | ||
|
|
||
| ```python | ||
| # minimal example | ||
| ``` | ||
| validations: | ||
| required: true | ||
|
|
||
| - type: textarea | ||
| id: actual | ||
| attributes: | ||
| label: Actual outcome | ||
| validations: | ||
| required: true | ||
|
|
||
| - type: textarea | ||
| id: expected | ||
| attributes: | ||
| label: Expected outcome | ||
| validations: | ||
| required: true | ||
|
|
||
| - type: textarea | ||
| id: logs | ||
| attributes: | ||
| label: Error messages | ||
| description: Full traceback if applicable. Formatted automatically. | ||
| render: python-traceback | ||
|
|
||
| - type: textarea | ||
| id: system | ||
| attributes: | ||
| label: System info | ||
| description: | | ||
| Run this in your environment and paste the output: | ||
|
|
||
| ```shell | ||
| python <(curl -s https://raw.githubusercontent.com/AustralianCancerDataNetwork/cava-devops/main/scripts/cava_system_info.py) | ||
| ``` | ||
| render: shell |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| ## Summary | ||
|
|
||
| <!-- What does this PR do? This text becomes the changelog entry — write it for a reader who will see it months from now, not for the reviewer reading the diff. Leave blank for chore PRs. --> | ||
|
|
||
| ## Checklist | ||
|
|
||
| - [ ] Applied exactly one label (`breaking`, `feature`, `fix`, `dependencies`, or `chore`) | ||
| - [ ] Tests pass locally (`uv run pytest -q`) | ||
| - [ ] Lint passes (`uv run ruff check .`) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| name-template: 'v$RESOLVED_VERSION' | ||
| tag-template: 'v$RESOLVED_VERSION' | ||
| commitish: main | ||
|
|
||
| categories: | ||
| - title: Breaking Changes | ||
| labels: ['breaking'] | ||
| - title: Features | ||
| labels: ['feature'] | ||
| - title: Fixes | ||
| labels: ['fix'] | ||
| - title: Dependencies | ||
| labels: ['dependencies'] | ||
|
|
||
| template: | | ||
| $CHANGES | ||
|
|
||
| change-template: '- **$TITLE** (#$NUMBER) @$AUTHOR' | ||
|
|
||
| version-resolver: | ||
| major: | ||
| labels: ['breaking'] | ||
| minor: | ||
| labels: ['feature'] | ||
| patch: | ||
| labels: ['fix', 'dependencies'] | ||
| default: patch | ||
|
|
||
| exclude-labels: ['chore'] | ||
|
|
||
| autolabeler: [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| name: CI | ||
| on: | ||
| pull_request: | ||
| branches: [main] | ||
| types: [opened, synchronize, reopened, labeled, unlabeled] | ||
| jobs: | ||
| label-gate: | ||
| uses: AustralianCancerDataNetwork/cava-devops/.github/workflows/label-gate.yml@main | ||
| build-test-sqlite: | ||
| uses: AustralianCancerDataNetwork/cava-devops/.github/workflows/build-test.yml@main | ||
| with: | ||
| ty-src: omop_alchemy | ||
| build-test-postgres: | ||
| uses: AustralianCancerDataNetwork/cava-devops/.github/workflows/build-test-postgres.yml@main | ||
| with: | ||
| ty-src: omop_alchemy | ||
| postgres-db: test_db | ||
| setup-commands: | | ||
| uv run omop-config configure omop_alchemy \ | ||
| --test-dialect postgresql+psycopg \ | ||
| --test-database pg_test \ | ||
| --test-host localhost \ | ||
| --test-port 5432 \ | ||
| --test-cdm-schema public \ | ||
| --test-user test \ | ||
| --test-password test \ | ||
| --test-database-name test_db | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,28 +1,10 @@ | ||
| name: Deploy Docs | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
|
|
||
| tags: ['v*'] | ||
| workflow_dispatch: | ||
| permissions: | ||
| contents: write | ||
|
|
||
| jobs: | ||
| deploy: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: '3.12' | ||
|
|
||
| - name: Install MkDocs | ||
| run: | | ||
| pip install mkdocs mkdocs-material mkdocstrings-python mkdocs-mermaid2-plugin | ||
| pip install -e . | ||
|
|
||
| - name: Deploy to GitHub Pages | ||
| run: | | ||
| mkdocs gh-deploy --force | ||
| uses: AustralianCancerDataNetwork/cava-devops/.github/workflows/deploy-docs.yml@main |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| name: Release Update | ||
| on: | ||
| pull_request: | ||
| types: [closed] | ||
| branches: [main] | ||
| permissions: | ||
| contents: write | ||
| pull-requests: read | ||
| jobs: | ||
| draft: | ||
| if: github.event.pull_request.merged == true | ||
| uses: AustralianCancerDataNetwork/cava-devops/.github/workflows/release-drafter.yml@main | ||
| secrets: inherit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| name: Publish | ||
| on: | ||
| push: | ||
| tags: ['v*'] | ||
| jobs: | ||
| build: | ||
| uses: AustralianCancerDataNetwork/cava-devops/.github/workflows/publish.yml@main | ||
| publish: | ||
| # Inline: PyPI OIDC checks job_workflow_ref, which must point to this file. | ||
| # Moving pypa/gh-action-pypi-publish into cava-devops would break the trusted publisher. | ||
| needs: build | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| id-token: write | ||
| environment: | ||
| name: pypi | ||
| url: https://pypi.org/p/omop-alchemy | ||
| steps: | ||
| - uses: actions/download-artifact@v4 | ||
| with: { name: dist, path: dist/ } | ||
| - uses: pypa/gh-action-pypi-publish@release/v1 |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.