Skip to content

Commit

Permalink
updates from internal repository
Browse files Browse the repository at this point in the history
  • Loading branch information
JanSellner committed Aug 5, 2024
1 parent 56d9c75 commit 80c0b66
Show file tree
Hide file tree
Showing 170 changed files with 57,123 additions and 39,622 deletions.
7 changes: 4 additions & 3 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ max_line_length = 120
# B007: it can be intended to name loop variables even if they are not used
# B023: leads to a lot of false alarms at the moment: https://github.com/PyCQA/flake8-bugbear/issues/269
# B027: it is totally valid to prepare more methods in an abstract class without forcing them to be abstract
# B028: currently broken: https://github.com/PyCQA/flake8-bugbear/issues/329
# D*: pydocstyle has a lot of irrelevant checks by default. We are mainly interested in D417 (checks for missing arguments)
ignore = B007, B023, B027, B028, C408, E203, E501, E721, E731, E741, W503, F841, D1, D200, D202, D205, D212, D400, D401, D402, D415
ignore = B007, B023, B027, C408, E203, E501, E721, E731, E741, W503, F841, D1, D200, D202, D205, D212, D400, D401, D402, D415
extend-select = B902, B904
per_file_ignores = __init__.py: F401
docstring-convention=google
docstring-convention = google
# rich has a print function which is explicitly named the same way for easy replacement
builtins-ignorelist = print
9 changes: 6 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,24 @@
name: 🐛 Bug report
about: Create a report to help us improve
title: "[Bug]"
labels: ''
assignees: ''

labels: ""
assignees: ""
---

## :bug: Bug

<!-- Thank you for taking the time to fill this bug report! -->

### Description

<!-- Please describe the bug as concise as possible. What is the error message? Did you change something? -->

### Dataset

Which dataset are you using? [`HeiPorSPECTRAL` | `private`]

<!-- Anything else which could be relevant regarding the dataset? -->

### Environment

<!-- Please run `htc info`, remove any private information and report the results here -->
5 changes: 2 additions & 3 deletions .github/ISSUE_TEMPLATE/dataset.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
name: 🌈 Dataset
about: Everything related to the public HeiPorSPECTRAL dataset
title: "[Dataset]"
labels: ''
assignees: ''

labels: ""
assignees: ""
---

## :rainbow: Dataset
Expand Down
7 changes: 3 additions & 4 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
name: 🧗 Feature request
about: Suggest an idea for this project
title: '[Feature]'
labels: ''
assignees: ''

title: "[Feature]"
labels: ""
assignees: ""
---

## :climbing: Feature
Expand Down
5 changes: 2 additions & 3 deletions .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
name: ❓ Question
about: Ask a question
title: "[Question]"
labels: ''
assignees: ''

labels: ""
assignees: ""
---

## :question: Question
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/dataset.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.9', '3.10', '3.11']
python-version: ["3.9", "3.10", "3.11"]

steps:
- name: Checkout files
Expand All @@ -51,11 +51,11 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache: "pip"

- name: Install htc package
run: pip install imsy-htc

- name: Run example
env:
PATH_Tivita_HeiPorSPECTRAL: HeiPorSPECTRAL_example
Expand Down
32 changes: 16 additions & 16 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,25 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.11']
python-version: ["3.11"]

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: 'requirements*.txt'
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
cache-dependency-path: "requirements*.txt"

- name: Install dependencies
run: |
pip install -r requirements.txt
pip install pytest wheel
- name: Install dependencies
run: |
pip install -r requirements.txt
pip install pytest wheel
- name: Install htc
run: pip install --no-use-pep517 -e .
- name: Install htc
run: pip install --no-use-pep517 -e .

- name: Tests
run: py.test --doctest-modules --import-mode=importlib --collect-only .
- name: Tests
run: py.test --doctest-modules --import-mode=importlib --collect-only .
46 changes: 44 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Order plays a role here: we first need to run pyupgrade because it changes the code and the new code may not be correctly formatted so we need to run black afterwards. flake8 again should be run after black so that it doesn't e.g. complain about whitespace issues.
repos:
- repo: https://github.com/asottile/pyupgrade
rev: v3.15.0
rev: v3.15.2
hooks:
- id: pyupgrade
args: [--py39-plus]
Expand All @@ -22,6 +22,7 @@ repos:
- flake8-comprehensions
- flake8-use-pathlib
- flake8-docstrings
- flake8-builtins
- repo: https://github.com/asottile/yesqa
rev: v1.5.0
hooks:
Expand All @@ -31,8 +32,9 @@ repos:
- flake8-comprehensions
- flake8-use-pathlib
- flake8-docstrings
- flake8-builtins
- repo: https://github.com/nbQA-dev/nbQA
rev: 1.7.1
rev: 1.8.5
hooks:
- id: nbqa-pyupgrade
args: [--py39-plus]
Expand All @@ -43,7 +45,14 @@ repos:
- flake8-comprehensions
- flake8-use-pathlib
- flake8-docstrings
- flake8-builtins
args: ["--extend-ignore=E402"]
# Avoid potential problems with py.test if __init__.py files are missing
- repo: https://github.com/lk16/detect-missing-init
rev: v0.1.6
hooks:
- id: detect-missing-init
args: ["--create", "--python-folders", "htc"]
- repo: https://github.com/citation-file-format/cff-converter-python
rev: "44e8fc9"
hooks:
Expand All @@ -56,3 +65,36 @@ repos:
rev: 1.7.0
hooks:
- id: pyproject-fmt
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-yaml
- id: check-toml
- id: trailing-whitespace
- id: check-case-conflict
- id: debug-statements
- id: name-tests-test
args: [--pytest-test-first]
- id: mixed-line-ending
- id: end-of-file-fixer
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.1.0
hooks:
- id: prettier
- repo: local
hooks:
- id: check-notebooks
name: Check notebooks for common errors
entry: python hooks/check_notebooks.py
language: system
types: [jupyter]
- id: check-public-readme
name: Check for common mistakes in the public README
entry: python hooks/check_public_readme.py
language: system
types: [file]
files: ^README_public.md$
- repo: meta
hooks:
- id: check-hooks-apply
- id: check-useless-excludes
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ identifiers:
value: 10.5281/zenodo.6577614
repository-code: "https://github.com/IMSY-DKFZ/htc"
license: MIT
version: v0.0.15
date-released: "2024-02-05"
version: v0.0.16
date-released: "2024-08-05"
2 changes: 1 addition & 1 deletion LICENSES/MIT.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
SOFTWARE.
Loading

0 comments on commit 80c0b66

Please sign in to comment.