Skip to content

Commit

Permalink
Shifting from setup.py to pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
FabianHoerst committed Oct 23, 2024
1 parent 8cc3142 commit 919c1d0
Show file tree
Hide file tree
Showing 6 changed files with 215 additions and 226 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,4 @@ test_database/dicom_leica
dpyproject.toml
mask_ihc.ipynb
pyproject.toml
test_output
3 changes: 1 addition & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ else
exit 1
fi

python setup.py sdist
python setup.py bdist_wheel
python -m build

echo -e "\nTo upload to PyPI, run the following command:\n"
echo -e "\ttwine upload dist/*\n"
Expand Down
357 changes: 205 additions & 152 deletions docs/README_pypi.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions pathopatch/utils/patch_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,14 +184,14 @@ def target_mpp_to_downsample(
rescaling_factor = 1.0
else:
logger.warning(
f"Requested mpp resolution ({target_mpp}) is not a power of the base resultion {base_mpp}. "
f"Requested mpp resolution ({target_mpp}) is not a power of the base resolution {base_mpp}. "
"We perform rescaling, but this may not be accurate and is very slow!"
)
downsample = int(np.floor(target_mpp / base_mpp))
rescaling_factor = target_mpp / (base_mpp * downsample)
else:
logger.warning(
f"Requested mpp resolution ({target_mpp}) is not a power of the base resultion {base_mpp}. "
f"Requested mpp resolution ({target_mpp}) is not a power of the base resolution {base_mpp}. "
"We perform rescaling, but this may not be accurate and is very slow!"
)
downsample = 1
Expand Down
70 changes: 0 additions & 70 deletions setup.py

This file was deleted.

6 changes: 6 additions & 0 deletions test_database/input/example_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
wsi_paths: ./test_database/input/WSI/JP2K-33003-1.svs
output_path: ./test_output
patch_size: 512
target_mag: 10
processes: 2
overwrite: True

0 comments on commit 919c1d0

Please sign in to comment.