Skip to content

Commit

Permalink
chore: create helper make command to rebuild project
Browse files Browse the repository at this point in the history
  • Loading branch information
IamGianluca committed Mar 24, 2024
1 parent 1bae4d8 commit 20072de
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 26 deletions.
10 changes: 9 additions & 1 deletion makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ format:
lint:
ruff check --fix

rebuild: compile sync install

compile:
uv pip compile --all-extras pyproject.toml -o requirements.txt

sync:
uv pip sync requirements.txt

install:
uv pip install -e ".[dev,medical]"

Expand All @@ -14,7 +22,7 @@ test:
pytest

coverage:
pytest --cov=blazingai tests
pytest --cov=blazingai

static-checks:
mypy . --ignore-missing-imports --exclude build/
11 changes: 11 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,14 @@ medical = [
"pylibjpeg-libjpeg>=1.3.2",
"pylibjpeg-openjpeg>=1.2.1",
]

[tool.pytest.ini_options]
testpaths = ["tests"]
norecursedirs = [
"*.egg-info",
".*",
"blazingai",
"build",
"dist",
]
markers = ["slow"]
38 changes: 13 additions & 25 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ antlr4-python3-runtime==4.9.3
# via omegaconf
asttokens==2.4.1
# via stack-data
async-timeout==4.0.3
# via aiohttp
attrs==23.2.0
# via
# aiohttp
Expand All @@ -35,10 +33,6 @@ dill==0.3.8
# via
# datasets
# multiprocess
exceptiongroup==1.2.0
# via
# ipython
# pytest
executing==2.0.1
# via stack-data
filelock==3.13.1
Expand Down Expand Up @@ -85,7 +79,7 @@ joblib==1.3.2
libcst==1.2.0
# via usort
lightning==2.2.1
lightning-utilities==0.10.1
lightning-utilities==0.11.0
# via
# lightning
# pytorch-lightning
Expand All @@ -112,9 +106,9 @@ mypy-extensions==1.0.0
# via
# mypy
# typing-inspect
networkx==3.1
networkx==3.2.1
# via torch
numpy==1.24.4
numpy==1.26.4
# via
# datasets
# lightning
Expand Down Expand Up @@ -171,7 +165,7 @@ packaging==24.0
# pytorch-lightning
# torchmetrics
# transformers
pandas==2.0.3
pandas==2.2.1
# via datasets
parso==0.8.3
# via jedi
Expand All @@ -189,7 +183,7 @@ ptyprocess==0.7.0
# via pexpect
pure-eval==0.2.2
# via stack-data
pyarrow==15.0.1
pyarrow==15.0.2
# via datasets
pyarrow-hotfix==0.6
# via datasets
Expand All @@ -198,11 +192,11 @@ pygments==2.17.2
# via ipython
pylibjpeg==2.0.0
pylibjpeg-libjpeg==2.0.2
pylibjpeg-openjpeg==2.1.1
pylibjpeg-openjpeg==2.2.0
pynvim==0.5.0
pytest==8.1.1
# via pytest-cov
pytest-cov==4.1.0
pytest-cov==5.0.0
python-dateutil==2.9.0.post0
# via pandas
pytorch-lightning==2.2.1
Expand All @@ -226,13 +220,13 @@ requests==2.31.0
# datasets
# huggingface-hub
# transformers
ruff==0.3.3
ruff==0.3.4
safetensors==0.4.2
# via
# timm
# transformers
scikit-learn==1.3.2
scipy==1.10.1
scikit-learn==1.4.1.post1
scipy==1.12.0
# via scikit-learn
sentencepiece==0.2.0
setuptools==69.2.0
Expand All @@ -247,27 +241,21 @@ stdlibs==2024.1.28
# via usort
sympy==1.12
# via torch
threadpoolctl==3.3.0
threadpoolctl==3.4.0
# via scikit-learn
timm==0.9.16
tokenizers==0.15.2
# via transformers
toml==0.10.2
# via usort
tomli==2.0.1
# via
# coverage
# ipdb
# mypy
# pytest
torch==2.2.1
# via
# lightning
# pytorch-lightning
# timm
# torchmetrics
# torchvision
torchmetrics==1.3.1
torchmetrics==1.3.2
# via
# lightning
# pytorch-lightning
Expand All @@ -286,7 +274,7 @@ traitlets==5.14.2
# via
# ipython
# matplotlib-inline
transformers==4.38.2
transformers==4.39.1
triton==2.2.0
# via torch
typing-extensions==4.10.0
Expand Down
1 change: 1 addition & 0 deletions tests/test_convert_images.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ def dicom_file(tmpdir_factory):
return Path(fpath)


@pytest.mark.slow
def test_happy_case(dicom_file, tmp_path):
# given
assert dicom_file.exists()
Expand Down

0 comments on commit 20072de

Please sign in to comment.