Skip to content

Commit

Permalink
better devel
Browse files Browse the repository at this point in the history
  • Loading branch information
afrendeiro committed Mar 29, 2024
1 parent f8fbf1d commit c46f586
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 1 deletion.
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,13 @@
__pycache__/
*.egg-info
build/
dist
.coverage
cache
junit
joblib
__pycache__
.mypy_cache
coverage.xml
_version.py
*.sublime-*
22 changes: 22 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
clean:
-rm -rf build
-rm -rf dist
-rm -rf *.egg-info
-rm -rf .coverage
-rm -rf cache
-rm -rf junit
-rm -rf joblib
-rm -rf __pycache__
-rm -rf .mypy_cache
# -rm -rf .pytest_cache

test: clean
pytest wsi \
--doctest-modules \
--junitxml=junit/test-results.xml \
--cov=wsi \
--cov-report=xml \
--cov-report=html

install: clean
python -m pip install -e .
2 changes: 1 addition & 1 deletion wsi/tests/test_wsi.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def get_test_slide():
path = Path(tempfile.NamedTemporaryFile().name)

with open(path, "wb") as file:
for chunk in requests.get(url, stream=True).iter_content(chunk_size=1024):
for chunk in requests.get(url, stream=True).iter_content(chunk_size=1024 * 4):
file.write(chunk)
return path

Expand Down
1 change: 1 addition & 0 deletions wsi/wsi.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

# TODO: replace contours_tumor with a generic label field
# TODO: make function to plot contours (colored by label field)
# TODO: replace pickle with geojson or hdf5


class WholeSlideImage(object):
Expand Down

0 comments on commit c46f586

Please sign in to comment.