diff --git a/CHANGELOG.md b/CHANGELOG.md index f8b1f51f..ac25a36c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Removed ENV_MAX_LIMIT environment variable; maximum limits are now handled by the default global limit environment variable. [#482](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/482) - Changed the default and maximum pagination limits for collections/items endpoints. [#482](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/482) - Removed the `rel=child` links to the collections from the landing page, as the listing was incomplete due to pagination. [#496](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/496) +- Changed to pyproject.toml file from setup.py [#505](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pull/505) ### Fixed diff --git a/stac_fastapi/core/pyproject.toml b/stac_fastapi/core/pyproject.toml new file mode 100644 index 00000000..6b79c582 --- /dev/null +++ b/stac_fastapi/core/pyproject.toml @@ -0,0 +1,59 @@ +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[project] +name = "stac_fastapi_core" +description = "Core library for the Elasticsearch and Opensearch stac-fastapi backends." +readme = "README.md" +requires-python = ">=3.9" +license = {text = "MIT"} +authors = [] +classifiers = [ + "Intended Audience :: Developers", + "Intended Audience :: Information Technology", + "Intended Audience :: Science/Research", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", + "License :: OSI Approved :: MIT License", +] +keywords = [ + "STAC", + "STAC-API", + "FastAPI", + "stac-fastapi", + "Elasticsearch", + "Opensearch", +] +dynamic = ["version"] +dependencies = [ + "fastapi~=0.109.0", + "attrs>=23.2.0", + "pydantic>=2.4.1,<3.0.0", + "stac_pydantic~=3.3.0", + "stac-fastapi.types==6.0.0", + "stac-fastapi.api==6.0.0", + "stac-fastapi.extensions==6.0.0", + "orjson~=3.11.0", + "overrides~=7.4.0", + "geojson-pydantic~=1.0.0", + "pygeofilter~=0.3.1", + "jsonschema~=4.0.0", + "slowapi~=0.1.9", +] + +[project.urls] +Homepage = "https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch" + +[tool.hatch.version] +path = "stac_fastapi/core/version.py" + +[tool.hatch.build.targets.sdist] +exclude = ["alembic", "tests", "scripts"] + +[tool.hatch.build.targets.wheel] +only-include = ["stac_fastapi"] diff --git a/stac_fastapi/core/setup.cfg b/stac_fastapi/core/setup.cfg deleted file mode 100644 index 1eb3fa49..00000000 --- a/stac_fastapi/core/setup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[metadata] -version = attr: stac_fastapi.core.version.__version__ diff --git a/stac_fastapi/core/setup.py b/stac_fastapi/core/setup.py deleted file mode 100644 index 505f97c8..00000000 --- a/stac_fastapi/core/setup.py +++ /dev/null @@ -1,47 +0,0 @@ -"""stac_fastapi: core elasticsearch/ opensearch module.""" - -from setuptools import find_namespace_packages, setup - -with open("README.md") as f: - desc = f.read() - -install_requires = [ - "fastapi~=0.109.0", - "attrs>=23.2.0", - "pydantic>=2.4.1,<3.0.0", - "stac_pydantic~=3.3.0", - "stac-fastapi.types==6.0.0", - "stac-fastapi.api==6.0.0", - "stac-fastapi.extensions==6.0.0", - "orjson~=3.11.0", - "overrides~=7.4.0", - "geojson-pydantic~=1.0.0", - "pygeofilter~=0.3.1", - "jsonschema~=4.0.0", - "slowapi~=0.1.9", -] - -setup( - name="stac_fastapi_core", - description="Core library for the Elasticsearch and Opensearch stac-fastapi backends.", - long_description=desc, - long_description_content_type="text/markdown", - python_requires=">=3.9", - classifiers=[ - "Intended Audience :: Developers", - "Intended Audience :: Information Technology", - "Intended Audience :: Science/Research", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13", - "Programming Language :: Python :: 3.14", - "License :: OSI Approved :: MIT License", - ], - url="https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch", - license="MIT", - packages=find_namespace_packages(), - zip_safe=False, - install_requires=install_requires, -) diff --git a/stac_fastapi/elasticsearch/pyproject.toml b/stac_fastapi/elasticsearch/pyproject.toml new file mode 100644 index 00000000..85e196b0 --- /dev/null +++ b/stac_fastapi/elasticsearch/pyproject.toml @@ -0,0 +1,71 @@ +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[project] +name = "stac_fastapi_elasticsearch" +description = "An implementation of STAC API based on the FastAPI framework with Elasticsearch." +readme = "README.md" +requires-python = ">=3.9" +license = {text = "MIT"} +authors = [] +classifiers = [ + "Intended Audience :: Developers", + "Intended Audience :: Information Technology", + "Intended Audience :: Science/Research", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", + "License :: OSI Approved :: MIT License", +] +keywords = [ + "STAC", + "STAC-API", + "FastAPI", + "Elasticsearch", + "stac-fastapi", +] +dynamic = ["version"] +dependencies = [ + "stac-fastapi-core==6.5.1", + "sfeos-helpers==6.5.1", + "elasticsearch[async]~=8.19.1", + "uvicorn~=0.23.0", + "starlette>=0.35.0,<0.36.0", +] + +[project.urls] +Homepage = "https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch" + +[project.optional-dependencies] +dev = [ + "pytest~=8.0", + "pytest-cov~=4.0.0", + "pytest-asyncio~=0.21.0", + "pre-commit~=3.0.0", + "ciso8601~=2.3.0", + "httpx>=0.24.0,<0.28.0", +] +docs = [ + "mkdocs~=1.4.0", + "mkdocs-material~=9.0.0", + "pdocs~=1.2.0", +] +server = [ + "uvicorn[standard]~=0.23.0", +] + +[project.scripts] +stac-fastapi-elasticsearch = "stac_fastapi.elasticsearch.app:run" + +[tool.hatch.version] +path = "stac_fastapi/elasticsearch/version.py" + +[tool.hatch.build.targets.sdist] +exclude = ["alembic", "tests", "scripts"] + +[tool.hatch.build.targets.wheel] +only-include = ["stac_fastapi"] diff --git a/stac_fastapi/elasticsearch/setup.cfg b/stac_fastapi/elasticsearch/setup.cfg deleted file mode 100644 index 7a42432c..00000000 --- a/stac_fastapi/elasticsearch/setup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[metadata] -version = attr: stac_fastapi.elasticsearch.version.__version__ diff --git a/stac_fastapi/elasticsearch/setup.py b/stac_fastapi/elasticsearch/setup.py deleted file mode 100644 index 57fcb458..00000000 --- a/stac_fastapi/elasticsearch/setup.py +++ /dev/null @@ -1,59 +0,0 @@ -"""stac_fastapi: elasticsearch module.""" - -from setuptools import find_namespace_packages, setup - -with open("README.md") as f: - desc = f.read() - -install_requires = [ - "stac-fastapi-core==6.5.1", - "sfeos-helpers==6.5.1", - "elasticsearch[async]~=8.19.1", - "uvicorn~=0.23.0", - "starlette>=0.35.0,<0.36.0", -] - -extra_reqs = { - "dev": [ - "pytest~=8.0", - "pytest-cov~=4.0.0", - "pytest-asyncio~=0.21.0", - "pre-commit~=3.0.0", - "ciso8601~=2.3.0", - "httpx>=0.24.0,<0.28.0", - ], - "docs": ["mkdocs~=1.4.0", "mkdocs-material~=9.0.0", "pdocs~=1.2.0"], - "server": ["uvicorn[standard]~=0.23.0"], -} - -setup( - name="stac_fastapi_elasticsearch", - description="An implementation of STAC API based on the FastAPI framework with both Elasticsearch and Opensearch.", - long_description=desc, - long_description_content_type="text/markdown", - python_requires=">=3.9", - classifiers=[ - "Intended Audience :: Developers", - "Intended Audience :: Information Technology", - "Intended Audience :: Science/Research", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13", - "Programming Language :: Python :: 3.14", - "License :: OSI Approved :: MIT License", - ], - url="https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch", - license="MIT", - packages=find_namespace_packages(exclude=["alembic", "tests", "scripts"]), - zip_safe=False, - install_requires=install_requires, - tests_require=extra_reqs["dev"], - extras_require=extra_reqs, - entry_points={ - "console_scripts": [ - "stac-fastapi-elasticsearch=stac_fastapi.elasticsearch.app:run" - ] - }, -) diff --git a/stac_fastapi/opensearch/pyproject.toml b/stac_fastapi/opensearch/pyproject.toml new file mode 100644 index 00000000..4ed3222f --- /dev/null +++ b/stac_fastapi/opensearch/pyproject.toml @@ -0,0 +1,72 @@ +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[project] +name = "stac_fastapi_opensearch" +description = "An implementation of STAC API based on the FastAPI framework with Opensearch." +readme = "README.md" +requires-python = ">=3.9" +license = {text = "MIT"} +authors = [] +classifiers = [ + "Intended Audience :: Developers", + "Intended Audience :: Information Technology", + "Intended Audience :: Science/Research", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", + "License :: OSI Approved :: MIT License", +] +keywords = [ + "STAC", + "STAC-API", + "FastAPI", + "Opensearch", + "stac-fastapi", +] +dynamic = ["version"] +dependencies = [ + "stac-fastapi-core==6.5.1", + "sfeos-helpers==6.5.1", + "opensearch-py~=2.8.0", + "opensearch-py[async]~=2.8.0", + "uvicorn~=0.23.0", + "starlette>=0.35.0,<0.36.0", +] + +[project.urls] +Homepage = "https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch" + +[project.optional-dependencies] +dev = [ + "pytest~=8.0", + "pytest-cov~=4.0.0", + "pytest-asyncio~=0.21.0", + "pre-commit~=3.0.0", + "ciso8601~=2.3.0", + "httpx>=0.24.0,<0.28.0", +] +docs = [ + "mkdocs~=1.4.0", + "mkdocs-material~=9.0.0", + "pdocs~=1.2.0", +] +server = [ + "uvicorn[standard]~=0.23.0", +] + +[project.scripts] +stac-fastapi-opensearch = "stac_fastapi.opensearch.app:run" + +[tool.hatch.version] +path = "stac_fastapi/opensearch/version.py" + +[tool.hatch.build.targets.sdist] +exclude = ["alembic", "tests", "scripts"] + +[tool.hatch.build.targets.wheel] +only-include = ["stac_fastapi"] diff --git a/stac_fastapi/opensearch/setup.cfg b/stac_fastapi/opensearch/setup.cfg deleted file mode 100644 index 9f0be4b7..00000000 --- a/stac_fastapi/opensearch/setup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[metadata] -version = attr: stac_fastapi.opensearch.version.__version__ diff --git a/stac_fastapi/opensearch/setup.py b/stac_fastapi/opensearch/setup.py deleted file mode 100644 index d4242cb7..00000000 --- a/stac_fastapi/opensearch/setup.py +++ /dev/null @@ -1,57 +0,0 @@ -"""stac_fastapi: opensearch module.""" - -from setuptools import find_namespace_packages, setup - -with open("README.md") as f: - desc = f.read() - -install_requires = [ - "stac-fastapi-core==6.5.1", - "sfeos-helpers==6.5.1", - "opensearch-py~=2.8.0", - "opensearch-py[async]~=2.8.0", - "uvicorn~=0.23.0", - "starlette>=0.35.0,<0.36.0", -] - -extra_reqs = { - "dev": [ - "pytest~=8.0", - "pytest-cov~=4.0.0", - "pytest-asyncio~=0.21.0", - "pre-commit~=3.0.0", - "ciso8601~=2.3.0", - "httpx>=0.24.0,<0.28.0", - ], - "docs": ["mkdocs~=1.4.0", "mkdocs-material~=9.0.0", "pdocs~=1.2.0"], - "server": ["uvicorn[standard]~=0.23.0"], -} - -setup( - name="stac_fastapi_opensearch", - description="Opensearch stac-fastapi backend.", - long_description=desc, - long_description_content_type="text/markdown", - python_requires=">=3.9", - classifiers=[ - "Intended Audience :: Developers", - "Intended Audience :: Information Technology", - "Intended Audience :: Science/Research", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13", - "Programming Language :: Python :: 3.14", - "License :: OSI Approved :: MIT License", - ], - url="https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch", - license="MIT", - packages=find_namespace_packages(), - zip_safe=False, - install_requires=install_requires, - extras_require=extra_reqs, - entry_points={ - "console_scripts": ["stac-fastapi-opensearch=stac_fastapi.opensearch.app:run"] - }, -) diff --git a/stac_fastapi/sfeos_helpers/pyproject.toml b/stac_fastapi/sfeos_helpers/pyproject.toml new file mode 100644 index 00000000..a2f23652 --- /dev/null +++ b/stac_fastapi/sfeos_helpers/pyproject.toml @@ -0,0 +1,47 @@ +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[project] +name = "sfeos_helpers" +description = "Helper library for the Elasticsearch and Opensearch stac-fastapi backends." +readme = "README.md" +requires-python = ">=3.9" +license = {text = "MIT"} +authors = [] +classifiers = [ + "Intended Audience :: Developers", + "Intended Audience :: Information Technology", + "Intended Audience :: Science/Research", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", + "License :: OSI Approved :: MIT License", +] +keywords = [ + "STAC", + "STAC-API", + "FastAPI", + "stac-fastapi", + "Elasticsearch", + "Opensearch", +] +dynamic = ["version"] +dependencies = [ + "stac-fastapi.core==6.5.1", +] + +[project.urls] +Homepage = "https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch" + +[tool.hatch.version] +path = "stac_fastapi/sfeos_helpers/version.py" + +[tool.hatch.build.targets.sdist] +exclude = ["alembic", "tests", "scripts"] + +[tool.hatch.build.targets.wheel] +only-include = ["stac_fastapi"] diff --git a/stac_fastapi/sfeos_helpers/setup.cfg b/stac_fastapi/sfeos_helpers/setup.cfg deleted file mode 100644 index a3210acb..00000000 --- a/stac_fastapi/sfeos_helpers/setup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[metadata] -version = attr: stac_fastapi.sfeos_helpers.version.__version__ diff --git a/stac_fastapi/sfeos_helpers/setup.py b/stac_fastapi/sfeos_helpers/setup.py deleted file mode 100644 index 4b863954..00000000 --- a/stac_fastapi/sfeos_helpers/setup.py +++ /dev/null @@ -1,35 +0,0 @@ -"""stac_fastapi: helpers elasticsearch/ opensearch module.""" - -from setuptools import find_namespace_packages, setup - -with open("README.md") as f: - desc = f.read() - -install_requires = [ - "stac-fastapi.core==6.5.1", -] - -setup( - name="sfeos_helpers", - description="Helper library for the Elasticsearch and Opensearch stac-fastapi backends.", - long_description=desc, - long_description_content_type="text/markdown", - python_requires=">=3.9", - classifiers=[ - "Intended Audience :: Developers", - "Intended Audience :: Information Technology", - "Intended Audience :: Science/Research", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13", - "Programming Language :: Python :: 3.14", - "License :: OSI Approved :: MIT License", - ], - url="https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch", - license="MIT", - packages=find_namespace_packages(), - zip_safe=False, - install_requires=install_requires, -)