From 7538d2eb7d7cef1061fcf58bb01af7bdf3402fcb Mon Sep 17 00:00:00 2001 From: Christian Beilschmidt Date: Tue, 15 Jul 2025 10:38:59 +0200 Subject: [PATCH 1/4] wip --- pyproject.toml | 98 ++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 91 insertions(+), 7 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 1f750584..2801a615 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,10 +1,94 @@ -[build-system] -requires = [ - "setuptools>=42", - "wheel", +[project] +name = "geoengine" +version = "0.8.0" +authors = [{ name = "Geo Engine GmbH", email = "info@geoengine.de" }] +description = "A package for easy access to Geo Engine instances" +classifiers = [ + "Programming Language :: Python :: 3", + "Topic :: Database :: Front-Ends", + "Topic :: Scientific/Engineering :: GIS", + "Topic :: Software Development :: Libraries", + "Intended Audience :: Developers", + "Intended Audience :: Science/Research", + "Intended Audience :: Information Technology", +] +readme = { file = "README.md", content-type = "text/markdown" } +license-files = ["LICENSE"] +requires-python = ">=3.10" +dependencies = [ + "geoengine-openapi-client == 0.0.25", + "geopandas >=1.0,<2.0", + "matplotlib >=3.5,<3.11", + "numpy >=1.21,<2.3", + "owslib >=0.27,<0.34", + "pillow >=10.0,<12", + "pyarrow >=17.0,<21", + "python-dotenv >=0.19,<1.2", + "rasterio >=1.3,<2", + "requests >= 2.26,<3", + "rioxarray >=0.9.1, <0.20", + "StrEnum >=0.4.6,<0.5", # TODO: use from stdlib when `python_requires = >=3.11` + "vega >= 3.5,<4.2", + "websockets >= 14.0,<16", + "xarray >=0.19,<2025.5", + "urllib3 >= 2.1, < 2.5", + "pydantic >= 2.10.6, < 2.12", + 'skl2onnx >=1.17,<2 ; python_version<"3.13"', + 'skl2onnx @ git+https://github.com/onnx/sklearn-onnx@1035fdf ; python_version>="3.13"', # TODO: remove when skl2onnx 1.19 is released + 'onnx == 1.17 ; python_version<"3.13"', # TODO: remove when skl2onnx 1.19 is released + 'onnx == 1.18 ; python_version>="3.13"', # TODO: remove when skl2onnx 1.19 is released +] + +[project.urls] +Homepage = "https://www.geoengine.io" +Repository = "https://github.com/geo-engine/geoengine-python" + +[dependency-groups] +dev = [ + "build >=0.7,<1.3", + "mypy >=1.14,<2.0", + "pdoc3 >=0.10,<0.11", + "pycodestyle >=2.8,<3", # formatter + "pylint >=3.3,<4", # code linter + "setuptools >=62,<81", + "twine >=3.4,<6", # PyPI + "types-requests >=2.26,<3", # mypy type hints + "types-setuptools >=71.1,<81", # mypy type hints + "wheel >=0.37,<0.46", ] +test = [ + "psycopg >=3.2,<4", + "pytest >=6.3,<9", + "pytest-cov >=6.0,<7", + "requests_mock >=1.9,<2", + "scikit-learn >=1.5,<1.7", +] +examples = [ + "cartopy >=0.22,<0.25", # for WMS example + "ipympl >=0.9.4,<0.10", # for ML example + "ipyvuetify >=1.10,<1.12", # for ML app + "ipywidgets >=8.1.5,<9", # for ML example + "nbconvert >=7,<8", # convert notebooks to Python + "scipy >=1.7,<2", # for WMS example + "voila >=0.5,<0.6", # for ML app +] + +[build-system] +requires = ["setuptools>=62"] build-backend = "setuptools.build_meta" -[tool.pytest.ini_options] -log_cli = true -log_level = "INFO" +[tool.pycodestyle] +max-line-length = "120" +ignore = """ +# line length is check with pylint +E501, +# one of W503 or W504 must be ignored +W503""" +exclude = """ +# build dir +build, +# common venv dir +env*, +# hidden dirs +.?* +""" From d3ffec5bcd1d7531c6d419f12cb6649c9126f7e6 Mon Sep 17 00:00:00 2001 From: Christian Beilschmidt Date: Tue, 15 Jul 2025 10:45:13 +0200 Subject: [PATCH 2/4] pycodestyle --- pyproject.toml | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 2801a615..65183dd0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -79,16 +79,17 @@ build-backend = "setuptools.build_meta" [tool.pycodestyle] max-line-length = "120" -ignore = """ -# line length is check with pylint -E501, -# one of W503 or W504 must be ignored -W503""" -exclude = """ -# build dir -build, -# common venv dir -env*, -# hidden dirs -.?* -""" +ignore = [ + # line length is check with pylint + "E501", + # one of W503 or W504 must be ignored + "W503", +] +exclude = [ + # build dir + "build", + # common venv dir + "env*", + # hidden dirs + ".?*", +] From 7495189d0c08348b44db8204a62deb292a814f34 Mon Sep 17 00:00:00 2001 From: Christian Beilschmidt Date: Tue, 15 Jul 2025 15:21:17 +0200 Subject: [PATCH 3/4] update dependencies --- .gitignore | 4 +++ pyproject.toml | 40 +++++++------------------- setup.cfg | 77 +------------------------------------------------- setup.py | 2 -- 4 files changed, 15 insertions(+), 108 deletions(-) delete mode 100644 setup.py diff --git a/.gitignore b/.gitignore index 6b75afe3..dca9ff84 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,10 @@ __pycache__ env env-* .venv +.venv-* + +# Lock files +uv.lock # Private files .pypirc diff --git a/pyproject.toml b/pyproject.toml index 65183dd0..a45a4fdd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,39 +19,36 @@ dependencies = [ "geoengine-openapi-client == 0.0.25", "geopandas >=1.0,<2.0", "matplotlib >=3.5,<3.11", - "numpy >=1.21,<2.3", - "owslib >=0.27,<0.34", + "numpy >=1.21,<2.4", + "owslib >=0.27,<0.35", "pillow >=10.0,<12", "pyarrow >=17.0,<21", "python-dotenv >=0.19,<1.2", "rasterio >=1.3,<2", "requests >= 2.26,<3", "rioxarray >=0.9.1, <0.20", - "StrEnum >=0.4.6,<0.5", # TODO: use from stdlib when `python_requires = >=3.11` + "StrEnum >=0.4.6,<0.5", # TODO: use from stdlib when `python_requires = >=3.11` "vega >= 3.5,<4.2", "websockets >= 14.0,<16", - "xarray >=0.19,<2025.5", - "urllib3 >= 2.1, < 2.5", + "xarray >=0.19,<2025.8", + "urllib3 >= 2.1, < 2.6", "pydantic >= 2.10.6, < 2.12", - 'skl2onnx >=1.17,<2 ; python_version<"3.13"', - 'skl2onnx @ git+https://github.com/onnx/sklearn-onnx@1035fdf ; python_version>="3.13"', # TODO: remove when skl2onnx 1.19 is released - 'onnx == 1.17 ; python_version<"3.13"', # TODO: remove when skl2onnx 1.19 is released - 'onnx == 1.18 ; python_version>="3.13"', # TODO: remove when skl2onnx 1.19 is released + 'skl2onnx >=1.19,<1.200', ] [project.urls] Homepage = "https://www.geoengine.io" Repository = "https://github.com/geo-engine/geoengine-python" -[dependency-groups] +[project.optional-dependencies] # TODO: use [dependency-groups] in the future dev = [ "build >=0.7,<1.3", "mypy >=1.14,<2.0", - "pdoc3 >=0.10,<0.11", + "pdoc3 >=0.10,<0.12", "pycodestyle >=2.8,<3", # formatter "pylint >=3.3,<4", # code linter "setuptools >=62,<81", - "twine >=3.4,<6", # PyPI + "twine >=3.4,<6.2", # PyPI "types-requests >=2.26,<3", # mypy type hints "types-setuptools >=71.1,<81", # mypy type hints "wheel >=0.37,<0.46", @@ -61,7 +58,7 @@ test = [ "pytest >=6.3,<9", "pytest-cov >=6.0,<7", "requests_mock >=1.9,<2", - "scikit-learn >=1.5,<1.7", + "scikit-learn >=1.5,<1.8", ] examples = [ "cartopy >=0.22,<0.25", # for WMS example @@ -76,20 +73,3 @@ examples = [ [build-system] requires = ["setuptools>=62"] build-backend = "setuptools.build_meta" - -[tool.pycodestyle] -max-line-length = "120" -ignore = [ - # line length is check with pylint - "E501", - # one of W503 or W504 must be ignored - "W503", -] -exclude = [ - # build dir - "build", - # common venv dir - "env*", - # hidden dirs - ".?*", -] diff --git a/setup.cfg b/setup.cfg index 38448a5b..aad323e3 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,79 +1,4 @@ -[metadata] -name = geoengine -version = 0.8.0 -author = Geo Engine GmbH -author_email = info@geoengine.de -description = A package for easy access to Geo Engine instances -long_description = file: README.md -long_description_content_type = text/markdown -url = https://github.com/geo-engine/geoengine-python -project_urls = - Bug Tracker = https://github.com/geo-engine/geoengine-python -classifiers = - Programming Language :: Python :: 3 - Topic :: Database :: Front-Ends - -[options] -package_dir = -packages = find: -python_requires = >=3.10 -install_requires = - geoengine-openapi-client == 0.0.25 - geopandas >=1.0,<2.0 - matplotlib >=3.5,<3.11 - numpy >=1.21,<2.3 - owslib >=0.27,<0.34 - pillow >=10.0,<12 - pyarrow >=17.0,<21 - python-dotenv >=0.19,<1.2 - rasterio >=1.3,<2 - requests >= 2.26,<3 - rioxarray >=0.9.1, <0.20 - StrEnum >=0.4.6,<0.5 # TODO: use from stdlib when `python_requires = >=3.11` - vega >= 3.5,<4.2 - websockets >= 14.0,<16 - xarray >=0.19,<2025.5 - urllib3 >= 2.1, < 2.5 - pydantic >= 2.10.6, < 2.12 - skl2onnx >=1.17,<2 ; python_version<"3.13" - skl2onnx @ git+https://github.com/onnx/sklearn-onnx@1035fdf ; python_version>="3.13" # TODO: remove when skl2onnx 1.19 is released - onnx == 1.17 ; python_version<"3.13" # TODO: remove when skl2onnx 1.19 is released - onnx == 1.18 ; python_version>="3.13" # TODO: remove when skl2onnx 1.19 is released - -[[onnx]] - -[options.extras_require] -dev = - build >=0.7,<1.3 - mypy >=1.14,<2.0 - pdoc3 >=0.10,<0.11 - pycodestyle >=2.8,<3 # formatter - pylint >=3.3,<4 # code linter - setuptools >=42,<81 - twine >=3.4,<6 # PyPI - types-requests >=2.26,<3 # mypy type hints - types-setuptools >=71.1,<81 # mypy type hints - wheel >=0.37,<0.46 -test = - psycopg >=3.2,<4 - pytest >=6.3,<9 - pytest-cov >=6.0,<7 - requests_mock >=1.9,<2 - scikit-learn >=1.5,<1.7 -examples = - cartopy >=0.22,<0.25 # for WMS example - ipympl >=0.9.4,<0.10 # for ML example - ipyvuetify >=1.10,<1.12 # for ML app - ipywidgets >=8.1.5,<9 # for ML example - nbconvert >=7,<8 # convert notebooks to Python - scipy >=1.7,<2 # for WMS example - voila >=0.5,<0.6 # for ML app - - -[options.packages.find] -where = . - -[pycodestyle] +[pycodestyle] # does not support `pyproject.toml`: https://peps.python.org/pep-0518/#sticking-with-setup-cfg max-line-length = 120 ignore = # line length is check with pylint diff --git a/setup.py b/setup.py deleted file mode 100644 index 8bf1ba93..00000000 --- a/setup.py +++ /dev/null @@ -1,2 +0,0 @@ -from setuptools import setup -setup() From cb0fb9b2aedc31ccc3bd3a8b169db6c6c49ac72d Mon Sep 17 00:00:00 2001 From: Christian Beilschmidt Date: Tue, 15 Jul 2025 15:50:45 +0200 Subject: [PATCH 4/4] skl2onnx --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index a45a4fdd..7a913ae8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -33,7 +33,7 @@ dependencies = [ "xarray >=0.19,<2025.8", "urllib3 >= 2.1, < 2.6", "pydantic >= 2.10.6, < 2.12", - 'skl2onnx >=1.19,<1.200', + 'skl2onnx >=1.19.1,<1.20', ] [project.urls]