Skip to content

Commit 8ed1719

Browse files
committed
[ci] update jnifti unit, add Makefile, fix ci error
1 parent 7ee6339 commit 8ed1719

3 files changed

Lines changed: 265 additions & 143 deletions

File tree

.github/workflows/run_test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ on: [push]
44

55
jobs:
66
build:
7-
runs-on: ubuntu-20.04
7+
runs-on: ubuntu-22.04
88
strategy:
99
matrix:
10-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
10+
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
1111

1212
steps:
1313
- uses: actions/checkout@v3

Makefile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
2+
PY=python3
3+
4+
all: pretty test build
5+
pretty:
6+
$(PY) -m black test/*.py jdata/*.py setup.py
7+
8+
test:
9+
$(PY) -m unittest discover -v test
10+
11+
build:
12+
$(PY) -m build
13+
14+
report:
15+
@echo '====== all imported functions ======'
16+
@grep '^\s*[a-z]*,' jdata/__init__.py | sed -e 's/^\s*//g' -e 's/,//g' | sort | uniq -c
17+
@echo '====== all tested functions ======'
18+
@grep 'def\s*test' test/run_test.py | sed -e 's/\s*def test_//g' -e 's/(self)://g' -e 's/_.*//g' | sort | uniq -c
19+
20+
.DEFAULT_GOAL=all
21+
.PHONY: all pretty test report

0 commit comments

Comments
 (0)