Skip to content

Commit

Permalink
refactor dev requires to add docs/requirements.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
rnag committed Jan 29, 2024
1 parent 8ba23cb commit e09b95f
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 12 deletions.
1 change: 1 addition & 0 deletions .pyup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ requirements:
pin: False
- requirements-dev.txt
- requirements-test.txt
- docs/requirements.txt
# add a label to pull requests, default is not set
label_prs: update
# assign users to pull requests, default is not set
Expand Down
6 changes: 3 additions & 3 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ sphinx:
# Optional but recommended, declare the Python requirements required
# to build your documentation
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
# python:
# install:
# - requirements: docs/requirements.txt
python:
install:
- requirements: docs/requirements.txt
2 changes: 2 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
sphinx-issues==3.0.1; python_version < "3.8"
sphinx-issues==4.0.0; python_version >= "3.8"
13 changes: 6 additions & 7 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
flake8>=3 # pyup: ignore
tox==3.24.5
# Extras
pytimeparse==1.1.8
# TODO I don't know if we need the below on CI
coverage>=6.2
pip>=21.3.1
bump2version==1.0.1
wheel==0.37.1; python_version == "3.6"
wheel==0.42.0; python_version > "3.6"
watchdog[watchmedo]==2.1.6
flake8>=3 # pyup: ignore
tox==3.24.5
coverage>=6.2
Sphinx==5.3.0
sphinx-issues==3.0.1; python_version < "3.8"
sphinx-issues==4.0.0; python_version >= "3.8"
twine==3.8.0
# Extras
pytimeparse==1.1.8
13 changes: 11 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,16 @@
dev_requires = []

# TODO update once we drop support for Python 3.6 & 3.7
# if (requires_test_file := here / 'requirements-dev.txt').exists():
# if (requires_docs_file := here / 'docs' / 'requirements.txt').exists():
requires_docs_file = here / 'docs' / 'requirements.txt'
if requires_docs_file.exists():
with requires_docs_file.open() as requires_docs_txt:
doc_requires = [str(req) for req in parse_requirements(requires_docs_txt)]
else: # Running on CI
doc_requires = []

# TODO update once we drop support for Python 3.6 & 3.7
# if (requires_test_file := here / 'requirements-test.txt').exists():
requires_test_file = here / 'requirements-test.txt'
if requires_test_file.exists():
with requires_test_file.open() as requires_test_txt:
Expand Down Expand Up @@ -92,7 +101,7 @@
extras_require={
'timedelta': ['pytimeparse>=1.1.7'],
'yaml': ['PyYAML>=5.3'],
'dev': dev_requires + test_requirements,
'dev': dev_requires + doc_requires + test_requirements,
},
zip_safe=False
)

0 comments on commit e09b95f

Please sign in to comment.