Skip to content

Commit b9af090

Browse files
committed
Code release v0.2.0
1 parent 1409624 commit b9af090

File tree

175 files changed

+13699
-6217
lines changed

Some content is hidden

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

175 files changed

+13699
-6217
lines changed

.github/workflows/pre-commit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
strategy:
1212
matrix:
13-
python-version: ["3.8"]
13+
python-version: ["3.9"]
1414
steps:
1515
- name: Checkout repository
1616
uses: actions/checkout@v3

.github/workflows/unit-test.yml

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,18 @@
11
name: unit-test
22

33
on:
4-
schedule:
5-
- cron: "0 0 * * *"
6-
workflow_dispatch:
7-
# Trigger the workflow on push or pull request,
8-
# but only for the main branch
9-
push:
10-
branches:
11-
- main
124
pull_request:
13-
branches:
14-
- main
5+
push:
6+
branches: [main]
157

168
jobs:
179
build:
18-
runs-on: ubuntu-latest
10+
runs-on: ubuntu-20.04
11+
timeout-minutes: 30
1912
strategy:
2013
matrix:
21-
python-version: ["3.8"]
14+
group: [1, 2, 3, 4]
15+
python-version: ["3.9"]
2216

2317
steps:
2418
- name: Checkout repository
@@ -37,11 +31,13 @@ jobs:
3731
- name: Install dependencies
3832
run: |
3933
python -m pip install --upgrade pip
40-
pip install tensorflow-cpu==2.11.0
41-
pip install jax==0.4.1
42-
pip install jaxlib==0.4.1
34+
pip install tensorflow-cpu==2.12.0
35+
pip install jax==0.4.8
36+
pip install jaxlib==0.4.7
4337
pip install -r docker/requirements.txt
44-
pip install -e .
38+
pip install -e imgx
39+
pip install -e imgx_datasets
4540
- name: Test with pytest
4641
run: |
47-
pytest tests/unit
42+
pytest --splits 4 --group ${{ matrix.group }} --randomly-seed=0 -k "not slow" imgx/tests/unit
43+
pytest --splits 4 --group ${{ matrix.group }} --randomly-seed=0 -k "not slow" imgx_datasets/tests

.pre-commit-config.yaml

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,37 @@ repos:
2727
hooks:
2828
- id: isort
2929
- repo: https://github.com/psf/black
30-
rev: 23.1.0
30+
rev: 23.7.0
3131
hooks:
3232
- id: black
3333
args:
3434
- --line-length=80
3535
- repo: https://github.com/pre-commit/mirrors-mypy
36-
rev: v1.1.1
37-
hooks:
36+
rev: v1.4.1
37+
hooks: # https://github.com/python/mypy/issues/4008#issuecomment-582458665
38+
- id: mypy
39+
name: mypy-imgx
40+
files: ^imgx/
41+
entry: mypy imgx/
42+
pass_filenames: false
43+
args:
44+
[
45+
--strict-equality,
46+
--disallow-untyped-calls,
47+
--disallow-untyped-defs,
48+
--disallow-incomplete-defs,
49+
--check-untyped-defs,
50+
--disallow-untyped-decorators,
51+
--warn-redundant-casts,
52+
--warn-unused-ignores,
53+
--no-warn-no-return,
54+
--warn-unreachable,
55+
]
3856
- id: mypy
57+
name: mypy-imgx_datasets
58+
files: ^imgx_datasets/
59+
entry: mypy imgx_datasets/
60+
pass_filenames: false
3961
args:
4062
[
4163
--strict-equality,
@@ -50,29 +72,27 @@ repos:
5072
--warn-unreachable,
5173
]
5274
- repo: https://github.com/pre-commit/mirrors-prettier
53-
rev: v3.0.0-alpha.6
75+
rev: v3.0.0
5476
hooks:
5577
- id: prettier
5678
args:
5779
- --print-width=80
5880
- --prose-wrap=always
5981
- --tab-width=2
6082
- repo: https://github.com/charliermarsh/ruff-pre-commit
61-
rev: "v0.0.254"
83+
rev: "v0.0.280"
6284
hooks:
6385
- id: ruff
6486
- repo: https://github.com/pre-commit/mirrors-pylint
6587
rev: v3.0.0a5
6688
hooks:
6789
- id: pylint
6890
- repo: https://github.com/asottile/pyupgrade
69-
rev: v3.3.1
91+
rev: v3.9.0
7092
hooks:
7193
- id: pyupgrade
7294
args:
73-
- --py36-plus
74-
- --py37-plus
75-
- --py38-plus
95+
- --py39-plus
7696
- repo: https://github.com/pycqa/pydocstyle
7797
rev: 6.3.0
7898
hooks:

Makefile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
pip:
2+
pip install -e imgx
3+
pip install -e imgx_datasets
4+
5+
test:
6+
pytest --cov=imgx -n 4 imgx/tests -x
7+
pytest --cov=imgx_datasets -n 4 imgx_datasets/tests -x
8+
9+
build_dataset:
10+
tfds build imgx_datasets/imgx_datasets/male_pelvic_mr &
11+
tfds build imgx_datasets/imgx_datasets/amos_ct &
12+
tfds build imgx_datasets/imgx_datasets/muscle_us &
13+
tfds build imgx_datasets/imgx_datasets/brats2021_mr &
14+
15+
rebuild_dataset:
16+
tfds build imgx_datasets/imgx_datasets/male_pelvic_mr --overwrite &
17+
tfds build imgx_datasets/imgx_datasets/amos_ct --overwrite &
18+
tfds build imgx_datasets/imgx_datasets/muscle_us --overwrite &
19+
tfds build imgx_datasets/imgx_datasets/brats2021_mr --overwrite &

0 commit comments

Comments
 (0)