From 67d6e604e9e6afd9b3aedd0cb3e1c7cdd367362f Mon Sep 17 00:00:00 2001 From: Matt Archer Date: Thu, 23 Nov 2023 22:34:41 +0000 Subject: [PATCH 1/4] bumped minimum python to 3.8 --- pyproject.toml | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++ setup.py | 30 ----------------------------- 2 files changed, 51 insertions(+), 30 deletions(-) create mode 100644 pyproject.toml delete mode 100644 setup.py diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..7e50c27 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,51 @@ +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[project] +name = "detectree2" +version = "1.0.7" +description = "detectree2 python package" +authors = [ + { name="James G. C. Ball", email="ball.jgc@gmail.com" }, +] +readme = "README.md" +license = { file = "LICENSE" } +requires-python = ">=3.8.0" + +dependencies = [ + "descartes", + "detectron2@git+https://github.com/facebookresearch/detectron2.git", + "fiona", + "gdal>=1.11", + "geopandas", + "geos", + "numpy", + "pygeos", + "pypng", + "proj", + "pycrs", + "pyyaml>=5.1", + "rasterio==1.3a3", + "rtree", + "shapely", +] + +[project.optional-dependencies] +lint = [ + "yapf", + "flake8", + "isort", +] + +docs = [ + "nbsphinx", + "sphinx_rtd_theme", + +] +test = ["pytest", "opencv-python"] +ci = ["mypy", "detectree2[docs,lint,test]"] + + +[tool.setuptools] +packages = ["detectree2"] diff --git a/setup.py b/setup.py deleted file mode 100644 index bb1216f..0000000 --- a/setup.py +++ /dev/null @@ -1,30 +0,0 @@ -from setuptools import find_packages, setup - -setup( - name="detectree2", - version="1.0.7", - author="James G. C. Ball", - author_email="ball.jgc@gmail.com", - description="Detectree packaging", - url="https://github.com/PatBall1/detectree2", - # package_dir={"": "detectree2"}, - packages=find_packages(), - test_suite="detectree2.tests.test_all.suite", - install_requires=[ - "pyyaml>=5.1", - "GDAL>=1.11", - "numpy", - "rtree", - "proj", - "geos", - "pypng", - "pygeos", - "shapely", - "geopandas", - "rasterio==1.3a3", - "fiona", - "pycrs", - "descartes", - "detectron2@git+https://github.com/facebookresearch/detectron2.git", - ], -) From e2306931c5ca691b2515f6021e1f15219bbf8797 Mon Sep 17 00:00:00 2001 From: Matt Archer Date: Thu, 23 Nov 2023 23:00:03 +0000 Subject: [PATCH 2/4] re added detectron2 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7e50c27..05f1e50 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,7 +15,7 @@ requires-python = ">=3.8.0" dependencies = [ "descartes", - "detectron2@git+https://github.com/facebookresearch/detectron2.git", + "detectron2@git+https://github.com/facebookresearch/detectron2.git", "fiona", "gdal>=1.11", "geopandas", From ece37474f37b1f7e9c57af9e9a5f31853f40f531 Mon Sep 17 00:00:00 2001 From: Matt Archer Date: Thu, 23 Nov 2023 23:12:54 +0000 Subject: [PATCH 3/4] minor fix --- pyproject.toml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 05f1e50..f27aa9b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,8 +43,16 @@ docs = [ "sphinx_rtd_theme", ] -test = ["pytest", "opencv-python"] -ci = ["mypy", "detectree2[docs,lint,test]"] +test = [ + "pytest", + "pytest-order", + "opencv-python" +] + +ci = [ + "mypy", + "detectree2[docs,lint,test]" +] [tool.setuptools] From adfbf0a871cb7508323832de5b1db1f46c4d9eaf Mon Sep 17 00:00:00 2001 From: Matt Archer Date: Thu, 23 Nov 2023 23:28:02 +0000 Subject: [PATCH 4/4] added ci dependencies --- pyproject.toml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index f27aa9b..4446d70 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta" [project] name = "detectree2" version = "1.0.7" -description = "detectree2 python package" +description = "Python package for automatic tree crown delineation based on Mask R-CNN" authors = [ { name="James G. C. Ball", email="ball.jgc@gmail.com" }, ] @@ -33,15 +33,18 @@ dependencies = [ [project.optional-dependencies] lint = [ - "yapf", "flake8", + "flake8-docstrings", "isort", + "mypy", + "pydocstyle", + "yapf", ] docs = [ "nbsphinx", + "sphinx==5.1.0", "sphinx_rtd_theme", - ] test = [ "pytest", @@ -50,7 +53,6 @@ test = [ ] ci = [ - "mypy", "detectree2[docs,lint,test]" ]