Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/CONTRIBUTING.md
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`.
63 changes: 48 additions & 15 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,66 @@
name: "🐞 Bug Report"
description: Report a bug to help us improve the project
labels: ["bug"]
description: Report a reproducible bug.
type: "Bug"
body:
- type: checkboxes
attributes:
label: Is there an existing issue for this?
description: Please search to see if an issue already exists for the bug you encountered.
label: Pre-flight
options:
- label: I have searched the existing issues
required: true
- label: I searched existing issues and this is not a duplicate.
required: true

- type: textarea
id: summary
attributes:
label: Bug summary
description: 1-2 short sentences describing the bug.
label: Summary
description: One or two sentences describing the bug.
validations:
required: true

- type: textarea
id: reproduction
attributes:
label: Code for reproduction
description: Please provide a minimal self-contained example.
placeholder: Your python code here
render: python
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 messages
description: Paste the full error traceback here.
render: python-traceback
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
8 changes: 4 additions & 4 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
blank_issues_enabled: false # Changed to false to force template use
blank_issues_enabled: false
contact_links:
- name: Discussions
url: https://github.com/AustralianCancerDataNetwork/omop-graph/discussions
about: Ask questions or start a general discussion.
- name: Discussions
url: https://github.com/orgs/AustralianCancerDataNetwork/discussions
about: Questions and general discussion about the CAVA stack.
34 changes: 19 additions & 15 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,32 @@
name: "🚀 Feature Request"
description: Submit a proposal for a new feature
labels: ["enhancement"]
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: motivation
id: problem
attributes:
label: Motivation
description: Is your feature request related to a problem? (e.g., I'm always frustrated when [...])
label: Problem or motivation
description: What are you trying to do that you currently cannot?
validations:
required: true

- type: textarea
id: pitch
id: proposal
attributes:
label: Pitch
description: A clear and concise description of what you want to happen.
label: Proposed solution
description: How would you like this to work?
validations:
required: true

- type: textarea
id: alternatives
attributes:
label: Alternatives
description: Any alternative solutions or features you've considered.
- type: textarea
id: context
attributes:
label: Additional context
description: Add any other context or screenshots here.
label: Alternatives considered
description: Other approaches you considered and why you ruled them out.
59 changes: 24 additions & 35 deletions .github/ISSUE_TEMPLATE/not_working.yml
Original file line number Diff line number Diff line change
@@ -1,76 +1,65 @@
name: "❗ Something is not working"
description: >
If something is not working as expected but you're not sure if it's a bug,
please follow the instructions in this template.

description: Something behaves unexpectedly but you are not sure if it is a bug.
body:
- type: checkboxes
attributes:
label: Is there an existing issue for this?
description: Please search to see if an issue already exists for the problem you encountered.
label: Pre-flight
options:
- label: I have searched the existing issues
required: true
- label: I searched existing issues for this problem.
required: true

- type: textarea
id: summary
attributes:
label: Problem summary
description: Please provide 1-2 short sentences that succinctly describe the problem.
description: 1-2 sentences describing what is not working.
validations:
required: true

- type: textarea
id: reproduction
attributes:
label: Code for reproduction
description: >
If possible, please provide a [minimum self-contained example](https://stackoverflow.com/help/minimal-reproducible-example).
It will be automatically formatted.
Here's another useful resource: [How To Ask Questions The Smart Way](http://www.catb.org/~esr/faqs/smart-questions.html).
placeholder: Your code here
render: python
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
description: Please describe the outcome of running the above code.
validations:
required: true

- type: textarea
id: logs
attributes:
label: Error messages
description: >
Please copy and paste any relevant log output.
Paste the full error traceback, not just the last error.
It will be automatically formatted.
placeholder: Your errors here
render: python-traceback

- type: textarea
id: expected
attributes:
label: Expected outcome
description: >
Please provide a description (or visual example) of the expected outcome
from the code snippet.
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: |
Please run this command in your console and paste the output below
Run this in your environment and paste the output:

```shell
python <(curl -s https://raw.githubusercontent.com/AustralianCancerDataNetwork/omop-graph/refs/heads/main/scripts/system_information.py)
python <(curl -s https://raw.githubusercontent.com/AustralianCancerDataNetwork/cava-devops/main/scripts/cava_system_info.py)
```
placeholder: Your system info
render: shell
render: shell
9 changes: 9 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
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 .`)
31 changes: 31 additions & 0 deletions .github/release-drafter.yml
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: []
19 changes: 19 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
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:
uses: AustralianCancerDataNetwork/cava-devops/.github/workflows/build-test.yml@main
with:
setup-commands: |
uv run omop-config configure omop_alchemy \
--dialect sqlite \
--database-name test.db \
--cdm-schema main
uv run omop-config configure omop_graph \
--max-depth 6 \
--max-paths 20
35 changes: 4 additions & 31 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,10 @@
name: docs
name: Deploy Docs
on:
push:
tags:
- 'v*' # Triggers only when a version tag is pushed

tags: ['v*']
workflow_dispatch:
permissions:
contents: write

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Configure Git Credentials
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- uses: actions/setup-python@v5
with:
python-version: 3.x
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v4
with:
key: mkdocs-material-${{ env.cache_id }}
path: ~/.cache
restore-keys: |
mkdocs-material-

- name: Install MkDocs and plugins
run: pip install "mkdocs<2.0" mkdocs-material mkdocstrings-python mkdocs-mermaid2-plugin mkdocs-table-reader-plugin mkdocs-macros-plugin

- name: Install omop-graph
run: pip install .

- name: Deploy docs
run: mkdocs gh-deploy --force
uses: AustralianCancerDataNetwork/cava-devops/.github/workflows/deploy-docs.yml@main
16 changes: 0 additions & 16 deletions .github/workflows/lint-pr.yml

This file was deleted.

Loading
Loading