diff --git a/.readthedocs.yml b/.readthedocs.yml index 2bf3fcb..1c0100f 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -6,14 +6,16 @@ sphinx: configuration: docs/conf.py build: - os: 'ubuntu-22.04' + os: 'ubuntu-24.04' tools: - python: '3.11' - + python: '3.12' + jobs: + # Use uv to export optional + documentation dependencies + post_create_environment: + - pip install uv + - uv export -q --no-dev --group docs --no-emit-project -o docs/requirements.txt python: install: - method: pip path: . - extra_requirements: - - all - - docs + - requirements: docs/requirements.txt diff --git a/pyproject.toml b/pyproject.toml index 09a316c..fa34390 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,68 +24,35 @@ classifiers = [ 'Intended Audience :: Science/Research', 'Typing :: Typed', ] -#license = 'MIT' -# homepage = 'https://github.com/pyinat/pyinaturalist-convert' -# repository = 'https://github.com/pyinat/pyinaturalist-convert' -# documentation = 'https://pyinaturalist-convert.readthedocs.io' -# include = [ -# { path = '*.md', format = 'sdist' }, -# { path = '*.yml', format = 'sdist' }, -# { path = 'docs', format = 'sdist' }, -# { path = 'examples', format = 'sdist' }, -# { path = 'test', format = 'sdist' }, -# ] + dependencies = [ 'pyinaturalist>=0.20', 'flatten-dict>=0.4', 'tablib>=3.0', ] +[project.urls] +homepage = 'https://github.com/pyinat/pyinaturalist-convert' +repository = 'https://github.com/pyinat/pyinaturalist-convert' +documentation = 'https://pyinaturalist-convert.readthedocs.io' + + # Optional dependencies for specific data formats [project.optional-dependencies] -db = ['sqlalchemy>=2.0'] -dwc = ['xmltodict>=0.12'] -feather = ['pandas>=1.2', 'pyarrow>=10.0'] -geojson = ['geojson>=2.5'] -gpx = ['gpxpy>=1.4'] -hdf = ['pandas>=1.2', 'tables>=3.6'] -html = ['jinja2>=3.0', 'markuppy>=1.12'] -odp = ['boto3>=1.20'] -parquet = ['pandas>=1.2', 'pyarrow>=10.0'] -xlsx = ['pandas>=1.2', 'openpyxl>=2.6'] - -# All optional dependencies combined -# all = [ -# 'boto3>=1.20', -# 'geojson>=2.5', -# 'gpxpy>=1.4', -# 'jinja2>=3.0', -# 'numpy>=1.21', -# 'openpyxl>=2.6', -# 'odfpy>=1.4', -# 'pandas>=1.2', -# 'pyarrow>=10.0', -# 'pyyaml>=6.0', -# 'sqlalchemy>=2.0', -# 'tables>=3.6', -# 'tabulate', -# 'xlrd', -# 'xlwt', -# 'xmltodict>=0.12', -# ] - -# Documentation dependencies -docs = [ - 'furo~=2024.5', - 'myst-parser>=1.0', - 'sphinx~=6.2', - 'sphinx-autodoc-typehints==1.20', - 'sphinx-copybutton>=0.5', - 'sphinx-design>=0.5', -] +db = ['sqlalchemy>=2.0'] +dwc = ['xmltodict>=0.12'] +feather = ['pandas>=1.2', 'pyarrow>=10.0'] +geojson = ['geojson>=2.5'] +gpx = ['gpxpy>=1.4'] +hdf = ['pandas>=1.2', 'tables>=3.6'] +html = ['jinja2>=3.0', 'markuppy>=1.12'] +odp = ['boto3>=1.20'] +parquet = ['pandas>=1.2', 'pyarrow>=10.0'] +xlsx = ['pandas>=1.2', 'openpyxl>=2.6'] -[tool.uv] -dev-dependencies = [ +[dependency-groups] +# Dev dependencies +dev = [ 'coverage~=7.0', 'nox~=2024.4', 'pre-commit~=3.5', @@ -96,10 +63,24 @@ dev-dependencies = [ 'sqlalchemy2-stubs>=0.0.2a38', ] +# Documentation dependencies for Readthedocs builds +docs = [ + 'furo~=2024.5', + 'myst-parser>=1.0', + 'sphinx~=6.2', + 'sphinx-autodoc-typehints==1.20', + 'sphinx-copybutton>=0.5', + 'sphinx-design>=0.5', +] + [build-system] requires = ['hatchling>=1.0.0'] build-backend = 'hatchling.build' +[tool.hatch.build] +packages = ['pyinaturalist-convert'] +force-include = {'README.md' = 'pyinaturalist_convert/README.md'} + [tool.coverage.html] directory = 'test-reports' diff --git a/uv.lock b/uv.lock index 9e17fea..b026e08 100644 --- a/uv.lock +++ b/uv.lock @@ -1236,7 +1236,7 @@ wheels = [ [[package]] name = "pyinaturalist" -version = "0.20.0" +version = "0.20.1" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "attrs" }, @@ -1247,11 +1247,10 @@ dependencies = [ { name = "requests-cache" }, { name = "requests-ratelimiter" }, { name = "rich" }, - { name = "setuptools" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/d8/ef/1edac90d569793f73ddde3db6b8fc28cd4bcb83d253b65f0ea7c33185017/pyinaturalist-0.20.0.tar.gz", hash = "sha256:177477b9954955aff22fce726b7eb52dcd584e85299a49d50f67c8edf5fc9ce6", size = 11118553 } +sdist = { url = "https://files.pythonhosted.org/packages/d6/0a/f55d64e1355732fb0f31021e1813dd8c667862044f86be0505eae9743e3b/pyinaturalist-0.20.1.tar.gz", hash = "sha256:a8c9a7461a17da4eddd742a8f63f925a3d5bdf3a9d33a15bcc5c162add5748a7", size = 116321 } wheels = [ - { url = "https://files.pythonhosted.org/packages/b9/a9/8b26b34161274e6a77fce317e430e96a65bd9fa6d5e66cedf4ce280d891c/pyinaturalist-0.20.0-py3-none-any.whl", hash = "sha256:3912bfc1da52921d24a056fea97ee420e3ab4004b9a88da747efacbfddc236a9", size = 165683 }, + { url = "https://files.pythonhosted.org/packages/ac/67/c82fe7de851068b3826918ab3c29b6911a601244a3ad036234cf41e4ef33/pyinaturalist-0.20.1-py3-none-any.whl", hash = "sha256:df8bed9a738636cdce2f2430b3dcb236535d1e3c2cf856256a90caf2d29ae24c", size = 154128 }, ] [[package]] @@ -1268,14 +1267,6 @@ dependencies = [ db = [ { name = "sqlalchemy" }, ] -docs = [ - { name = "furo" }, - { name = "myst-parser" }, - { name = "sphinx" }, - { name = "sphinx-autodoc-typehints" }, - { name = "sphinx-copybutton" }, - { name = "sphinx-design" }, -] dwc = [ { name = "xmltodict" }, ] @@ -1321,17 +1312,23 @@ dev = [ { name = "pytest-xdist" }, { name = "sqlalchemy2-stubs" }, ] +docs = [ + { name = "furo" }, + { name = "myst-parser" }, + { name = "sphinx" }, + { name = "sphinx-autodoc-typehints" }, + { name = "sphinx-copybutton" }, + { name = "sphinx-design" }, +] [package.metadata] requires-dist = [ { name = "boto3", marker = "extra == 'odp'", specifier = ">=1.20" }, { name = "flatten-dict", specifier = ">=0.4" }, - { name = "furo", marker = "extra == 'docs'", specifier = "~=2024.5" }, { name = "geojson", marker = "extra == 'geojson'", specifier = ">=2.5" }, { name = "gpxpy", marker = "extra == 'gpx'", specifier = ">=1.4" }, { name = "jinja2", marker = "extra == 'html'", specifier = ">=3.0" }, { name = "markuppy", marker = "extra == 'html'", specifier = ">=1.12" }, - { name = "myst-parser", marker = "extra == 'docs'", specifier = ">=1.0" }, { name = "openpyxl", marker = "extra == 'xlsx'", specifier = ">=2.6" }, { name = "pandas", marker = "extra == 'feather'", specifier = ">=1.2" }, { name = "pandas", marker = "extra == 'hdf'", specifier = ">=1.2" }, @@ -1340,10 +1337,6 @@ requires-dist = [ { name = "pyarrow", marker = "extra == 'feather'", specifier = ">=10.0" }, { name = "pyarrow", marker = "extra == 'parquet'", specifier = ">=10.0" }, { name = "pyinaturalist", specifier = ">=0.20" }, - { name = "sphinx", marker = "extra == 'docs'", specifier = "~=6.2" }, - { name = "sphinx-autodoc-typehints", marker = "extra == 'docs'", specifier = "==1.20" }, - { name = "sphinx-copybutton", marker = "extra == 'docs'", specifier = ">=0.5" }, - { name = "sphinx-design", marker = "extra == 'docs'", specifier = ">=0.5" }, { name = "sqlalchemy", marker = "extra == 'db'", specifier = ">=2.0" }, { name = "tables", marker = "extra == 'hdf'", specifier = ">=3.6" }, { name = "tablib", specifier = ">=3.0" }, @@ -1361,6 +1354,14 @@ dev = [ { name = "pytest-xdist", specifier = ">=2.2" }, { name = "sqlalchemy2-stubs", specifier = ">=0.0.2a38" }, ] +docs = [ + { name = "furo", specifier = "~=2024.5" }, + { name = "myst-parser", specifier = ">=1.0" }, + { name = "sphinx", specifier = "~=6.2" }, + { name = "sphinx-autodoc-typehints", specifier = "==1.20" }, + { name = "sphinx-copybutton", specifier = ">=0.5" }, + { name = "sphinx-design", specifier = ">=0.5" }, +] [[package]] name = "pyparsing" @@ -1581,15 +1582,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/54/24/b4293291fa1dd830f353d2cb163295742fa87f179fcc8a20a306a81978b7/SecretStorage-3.3.3-py3-none-any.whl", hash = "sha256:f356e6628222568e3af06f2eba8df495efa13b3b63081dafd4f7d9a7b7bc9f99", size = 15221 }, ] -[[package]] -name = "setuptools" -version = "72.2.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/ce/ef/013ded5b0d259f3fa636bf35de186f0061c09fbe124020ce6b8db68c83af/setuptools-72.2.0.tar.gz", hash = "sha256:80aacbf633704e9c8bfa1d99fa5dd4dc59573efcf9e4042c13d3bcef91ac2ef9", size = 2419230 } -wheels = [ - { url = "https://files.pythonhosted.org/packages/6e/ec/06715d912351edc453e37f93f3fc80dcffd5ca0e70386c87529aca296f05/setuptools-72.2.0-py3-none-any.whl", hash = "sha256:f11dd94b7bae3a156a95ec151f24e4637fb4fa19c878e4d191bfb8b2d82728c4", size = 2336658 }, -] - [[package]] name = "six" version = "1.17.0"