Skip to content

Commit 84c53b8

Browse files
authored
Merge pull request #383 from IMSY-DKFZ/develop
Merge develop into main
2 parents 7c082b8 + 0639887 commit 84c53b8

178 files changed

Lines changed: 7286 additions & 5046 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/release-drafter.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name-template: 'v$RESOLVED_VERSION 🌈'
2+
tag-template: 'v$RESOLVED_VERSION'
3+
categories:
4+
- title: '🚀 Features'
5+
labels:
6+
- 'feature'
7+
- 'enhancement'
8+
- 'documentation'
9+
- title: '🐛 Bug Fixes'
10+
labels:
11+
- 'fix'
12+
- 'bugfix'
13+
- 'bug'
14+
- title: '🧰 Maintenance'
15+
label: 'chore'
16+
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
17+
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
18+
version-resolver:
19+
major:
20+
labels:
21+
- 'major'
22+
minor:
23+
labels:
24+
- 'minor'
25+
patch:
26+
labels:
27+
- 'patch'
28+
default: patch
29+
template: |
30+
## Changes
31+
32+
$CHANGES

.github/workflows/automatic_testing.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
strategy:
2424
fail-fast: false
2525
matrix:
26-
python-version: ["3.8", "3.9", "3.10", "3.11"]
26+
python-version: ["3.9", "3.10", "3.11", "3.12"]
2727
os: [ubuntu-latest, macos-latest, windows-latest]
2828

2929
steps:

.github/workflows/pypi.yml

Lines changed: 43 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,53 @@
1-
# Uploads the current version of the package to PyPI when commit are pushed to main (including merges via pull requests)
1+
# Uploads the current version of the package to PyPI when publishing a release
22

33
name: Upload to PyPI
44

55
on:
6-
push:
7-
branches:
8-
- main
6+
release:
7+
types: [published]
98

109
jobs:
11-
build-and-publish:
10+
release-build:
1211
if: github.repository == 'IMSY-DKFZ/simpa'
1312
runs-on: ubuntu-latest
1413
steps:
15-
- uses: actions/checkout@v3
16-
- name: Build and publish to pypi
17-
uses: JRubics/poetry-publish@v1.17
14+
- uses: actions/checkout@v4
15+
16+
- uses: actions/setup-python@v5
17+
with:
18+
python-version: "3.x"
19+
20+
- name: Build release distributions
21+
run: |
22+
python -m pip install build
23+
python -m build
24+
25+
- name: Upload distributions
26+
uses: actions/upload-artifact@v4
27+
with:
28+
name: release-dists
29+
path: dist/
30+
31+
pypi-publish:
32+
if: github.repository == 'IMSY-DKFZ/simpa'
33+
runs-on: ubuntu-latest
34+
35+
needs:
36+
- release-build
37+
38+
permissions:
39+
id-token: write
40+
41+
environment:
42+
name: pypi
43+
url: https://pypi.org/project/simpa/
44+
45+
steps:
46+
- name: Retrieve release distributions
47+
uses: actions/download-artifact@v4
1848
with:
19-
pypi_token: ${{ secrets.PYPI_TOKEN }}
20-
python_version: '3.10'
49+
name: release-dists
50+
path: dist/
51+
52+
- name: Publish release distributions to PyPI
53+
uses: pypa/gh-action-pypi-publish@release/v1
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Release Drafter
2+
3+
on:
4+
push:
5+
# branches to consider in the event; optional, defaults to all
6+
branches:
7+
- main
8+
# pull_request event is required only for autolabeler
9+
# pull_request:
10+
# Only following types are handled by the action, but one can default to all as well
11+
# types: [ opened, reopened, synchronize ]
12+
# pull_request_target event is required for autolabeler to support PRs from forks
13+
# pull_request_target:
14+
# types: [opened, reopened, synchronize]
15+
16+
permissions:
17+
contents: read
18+
19+
jobs:
20+
update_release_draft:
21+
permissions:
22+
# write permission is required to create a github release
23+
contents: write
24+
# write permission is required for autolabeler
25+
# otherwise, read permission is required at least
26+
pull-requests: read
27+
runs-on: ubuntu-latest
28+
steps:
29+
# (Optional) GitHub Enterprise requires GHE_HOST variable set
30+
#- name: Set GHE_HOST
31+
# run: |
32+
# echo "GHE_HOST=${GITHUB_SERVER_URL##https:\/\/}" >> $GITHUB_ENV
33+
34+
# Drafts your next Release notes as Pull Requests are merged into "main"
35+
- uses: release-drafter/release-drafter@v6
36+
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
37+
# with:
38+
# config-name: my-config.yml
39+
# disable-autolabeler: true
40+
env:
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@ docs/objects.inv
1515

1616
simpa_tests/figures
1717
simpa_tests/figures/*
18+
simpa_tests/**/figures
19+
simpa_tests/**/figures/*
20+
simpa_tests/manual_tests/figures
21+
simpa_tests/manual_tests/reference_figures
22+
simpa_tests/manual_tests/manual_tests_*
23+
24+
simpa_examples/benchmarking/*.csv
25+
simpa_examples/benchmarking/*.txt
1826

1927
path_config.env
2028

@@ -143,6 +151,9 @@ dmypy.json
143151
.idea/*
144152
/*/.idea/*/
145153

154+
#VSCode
155+
.vscode/
156+
146157
# numpy files
147158
*npy
148159
/.mailmap

.pre-commit-config.yaml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ repos:
2323
types: [python]
2424
args:
2525
- --license-filepath
26-
- license_header.txt # defaults to: LICENSE.txt
26+
- .pre_commit_configs/license_header.txt # defaults to: LICENSE.txt
2727

2828
- repo: https://github.com/jorisroovers/gitlint # Uses MIT License (MIT compatible)
2929
rev: v0.19.1
@@ -36,6 +36,19 @@ repos:
3636
- id: markdown-link-check # checks if links in markdown files work
3737
exclude: docs/
3838
types: [markdown]
39+
args:
40+
- -c
41+
- .pre_commit_configs/link-config.json
42+
always_run: true
43+
44+
- repo: local
45+
hooks:
46+
- id: build-sphinx-docs
47+
name: Build Sphinx documentation
48+
entry: make -C docs html # builds the sphinx documentation
49+
language: system
50+
pass_filenames: false
51+
always_run: true
3952

4053
# toggle comment to perform git config user email check. Note that you have to place the check-email.sh script in your .git/hooks/ folder
4154
# - repo: local
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"ignorePatterns": [
3+
{
4+
"pattern": "https://doi.org/10.1117/1.JBO.27.8.083010"
5+
}
6+
]
7+
}

.readthedocs.yaml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,16 @@ version: 2
44
# Set the version of Python and other tools you might need
55
build:
66
os: ubuntu-22.04
7-
tools: {python: "3.10"}
8-
jobs:
9-
post_create_environment:
10-
- pip install poetry
11-
post_install:
12-
- VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH poetry install --with docs
7+
tools:
8+
python: "3.10"
139

1410
# Build documentation in the docs/ directory with Sphinx
1511
sphinx:
1612
builder: html
1713
configuration: docs/source/conf.py
1814
fail_on_warning: false
1915

16+
# Python configuration
2017
python:
2118
install:
2219
- method: pip

CONTRIBUTING.md

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -25,23 +25,27 @@ Once you reached out to us, you will be provided with the information on how to
2525
In general the following steps are involved during a contribution:
2626

2727
### Contribution process
28-
1. Create feature request / bug report on the [SIMPA issues page](https://github.com/IMSY-DKFZ/simpa/issues)
29-
2. Discuss potential contribution with core development team
30-
3. Fork the [SIMPA repository](https://github.com/IMSY-DKFZ/simpa)
31-
4. Create feature branch from develop using the naming convention T<Issue#>_<FeatureName>,
32-
where <Issue#> represent the number github assigned the created issue and <FeatureName> describes
33-
what is being developed in CamelCaseNotation.
34-
Examples: `T13_FixSimulatorBug`, `T27_AddNewSimulator`
35-
36-
5. Perform test driven development on feature branch.
37-
A new implemented feature / a bug fix should be accompanied by a test.
38-
Additionally, all previously existing tests must still pass after the contribution.
39-
6. Run pre-commit hooks and make sure all hooks are passing.
40-
7. Once development is finished, create a pull request including your changes.
41-
For more information on how to create pull request, see GitHub's [about pull requests](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests).
42-
8. A member of the core development team will review your pull request and potentially require further changes
43-
(see [Contribution review and integration](#contribution-review-and-integration)).
44-
Once all remarks have been resolved, your changes will be merged into the develop branch.
28+
1. Create feature request / bug report on the [SIMPA issues page](https://github.com/IMSY-DKFZ/simpa/issues)
29+
2. Discuss potential contribution with core development team
30+
3. Fork the [SIMPA repository](https://github.com/IMSY-DKFZ/simpa)
31+
4. Make sure that you've installed all the optional dependencies by running `pip install .[docs,profile,testing]`
32+
in the root directory of the repository.
33+
5. Create feature branch from develop using the naming convention T<Issue#>_<FeatureName>,
34+
where <Issue#> represents the number Github assigned the created issue and <FeatureName> describes
35+
what is being developed in CamelCaseNotation.
36+
Examples: `T13_FixSimulatorBug`, `T27_AddNewSimulator`
37+
6. Perform test driven development on a feature branch.
38+
A new implemented feature / a bug fix should be accompanied by a test.
39+
Additionally, all previously existing tests must still pass after the contribution.
40+
7. Run pre-commit hooks and make sure all hooks are passing.
41+
8. Please also make sure that you benchmark your contributions please use the benchmarking bash script (see [benchmarking.md](docs/source/benchmarking.md) for more details).
42+
Please add the results to the PR and compare them to the current develop.
43+
9. Once development is finished, create a pull request including your changes.
44+
For more information on how to create pull request, see GitHub's [about pull requests](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests).
45+
10. If there are conflicts between the simpa develop branch and your branch, you should update your feature branch with the simpa develop branch using a "merge" strategy instead of "rebase".
46+
11. A member of the core development team will review your pull request and potentially require further changes
47+
(see [Contribution review and integration](#contribution-review-and-integration)).
48+
Once all remarks have been resolved, your changes will be merged into the develop branch.
4549

4650
For each contribution, please make sure to consider the following:
4751

0 commit comments

Comments
 (0)