Skip to content

Commit

Permalink
Merge pull request #383 from IMSY-DKFZ/develop
Browse files Browse the repository at this point in the history
Merge develop into main
  • Loading branch information
kdreher authored Aug 23, 2024
2 parents 7c082b8 + 0639887 commit 84c53b8
Show file tree
Hide file tree
Showing 178 changed files with 7,286 additions and 5,046 deletions.
32 changes: 32 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name-template: 'v$RESOLVED_VERSION 🌈'
tag-template: 'v$RESOLVED_VERSION'
categories:
- title: '🚀 Features'
labels:
- 'feature'
- 'enhancement'
- 'documentation'
- title: '🐛 Bug Fixes'
labels:
- 'fix'
- 'bugfix'
- 'bug'
- title: '🧰 Maintenance'
label: 'chore'
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
version-resolver:
major:
labels:
- 'major'
minor:
labels:
- 'minor'
patch:
labels:
- 'patch'
default: patch
template: |
## Changes
$CHANGES
2 changes: 1 addition & 1 deletion .github/workflows/automatic_testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
os: [ubuntu-latest, macos-latest, windows-latest]

steps:
Expand Down
53 changes: 43 additions & 10 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,53 @@
# Uploads the current version of the package to PyPI when commit are pushed to main (including merges via pull requests)
# Uploads the current version of the package to PyPI when publishing a release

name: Upload to PyPI

on:
push:
branches:
- main
release:
types: [published]

jobs:
build-and-publish:
release-build:
if: github.repository == 'IMSY-DKFZ/simpa'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build and publish to pypi
uses: JRubics/[email protected]
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.x"

- name: Build release distributions
run: |
python -m pip install build
python -m build
- name: Upload distributions
uses: actions/upload-artifact@v4
with:
name: release-dists
path: dist/

pypi-publish:
if: github.repository == 'IMSY-DKFZ/simpa'
runs-on: ubuntu-latest

needs:
- release-build

permissions:
id-token: write

environment:
name: pypi
url: https://pypi.org/project/simpa/

steps:
- name: Retrieve release distributions
uses: actions/download-artifact@v4
with:
pypi_token: ${{ secrets.PYPI_TOKEN }}
python_version: '3.10'
name: release-dists
path: dist/

- name: Publish release distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
41 changes: 41 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Release Drafter

on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- main
# pull_request event is required only for autolabeler
# pull_request:
# Only following types are handled by the action, but one can default to all as well
# types: [ opened, reopened, synchronize ]
# pull_request_target event is required for autolabeler to support PRs from forks
# pull_request_target:
# types: [opened, reopened, synchronize]

permissions:
contents: read

jobs:
update_release_draft:
permissions:
# write permission is required to create a github release
contents: write
# write permission is required for autolabeler
# otherwise, read permission is required at least
pull-requests: read
runs-on: ubuntu-latest
steps:
# (Optional) GitHub Enterprise requires GHE_HOST variable set
#- name: Set GHE_HOST
# run: |
# echo "GHE_HOST=${GITHUB_SERVER_URL##https:\/\/}" >> $GITHUB_ENV

# Drafts your next Release notes as Pull Requests are merged into "main"
- uses: release-drafter/release-drafter@v6
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
# with:
# config-name: my-config.yml
# disable-autolabeler: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ docs/objects.inv

simpa_tests/figures
simpa_tests/figures/*
simpa_tests/**/figures
simpa_tests/**/figures/*
simpa_tests/manual_tests/figures
simpa_tests/manual_tests/reference_figures
simpa_tests/manual_tests/manual_tests_*

simpa_examples/benchmarking/*.csv
simpa_examples/benchmarking/*.txt

path_config.env

Expand Down Expand Up @@ -143,6 +151,9 @@ dmypy.json
.idea/*
/*/.idea/*/

#VSCode
.vscode/

# numpy files
*npy
/.mailmap
15 changes: 14 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ repos:
types: [python]
args:
- --license-filepath
- license_header.txt # defaults to: LICENSE.txt
- .pre_commit_configs/license_header.txt # defaults to: LICENSE.txt

- repo: https://github.com/jorisroovers/gitlint # Uses MIT License (MIT compatible)
rev: v0.19.1
Expand All @@ -36,6 +36,19 @@ repos:
- id: markdown-link-check # checks if links in markdown files work
exclude: docs/
types: [markdown]
args:
- -c
- .pre_commit_configs/link-config.json
always_run: true

- repo: local
hooks:
- id: build-sphinx-docs
name: Build Sphinx documentation
entry: make -C docs html # builds the sphinx documentation
language: system
pass_filenames: false
always_run: true

# 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
# - repo: local
Expand Down
File renamed without changes.
7 changes: 7 additions & 0 deletions .pre_commit_configs/link-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"ignorePatterns": [
{
"pattern": "https://doi.org/10.1117/1.JBO.27.8.083010"
}
]
}
9 changes: 3 additions & 6 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,16 @@ version: 2
# Set the version of Python and other tools you might need
build:
os: ubuntu-22.04
tools: {python: "3.10"}
jobs:
post_create_environment:
- pip install poetry
post_install:
- VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH poetry install --with docs
tools:
python: "3.10"

# Build documentation in the docs/ directory with Sphinx
sphinx:
builder: html
configuration: docs/source/conf.py
fail_on_warning: false

# Python configuration
python:
install:
- method: pip
Expand Down
38 changes: 21 additions & 17 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,27 @@ Once you reached out to us, you will be provided with the information on how to
In general the following steps are involved during a contribution:

### Contribution process
1. Create feature request / bug report on the [SIMPA issues page](https://github.com/IMSY-DKFZ/simpa/issues)
2. Discuss potential contribution with core development team
3. Fork the [SIMPA repository](https://github.com/IMSY-DKFZ/simpa)
4. Create feature branch from develop using the naming convention T<Issue#>_<FeatureName>,
where <Issue#> represent the number github assigned the created issue and <FeatureName> describes
what is being developed in CamelCaseNotation.
Examples: `T13_FixSimulatorBug`, `T27_AddNewSimulator`

5. Perform test driven development on feature branch.
A new implemented feature / a bug fix should be accompanied by a test.
Additionally, all previously existing tests must still pass after the contribution.
6. Run pre-commit hooks and make sure all hooks are passing.
7. Once development is finished, create a pull request including your changes.
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).
8. A member of the core development team will review your pull request and potentially require further changes
(see [Contribution review and integration](#contribution-review-and-integration)).
Once all remarks have been resolved, your changes will be merged into the develop branch.
1. Create feature request / bug report on the [SIMPA issues page](https://github.com/IMSY-DKFZ/simpa/issues)
2. Discuss potential contribution with core development team
3. Fork the [SIMPA repository](https://github.com/IMSY-DKFZ/simpa)
4. Make sure that you've installed all the optional dependencies by running `pip install .[docs,profile,testing]`
in the root directory of the repository.
5. Create feature branch from develop using the naming convention T<Issue#>_<FeatureName>,
where <Issue#> represents the number Github assigned the created issue and <FeatureName> describes
what is being developed in CamelCaseNotation.
Examples: `T13_FixSimulatorBug`, `T27_AddNewSimulator`
6. Perform test driven development on a feature branch.
A new implemented feature / a bug fix should be accompanied by a test.
Additionally, all previously existing tests must still pass after the contribution.
7. Run pre-commit hooks and make sure all hooks are passing.
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).
Please add the results to the PR and compare them to the current develop.
9. Once development is finished, create a pull request including your changes.
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).
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".
11. A member of the core development team will review your pull request and potentially require further changes
(see [Contribution review and integration](#contribution-review-and-integration)).
Once all remarks have been resolved, your changes will be merged into the develop branch.

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

Expand Down
1 change: 0 additions & 1 deletion MANIFEST.in

This file was deleted.

Loading

0 comments on commit 84c53b8

Please sign in to comment.