Skip to content

Commit

Permalink
maybe it's poetry?
Browse files Browse the repository at this point in the history
  • Loading branch information
skim2257 committed May 17, 2024
1 parent 0b754ca commit c725ca3
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
19 changes: 11 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,17 @@ jobs:
uses: abatilo/actions-poetry@v2
with:
poetry-version: 1.8.2
- name: Install the project dependencies
run: poetry install --with dev

- name: Test with pytest
run: |
# Github action runners now have 4 cores
poetry run pytest tests -s -v -n 4 --cov --cov-report xml:coverage-report/coverage.xml
# - name: Install the project dependencies
# run: poetry install --with dev
# - name: Test with pytest
# run: |
# # Github action runners now have 4 cores
# poetry run pytest tests -s -v -n 4 --cov --cov-report xml:coverage-report/coverage.xml
- name: Pip install
run: pip install .
- name: Run tests
run: pip install pytest && pytest tests -v

- name: Upload coverage report artifact to be used by Codecov
# only upload if matrix.os is ubuntu-latest and matrix.python-version is 3.12
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'
Expand Down
1 change: 1 addition & 0 deletions src/imgtools/io/loaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ def read_dicom_auto(path, series=None, file_names=None):
dcms = [path]
else:
dcms = glob.glob(pathlib.Path(path, "*.dcm").as_posix())

for dcm in dcms:
meta = dcmread(dcm)
if meta.SeriesInstanceUID != series and series is not None:
Expand Down
4 changes: 4 additions & 0 deletions tests/test_modalities.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,17 @@
@pytest.fixture
def modalities_path():
curr_path = pathlib.Path(__file__).parent.parent.resolve()
print(os.listdir(curr_path))

# qc_path = pathlib.Path(os.path.join(curr_path, "data", "Head-Neck-PET-CT", "HN-CHUS-082"))
# path = {}
# path["CT"] = os.path.join(qc_path, "08-27-1885-CA ORL FDG TEP-06980/3.000000-Merged-05195")
# path["RTSTRUCT"] = os.path.join(qc_path, "08-27-1885-06980/Pinnacle POI-67882")
# path["RTDOSE"] = os.path.join(qc_path, "08-27-1885-06980/89632")
# path["PT"] = os.path.join(qc_path, "08-27-1885-TEP cancerologique TEP-06980/552650.000000-LOR-RAMLA-72508")
qc_path = pathlib.Path(curr_path, "data", "Head-Neck-PET-CT", "HN-CHUS-052").as_posix()
assert os.path.exists(qc_path), "Dataset not found"

path = {}
path["CT"] = pathlib.Path(qc_path, "08-27-1885-CA ORL FDG TEP POS TX-94629/3.000000-Merged-06362").as_posix()
path["RTSTRUCT"] = pathlib.Path(qc_path, "08-27-1885-OrophCB.0OrophCBTRTID derived StudyInstanceUID.-94629/Pinnacle POI-41418").as_posix()
Expand Down

0 comments on commit c725ca3

Please sign in to comment.