-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Also includes: - Bump to the min python-dateutil version to bring it into line w/ our doc dependencies - Adding @gadomski as a maintainer - Remove the unused, undocumented `validation` extra - Rework the min_requirement CI check
- Loading branch information
Showing
12 changed files
with
167 additions
and
210 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,8 +14,7 @@ the library as an "editable link", then install the development dependencies: | |
$ git clone [email protected]:your_user_name/pystac-client.git | ||
$ cd pystac | ||
$ pip install -e . | ||
$ pip install -r requirements-dev.txt | ||
$ pip install -e '.[dev]' | ||
Testing | ||
^^^^^^^ | ||
|
@@ -102,7 +101,7 @@ Python documentation requirements via pip, then use the ``build-docs`` script: | |
|
||
.. code-block:: bash | ||
$ pip install -r requirements-docs.txt | ||
$ pip install -e '.[docs]' | ||
$ scripts/build-docs | ||
CHANGELOG | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,5 +9,4 @@ dependencies: | |
- python=3.9 | ||
- pip | ||
- pip: | ||
- -r ../requirements-docs.txt | ||
- -e ../ | ||
- -e ../[docs] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,119 @@ | ||
[tool.ruff] | ||
ignore = [ | ||
"E722", | ||
"E731", | ||
[project] | ||
name = "pystac-client" | ||
description = "Python library for working with SpatioTemporal Asset Catalog (STAC) APIs." | ||
readme = "README.md" | ||
authors = [ | ||
{ name = "Jon Duckworth", email = "[email protected]" }, | ||
{ name = "Matthew Hanson", email = "[email protected]" }, | ||
] | ||
line-length = 88 | ||
select = [ | ||
"E", | ||
"F", | ||
"W", | ||
maintainers = [{ name = "Pete Gadomski", email = "[email protected]" }] | ||
keywords = ["pystac", "imagery", "raster", "catalog", "STAC"] | ||
license = { text = "Apache-2.0" } | ||
classifiers = [ | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Operating System :: OS Independent", | ||
"Natural Language :: English", | ||
"Development Status :: 4 - Beta", | ||
"Intended Audience :: Developers", | ||
"License :: OSI Approved :: MIT License", | ||
"Topic :: Scientific/Engineering :: GIS", | ||
"Topic :: Software Development :: Libraries", | ||
"Topic :: Software Development :: Libraries :: Python Modules", | ||
] | ||
requires-python = ">=3.8" | ||
dependencies = [ | ||
"requests>=2.28.2", | ||
"pystac[validation]>=1.7.2", | ||
"python-dateutil>=2.8.2", | ||
] | ||
dynamic = ["version"] | ||
|
||
[project.scripts] | ||
stac-client = "pystac_client.cli:cli" | ||
|
||
[project.optional-dependencies] | ||
dev = [ | ||
"black~=23.3.0", | ||
"codespell~=2.2.4", | ||
"coverage~=7.2", | ||
"doc8~=1.1.1", | ||
"importlib-metadata~=6.6.0", | ||
"mypy~=1.2", | ||
"orjson==3.8.10", | ||
"pre-commit==3.2.2", | ||
"pytest-benchmark~=4.0.0", | ||
"pytest-console-scripts~=1.3.1", | ||
"pytest-cov~=4.0.0", | ||
"pytest-recording~=0.12.2", | ||
"pytest~=7.3.1", | ||
"recommonmark~=0.7.1", | ||
"requests-mock~=1.10.0", | ||
"ruff==0.0.263", | ||
"tomli~=2.0; python_version<'3.11'", | ||
"types-python-dateutil~=2.8.19", | ||
"types-requests~=2.28.11", | ||
] | ||
docs = [ | ||
"Sphinx~=6.2", | ||
"boto3~=1.26", | ||
"geojson~=3.0.1", | ||
"geopandas~=0.12.2", | ||
"hvplot~=0.8.3", | ||
"ipykernel~=6.22", | ||
"ipython~=8.12", | ||
"jinja2<4.0", | ||
"matplotlib~=3.7.1", | ||
"myst-parser~=1.0.0", | ||
"nbsphinx~=0.9", | ||
"pydata-sphinx-theme~=0.13", | ||
"pygeoif~=1.0", | ||
"sphinxcontrib-fulltoc~=1.2", | ||
] | ||
|
||
[project.urls] | ||
homepage = "https://github.com/stac-utils/pystac-client" | ||
documentation = "https://pystac-client.readthedocs.io" | ||
repository = "https://github.com/stac-utils/pystac-client.git" | ||
changelog = "https://github.com/stac-utils/pystac-client/blob/main/CHANGELOG.md" | ||
discussions = "https://github.com/radiantearth/stac-spec/discussions/categories/stac-software" | ||
|
||
[tool.setuptools.packages.find] | ||
include = ["pystac_client*"] | ||
exclude = ["tests*"] | ||
|
||
[tool.setuptools.dynamic] | ||
version = { attr = "pystac_client.version.__version__" } | ||
|
||
[tool.doc8] | ||
ignore-path = "docs/_build,docs/tutorials" | ||
max-line-length = 130 | ||
|
||
[tool.ruff] | ||
ignore = ["E722", "E731"] | ||
line-length = 88 | ||
select = ["E", "F", "W"] | ||
|
||
[tool.ruff.per-file-ignores] | ||
"__init__.py" = ["F401"] | ||
"test_item_search.py" = ["E501"] | ||
|
||
[tool.pytest.ini_options] | ||
markers = "vcr: records network activity" | ||
addopts = "--benchmark-skip" | ||
|
||
[tool.mypy] | ||
show_error_codes = true | ||
strict = true | ||
|
||
[[tool.mypy.overrides]] | ||
module = ["jinja2"] | ||
ignore_missing_imports = true | ||
|
||
[build-system] | ||
requires = ["setuptools>=61.0"] | ||
build-backend = "setuptools.build_meta" |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/usr/bin/env python3 | ||
|
||
"""Installs the minimum version of all stactools dependencies, with pip. | ||
Assumptions: | ||
- You've installed the development dependencies: `pip install '.[dev]'` | ||
- All of the dependencies in pyproject.toml are specified with `>=` | ||
For more context on the approach and rationale behind testing against minimum | ||
requirements, see | ||
https://www.gadom.ski/2022/02/18/dependency-protection-with-python-and-github-actions.html. | ||
""" | ||
|
||
import subprocess | ||
import sys | ||
from pathlib import Path | ||
|
||
from packaging.requirements import Requirement | ||
|
||
assert sys.version_info[0] == 3 | ||
if sys.version_info[1] < 11: | ||
import tomli as toml | ||
else: | ||
import tomllib as toml | ||
|
||
|
||
root = Path(__file__).parents[1] | ||
with open(root / "pyproject.toml", "rb") as f: | ||
pyproject_toml = toml.load(f) | ||
requirements = [] | ||
for install_requires in filter( | ||
bool, | ||
(i.strip() for i in pyproject_toml["project"]["dependencies"]), | ||
): | ||
requirement = Requirement(install_requires) | ||
assert len(requirement.specifier) == 1 | ||
specifier = list(requirement.specifier)[0] | ||
assert specifier.operator == ">=" | ||
install_requires = install_requires.replace(">=", "==") | ||
requirements.append(install_requires) | ||
|
||
subprocess.run(["pip", "install", *requirements]) |
Oops, something went wrong.