Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

consider using poetry in pytest #594

Closed
1 of 6 tasks
veenstrajelmer opened this issue Oct 18, 2023 · 1 comment
Closed
1 of 6 tasks

consider using poetry in pytest #594

veenstrajelmer opened this issue Oct 18, 2023 · 1 comment

Comments

@veenstrajelmer
Copy link
Collaborator

veenstrajelmer commented Oct 18, 2023

poetry deps format is completely different:

[tool.poetry.dependencies]
python = "^3.8"
#scipy<1.6.0 pip install fails in py39, is also 3 years old
scipy = ">=1.6.0"
#numpy 1.21 is EOL since june 2023
numpy = ">=1.22"
#contour colorbar on uniform values fails with matplotlib<3.7.0, several other features with matplotlib<3.6.0
matplotlib = ">=3.7.0"
#pandas<2.0.0 in case of py38 to avoid conflict with xarray<2023.3.0: https://github.com/Deltares/xugrid/issues/78#issuecomment-1597723955 (xarray 2023.1.0 is the latest py38 release, and py38 is still supported by dfm_tools)
#pandas>=1.4 is required by xarray>=2023.3.0
pandas = [
	{version = ">=1.4.0"},
	{version = "<2.0.0", python = "<=3.8"},
	]
#shapely<2.0.0 give "AttributeError: module 'shapely' has no attribute 'GeometryType'"
shapely = ">=2.0.0"
#geopandas<0.13.0 require shapely<2.0.0
geopandas = ">=0.13.0"
#fiona<1.9 does not contain sql where filter
fiona = ">=1.9"
#contextily<1.0.0 is from April 2020
contextily = ">=1.0.0"
#xarray<2023.4.0 conflicts with pandas<2.0.0 for resampling, only available for py39
#xarray<2022.6.0 did not find certain variable in dataset in test_data_map testcase. TODO: lower xarray/dask to 2022.6.0 when xugrid>0.6.5 is available
xarray = [
	{version = ">=2022.11.0"},
	{version = ">=2023.4.0", python = ">=3.9"},
	]
#dask is aligned with xarray, no particular reason
dask = [
	{version = ">=2022.11.0"},
	{version = ">=2023.4.0", python = ">=3.9"},
	]
#netcdf4<1.5.4 pip install fails in py39
netcdf4 = ">=1.5.4"
#bottleneck<1.3.3 pip install fails in py39
bottleneck = ">=1.3.3"
#xugrid 0.6.5 supports wider xarray version range. TODO: xugrid>=0.6.5 requires xarray>=2022.11.0 without explicitly stating this, will be solved in next version (https://github.com/Deltares/xugrid/issues/167)
xugrid = ">=0.6.5"
#cdsapi<0.6.1 is from Feb 2021 and does not support newer python versions
cdsapi = ">=0.6.1"
#pydap<3.4.0 is from May 2017 and does not support newer python versions
pydap = ">=3.4.0"
#pooch<1.1.0 do not have attribute retrieve
pooch = ">=1.1.0"
#hydrolib-core<0.5.1 does not yet contain 3D z-sigma mdu settings and many other essentials
hydrolib-core = ">=0.5.1"
#meshkernel<2.1.0 does not yet contain mesh2d_refine_based_on_gridded_samples and other essentials
meshkernel = ">=2.1.0"

Also, it seems to mess up pip install -e . but not thoroughly checked

groups of extras can be defined via extras: https://python-poetry.org/docs/pyproject/#extras
dev dependencies via: https://github.com/Deltares/HYDROLIB-core/blob/bf75f024e48b515d4cd7c93cd3f997de4fc5b1ef/pyproject.toml#L26

@veenstrajelmer veenstrajelmer changed the title consider replacing requirements.txt with poetry in pytest consider using poetry in pytest Nov 21, 2023
@veenstrajelmer
Copy link
Collaborator Author

Not for now, process was already cleaned and pyproject.toml is now the single source of truth for dependencies and build. Poetry would mainly reduce flexibility now. Maybe consider pixi in the future instead, after package manager options have consilidated a bit.

@veenstrajelmer veenstrajelmer closed this as not planned Won't fix, can't repro, duplicate, stale Nov 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant