Skip to content

Commit

Permalink
Move dev and doc dependencies to PEP 735 dependency-groups, and use u…
Browse files Browse the repository at this point in the history
…v export to use those dependencies for readthedocs builds
  • Loading branch information
JWCook committed Jan 18, 2025
1 parent 06b5b8e commit a258b12
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 86 deletions.
14 changes: 8 additions & 6 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
87 changes: 34 additions & 53 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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'

Expand Down
46 changes: 19 additions & 27 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a258b12

Please sign in to comment.