Skip to content

Commit 9c58d07

Browse files
authored
Initial commit
0 parents  commit 9c58d07

26 files changed

Lines changed: 1350 additions & 0 deletions

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
./src/rbc/core/resources/**/*.nii.gz !text !filter !merge !diff
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Bug Report
2+
description: This is a template for reporting a bug.
3+
# If you want to enable automatic linking to projects,
4+
# uncomment the following line and replace the project ID
5+
# with the ID of your project.
6+
# projects: ["childmindresearch/1"]
7+
title: 'Bug: '
8+
labels: [bug]
9+
body:
10+
- type: textarea
11+
id: description
12+
attributes:
13+
label: Description
14+
description: Please provide a clear and concise description of the bug.
15+
placeholder: Describe the bug here
16+
validations:
17+
required: true
18+
- type: textarea
19+
id: steps-to-reproduce
20+
attributes:
21+
label: Steps to Reproduce
22+
description: Please provide detailed steps to reproduce the bug.
23+
placeholder: Describe the steps to reproduce the bug here.
24+
validations:
25+
required: true
26+
- type: textarea
27+
id: expected-results
28+
attributes:
29+
label: Expected Results
30+
description: Please describe what you expected to happen.
31+
placeholder: Describe the expected results here.
32+
validations:
33+
required: true
34+
- type: textarea
35+
id: actual-results
36+
attributes:
37+
label: Actual Results
38+
description: Please describe what actually happened.
39+
placeholder: Describe the actual results here.
40+
validations:
41+
required: true
42+
- type: textarea
43+
id: additional-notes
44+
attributes:
45+
label: Additional Notes
46+
description: Add any additional notes or context here.
47+
placeholder: Add additional notes here.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Development Task
2+
description: This is a template for a development task
3+
# If you want to enable automatic linking to projects,
4+
# uncomment the following line and replace the project ID
5+
# with the ID of your project.
6+
# projects: ["childmindresearch/1"]
7+
title: 'Task: '
8+
labels: [task]
9+
body:
10+
- type: textarea
11+
id: description
12+
attributes:
13+
label: Description
14+
description: What is the task about? Why is it needed? What is the current state, if any?
15+
placeholder: Describe the task here
16+
validations:
17+
required: true
18+
- type: textarea
19+
id: tasks
20+
attributes:
21+
label: Tasks
22+
description: What are the concrete (sub-)tasks that need to be performed?
23+
placeholder: Describe the tasks here.
24+
value: '- [ ] Task 1'
25+
validations:
26+
required: true
27+
- type: textarea
28+
id: freeform-notes
29+
attributes:
30+
label: Freeform Notes
31+
description: Add any additional notes here.
32+
placeholder: Add notes here.
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Support Request
2+
description: This is a template for submitting a support request.
3+
# If you want to enable automatic linking to projects,
4+
# uncomment the following line and replace the project ID
5+
# with the ID of your project.
6+
# projects: ["childmindresearch/1"]
7+
title: 'Support: '
8+
labels: [question]
9+
body:
10+
- type: textarea
11+
id: issue-description
12+
attributes:
13+
label: Issue Description
14+
description: Please provide a clear and concise description of the issue you are facing.
15+
placeholder: Describe the issue here
16+
validations:
17+
required: true
18+
- type: textarea
19+
id: environment-details
20+
attributes:
21+
label: Environment Details
22+
description: Please provide details about your environment, including system specifications, software versions, etc.
23+
placeholder: Describe your environment details here.
24+
validations:
25+
required: false
26+
- type: textarea
27+
id: attempted-solutions
28+
attributes:
29+
label: Attempted Solutions
30+
description: Describe any steps you have already taken to resolve the issue.
31+
placeholder: Describe any attempted solutions here.
32+
validations:
33+
required: false
34+
- type: textarea
35+
id: reproduction-steps
36+
attributes:
37+
label: Reproduction Steps
38+
description: If applicable, provide steps to reproduce the issue.
39+
placeholder: Describe the steps to reproduce the issue, if applicable.
40+
validations:
41+
required: false
42+
- type: textarea
43+
id: additional-notes
44+
attributes:
45+
label: Additional Notes
46+
description: Add any other context or screenshots about the support request here.
47+
placeholder: Add additional notes or screenshots here.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Setup Python Environment with uv
2+
description: Sets up Python, installs uv, and creates the virtual environment.
3+
inputs:
4+
only-dev:
5+
description: Whether to install only dev dependencies
6+
required: false
7+
default: 'false'
8+
9+
runs:
10+
using: composite
11+
steps:
12+
- name: Install uv
13+
uses: astral-sh/setup-uv@v5
14+
with:
15+
enable-cache: true
16+
17+
- name: Set up Python
18+
uses: actions/setup-python@v5
19+
with:
20+
python-version-file: pyproject.toml
21+
22+
- name: Install dependencies
23+
if: steps.cache-venv.outputs.cache-hit != 'true'
24+
shell: bash
25+
run: |-
26+
if [[ "${{ inputs.only-dev }}" == "true" ]]; then
27+
uv sync --only-dev
28+
else
29+
uv sync
30+
fi

.github/dependabot.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Please see the documentation for all configuration options:
2+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
3+
4+
version: 2
5+
updates:
6+
- package-ecosystem: pip
7+
directory: /
8+
schedule:
9+
interval: monthly
10+
groups:
11+
production-dependencies:
12+
dependency-type: production
13+
development-dependencies:
14+
dependency-type: development
15+
- package-ecosystem: github-actions
16+
directory: /
17+
schedule:
18+
interval: monthly

.github/workflows/docs.yaml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Build and publish docs
2+
3+
permissions:
4+
contents: read
5+
pages: write
6+
id-token: write
7+
8+
concurrency:
9+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
10+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
11+
group: pages
12+
cancel-in-progress: false
13+
14+
on:
15+
workflow_run:
16+
workflows: [Python Tests]
17+
types:
18+
- completed
19+
branches:
20+
- main
21+
workflow_dispatch:
22+
23+
24+
jobs:
25+
build-and-publish-docs:
26+
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }}
27+
runs-on: ubuntu-latest
28+
environment:
29+
name: github-pages
30+
url: ${{ steps.deployment.outputs.page_url }}
31+
steps:
32+
- uses: actions/checkout@v4
33+
- name: Install uv
34+
uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86
35+
with:
36+
enable-cache: true
37+
- name: Set up Python
38+
uses: actions/setup-python@v5
39+
with:
40+
python-version-file: pyproject.toml
41+
- name: Install the project
42+
run: uv sync --only-group docs
43+
- name: Build docs
44+
run: |
45+
APP_MODULE_NAME=$(ls src -U | head -1) # Get the first module name in the src directory
46+
uv run pdoc src/"$APP_MODULE_NAME" -o docs_build -t docs/pdoc-theme --docformat google
47+
- name: Setup Pages
48+
uses: actions/configure-pages@v5
49+
- name: Upload artifact
50+
uses: actions/upload-pages-artifact@v4
51+
with:
52+
path: ./docs_build
53+
- name: Deploy to GitHub Pages
54+
id: deployment
55+
uses: actions/deploy-pages@v4

.github/workflows/test.yaml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Python Tests
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
push:
8+
branches:
9+
- main
10+
pull_request:
11+
12+
jobs:
13+
unit:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Setup venv
18+
uses: ./.github/actions/setup-venv
19+
- name: Run tests
20+
id: run-tests
21+
run: >
22+
uv run pytest \
23+
--junitxml=pytest.xml \
24+
--cov-report=term-missing:skip-covered \
25+
--cov-report=xml:coverage.xml \
26+
--cov=src tests \
27+
--log-level=DEBUG \
28+
--verbose
29+
- name: Upload coverage to Codecov
30+
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7
31+
with:
32+
token: ${{ secrets.CODECOV_TOKEN }}
33+
verbose: true
34+
35+
ruff:
36+
runs-on: ubuntu-latest
37+
steps:
38+
- uses: actions/checkout@v4
39+
- name: Setup venv
40+
uses: ./.github/actions/setup-venv
41+
with:
42+
only-dev: true
43+
- name: Ruff format
44+
run: uv run ruff format --check
45+
- name: Ruff check
46+
run: uv run ruff check
47+
48+
mypy:
49+
runs-on: ubuntu-latest
50+
steps:
51+
- uses: actions/checkout@v4
52+
- name: Setup venv
53+
uses: ./.github/actions/setup-venv
54+
- run: |
55+
uv run mypy .
56+
57+
deptry:
58+
runs-on: ubuntu-latest
59+
steps:
60+
- uses: actions/checkout@v4
61+
- name: Setup venv
62+
uses: ./.github/actions/setup-venv
63+
- run: |-
64+
uv run deptry ./src

0 commit comments

Comments
 (0)