Skip to content

Commit 80bdcff

Browse files
author
Brandon RichardWebster
committed
Merge branch 'update-to-v0.23' into 'release'
Update to v0.23 See merge request jatic/kitware/nrtk!326
2 parents 6008a95 + 421b413 commit 80bdcff

176 files changed

Lines changed: 5547 additions & 3084 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.

‎.gitignore‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ instance/
7373
# Sphinx documentation
7474
docs/_build/
7575
docs/_implementations
76-
docs/nrtk_jatic/_implementations
76+
docs/maite/_implementations
7777

7878
# PyBuilder
7979
.pybuilder/

‎.gitlab-ci/.gitlab-container.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
###############################################################################
22
# Stage -- Container
33
###############################################################################
4-
#
4+
#
55
# Overrides:
6-
#
6+
#
77
# 1) Uses this repository's Dockerfile(s)
88
###############################################################################
99
trigger_aukus:
1010
extends: .trigger_containers
1111
variables:
1212
CONTAINER_NAME: "aukus"
1313
DOCKERFILE_FILE: "Dockerfile"
14-
PIPELINE_CONTEXT: "$CI_PIPELINE_SOURCE"
14+
PIPELINE_CONTEXT: "$CI_PIPELINE_SOURCE"

‎.gitlab-ci/.gitlab-docs.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@
1111
.docs-setup:
1212
before_script:
1313
- !reference [.shared-setup, before_script]
14-
- poetry install --sync --only main,docs,tests,linting --extras "pybsm headless maite"
14+
- poetry install --sync --only main,docs,tests,linting --extras "pybsm headless maite waterdroplet"

‎.gitlab-ci/.gitlab-test.yml‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,16 @@
88
# 2) Poetry install for optional dependencies
99
#
1010
###############################################################################
11-
pytest-core:
12-
# Temporary allow failure for missing import guards
13-
allow_failure: true
1411

1512
pytest-extras:
16-
allow_failure: false
1713
variables:
1814
EXTRAS: "pybsm maite tools headless Pillow scikit-image albumentations waterdroplet notebook-testing"
1915

2016
notebooks:
2117
extends: .notebooks
2218
rules: !reference [.notebooks, rules]
2319
variables:
24-
EXTRAS: "pybsm maite tools headless Pillow scikit-image albumentations notebook-testing"
20+
EXTRAS: "pybsm maite tools headless Pillow scikit-image albumentations waterdroplet notebook-testing"
2521
parallel:
2622
matrix:
2723
# Sequences combinatorically combine within a list entry
@@ -53,6 +49,7 @@ notebooks:
5349
"nrtk_lens_flare_demo.ipynb",
5450
"nrtk_translation_perturber_demo.ipynb",
5551
"nrtk_turbulence_perturber_demo.ipynb",
52+
"nrtk_water_droplet_perturber_demo.ipynb"
5653
]
5754
- NOTEBOOK_DIR: "docs/examples/maite/gradio"
5855
NOTEBOOK_FILE: [

‎.pre-commit-config.yaml‎

Lines changed: 48 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,49 @@
11
repos:
2-
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v4.6.0
4-
hooks:
5-
- id: trailing-whitespace
6-
- id: end-of-file-fixer
7-
- id: check-added-large-files
8-
args:
9-
# the unit here is acutally KiB (1024 bytes)
10-
- '--maxkb=51200' # match github max of 50MiB
11-
- repo: local
12-
hooks:
13-
- id: ruff-lint
14-
name: ruff-lint
15-
entry: poetry run ruff check --config pyproject.toml --fix --force-exclude
16-
require_serial: true
17-
language: system
18-
types_or: [python, pyi, jupyter]
19-
- id: sphinx-lint
20-
name: sphinx-lint
21-
entry: poetry run sphinx-lint --enable all --disable leaked-markup --jobs 1 --max-line-length 120 -i docs/_implementations -i docs/nrtk_jatic/_implementations docs
22-
types: [rst]
23-
language: system
24-
- id: ruff-format
25-
name: ruff-format
26-
entry: poetry run ruff format --config pyproject.toml --force-exclude
27-
require_serial: true
28-
language: system
29-
types_or: [python, pyi, jupyter]
30-
- id: pyright
31-
name: pyright
32-
require_serial: true
33-
language: system
34-
entry: poetry run pyright
35-
types: [file, python]
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v5.0.0
4+
hooks:
5+
- id: trailing-whitespace
6+
- id: end-of-file-fixer
7+
- id: check-added-large-files
8+
args:
9+
# the unit here is acutally KiB (1024 bytes)
10+
- '--maxkb=51200' # match github max of 50MiB
11+
- repo: https://github.com/hukkin/mdformat
12+
rev: 0.7.22 # Use the ref you want to point at
13+
hooks:
14+
- id: mdformat
15+
name: mdformat-lint
16+
args: [--wrap=80, --number]
17+
types: [markdown]
18+
- repo: https://github.com/hukkin/mdformat
19+
rev: 0.7.22 # Use the ref you want to point at
20+
hooks:
21+
- id: mdformat
22+
name: mdformat-format
23+
args: [--wrap=80, --number, --check]
24+
types: [markdown]
25+
- repo: local
26+
hooks:
27+
- id: ruff-lint
28+
name: ruff-lint
29+
entry: poetry run ruff check --config pyproject.toml --fix --force-exclude
30+
require_serial: true
31+
language: system
32+
types_or: [python, pyi, jupyter]
33+
- id: sphinx-lint
34+
name: sphinx-lint
35+
entry: poetry run sphinx-lint --enable all --disable leaked-markup --jobs 1 --max-line-length 120 -i docs/_implementations -i docs/maite/_implementations docs
36+
types: [rst]
37+
language: system
38+
- id: ruff-format
39+
name: ruff-format
40+
entry: poetry run ruff format --config pyproject.toml --force-exclude
41+
require_serial: true
42+
language: system
43+
types_or: [python, pyi, jupyter]
44+
- id: pyright
45+
name: pyright
46+
require_serial: true
47+
language: system
48+
entry: poetry run pyright
49+
types: [file, python]

‎.readthedocs.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ build:
1515
# https://python-poetry.org/docs/managing-dependencies/#dependency-groups
1616
# VIRTUAL_ENV needs to be set manually for now.
1717
# See https://github.com/readthedocs/readthedocs.org/pull/11152/
18-
- VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH poetry install --with main,docs,tests --extras "pybsm headless maite"
18+
- VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH poetry install --with main,docs,tests --extras "pybsm headless maite waterdroplet"
1919

2020
sphinx:
2121
builder: html

‎CONTRIBUTING.md‎

Lines changed: 69 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
11
# Contributing to `nrtk`
22

33
## Overview
4-
This guide provides instructions for contributing to the `nrtk` project. For additional details, please refer to the [`nrtk` README](README.md).
4+
5+
This guide provides instructions for contributing to the `nrtk` project.
6+
For additional details, please refer to the [`nrtk` README](README.md).
57

68
## Steps to Contribute
79

8-
1. **Access the Repository**
9-
Navigate to the official `nrtk` repository on [JATIC GitLab](https://gitlab.jatic.net/jatic/kitware/nrtk).
10+
1. **Access the Repository** Navigate to the official `nrtk` repository
11+
on [JATIC GitLab](https://gitlab.jatic.net/jatic/kitware/nrtk).
1012

11-
2. **Fork and Clone**
12-
Fork the repository into your GitLab user namespace and clone it to your local system.
13+
2. **Fork and Clone** Fork the repository into your GitLab user namespace and
14+
clone it to your local system.
1315

1416
```bash
1517
$ git clone <your-fork-url>
1618
$ cd nrtk
1719
```
1820

19-
3. **Create a Topic Branch**
20-
Work on a new topic branch for your contribution:
21+
3. **Create a Topic Branch** Work on a new topic branch for your contribution:
2122

2223
```bash
2324
$ git checkout -b <branch-name>
@@ -26,69 +27,105 @@ This guide provides instructions for contributing to the `nrtk` project. For add
2627
$ git commit -m "Descriptive commit message"
2728
```
2829

29-
- Ensure that your commits include an update to the `docs/release_notes/pending_release.rst` file (or a relevant patch release notes file).
30-
- Provide a concise summary of the feature, update, or fix being added. This is generally required for approval.
30+
- Ensure that your commits include an update to the
31+
`docs/release_notes/pending_release.rst` file (or a relevant patch release
32+
notes file).
33+
- Provide a concise summary of the feature, update, or fix being added. This
34+
is generally required for approval.
3135

32-
4. **Push Your Branch**
33-
Push your changes to your forked repository:
36+
4. **Push Your Branch** Push your changes to your forked repository:
3437

3538
```bash
3639
$ git push origin HEAD -u
3740
```
3841

39-
5. **Create a Merge Request (MR)**
40-
On GitLab, navigate to the "Merge Requests" tab of your forked project and click "New merge request."
42+
5. **Create a Merge Request (MR)** On GitLab, navigate to the "Merge Requests"
43+
tab of your forked project and click "New merge request."
4144

42-
- Set the source branch to your forked branch and the target branch to the appropriate branch of the `nrtk` repository.
45+
- Set the source branch to your forked branch and the target branch to the
46+
appropriate branch of the `nrtk` repository.
4347
- Click "Compare branches and continue" and then "Create merge request."
4448

45-
---
49+
______________________________________________________________________
4650

4751
## Continuous Integration (CI) and Code Review
48-
`nrtk` uses GitLab for code reviews and GitLab CI/CD for automated testing.
52+
53+
`nrtk` uses GitLab for code reviews and GitLab CI/CD for automated
54+
testing.
55+
4956
- New MRs trigger CI workflows for `master` and `release` branches.
5057
- All CI checks must pass before an MR can be merged.
5158

52-
We use [Sphinx](https://www.sphinx-doc.org/) for API documentation, both manual and automated.
59+
We use [Sphinx](https://www.sphinx-doc.org/) for API documentation, both manual
60+
and automated.
5361

54-
---
62+
______________________________________________________________________
5563

5664
## Guidelines for Jupyter Notebooks
65+
5766
When adding or modifying Jupyter Notebooks:
5867

5968
1. **CI Inclusion**
60-
- Ensure notebooks are part of the CI workflow and executable within its environment.
61-
- Add references to `.gitlab-ci/.gitlab-test.yml` and to `tests/examples/test_notebooks.py`.
69+
70+
- Ensure notebooks are part of the CI workflow and executable within its
71+
environment.
72+
- Add references to `.gitlab-ci/.gitlab-test.yml` and to
73+
`tests/examples/test_notebooks.py`.
6274

6375
2. **Execution Requirements**
76+
6477
- Keep execution concise to avoid CI timeouts.
65-
- Include a cell for dependency installation (e.g., `pip install ...`) to ensure proper setup in the CI environment.
78+
- Include a cell for dependency installation (e.g., `pip install ...`) to
79+
ensure proper setup in the CI environment.
6680

6781
3. **Resource Constraints**
68-
- Optimize notebooks to use minimal computational resources, aligning with CI environment limitations.
6982

70-
---
83+
- Optimize notebooks to use minimal computational resources, aligning with CI
84+
environment limitations.
85+
86+
______________________________________________________________________
7187

7288
## Contribution Release Notes
73-
Typically, every contribution requires an associated release note. Add this to the `docs/release_notes/pending_release.rst` file, summarizing the changes made.
89+
90+
Typically, every contribution requires an associated release note. Add this to
91+
the `docs/release_notes/pending_release.rst` file, summarizing the changes made.
7492

7593
### Exceptions
76-
If your contribution fixes a minor issue in a recent update and does not alter the summary in existing release notes, the requirement may be waived.
77-
- Contributors should explain why a release note is unnecessary for the reviewers to consider on a case-by-case basis.
7894

79-
---
95+
If your contribution fixes a minor issue in a recent update and does not alter
96+
the summary in existing release notes, the requirement may be waived.
97+
98+
- Contributors should explain why a release note is unnecessary for the
99+
reviewers to consider on a case-by-case basis.
100+
101+
______________________________________________________________________
80102

81103
## Class Naming Philosophy
82-
We adopt a "Verb-Noun" convention for class names. This structure highlights the behavior or transformation a class performs.
104+
105+
We adopt a "Verb-Noun" convention for class names. This structure highlights the
106+
behavior or transformation a class performs.
107+
83108
- **Verb**: Indicates the primary action or behavior.
84-
- **Noun**: Specifies the subject of the action, typically related to input or output.
109+
- **Noun**: Specifies the subject of the action, typically related to input or
110+
output.
85111

86112
### Examples
87-
- Classes performing similar actions on different subjects should clearly differentiate the subjects in their names.
113+
114+
- Classes performing similar actions on different subjects should clearly
115+
differentiate the subjects in their names.
88116
- Names should be concise and intuitive, aiding user understanding.
89117

90118
## Issue Reporting
91-
If an issue is found, it can be reported on the [Issue Reporting Page](https://github.com/Kitware/nrtk/issues/new). In the description, provide an outline of the problem in as much detail as possible being sure to include any relevant logs and error tracebacks. Once the issue is created, it will be triaged by a maintainer in a timely manner.
119+
120+
If an issue is found, it can be reported on the
121+
[Issue Reporting Page](https://github.com/Kitware/nrtk/issues/new). In
122+
the description, provide an outline of the problem in as much detail as possible
123+
being sure to include any relevant logs and error tracebacks. Once the issue is
124+
created, it will be triaged by a maintainer in a timely manner.
92125

93126
## Feature Requests
94-
If a user wants to request a new feature, it can be reported in the same location as the issues. In the issue created for feature requests, begin the title with `FEATURE REQUEST`. The issue should also include a `Use Case` section describing the intended use case of the new feature.
127+
128+
If a user wants to request a new feature, it can be reported in the same
129+
location as the issues. In the issue created for feature requests, begin the
130+
title with `FEATURE REQUEST`. The issue should also include a `Use Case` section
131+
describing the intended use case of the new feature.

‎Dockerfile‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ ENV PYTHONUNBUFFERED=1 \
1616
# do not ask for any interaction
1717
POETRY_NO_INTERACTION=1 \
1818
# this is where we copy the lock
19-
PYSETUP_PATH="/opt/pysetup"
19+
PYSETUP_PATH="/opt/pysetup"
2020

2121
# prepend poetry and venv to path
2222
ENV PATH="$POETRY_HOME/bin:$PATH"
@@ -55,5 +55,5 @@ CMD ["/root/input/dataset", "/root/output/", \
5555
# To run this docker container, use the following command:
5656
# `docker run -v /path/to/input:/root/input/:ro -v /path/to/output:/root/output/ nrtk-perturber`
5757
# This will mount the inputs to the correct locations the default args are used.
58-
# See https://docs.docker.com/storage/volumes/#start-a-container-with-a-volume
58+
# See https://docs.docker.com/storage/volumes/#start-a-container-with-a-volume
5959
# for more info on mounting volumes

0 commit comments

Comments
 (0)