Skip to content

Commit

Permalink
Store documentation requirements in requirements-docs.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
smokestacklightnin committed Sep 30, 2024
1 parent ff9ffc4 commit 16c41ea
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cd-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
mkdocs-material-
- name: Install Dependencies
run: pip install mkdocs mkdocs-material mkdocstrings[python] griffe-inherited-docstrings mkdocs-autorefs black mkdocs-jupyter mkdocs-caption
run: pip install -r requirements-docs.txt

- name: Deploy to GitHub Pages
run: mkdocs gh-deploy --force
8 changes: 8 additions & 0 deletions requirements-docs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
mkdocs
mkdocs-material
mkdocstrings[python]
griffe-inherited-docstrings
mkdocs-autorefs
black
mkdocs-jupyter
mkdocs-caption
15 changes: 6 additions & 9 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,11 @@ def run(self):
with open('README.md') as fp:
_LONG_DESCRIPTION = fp.read()

# Get documentation build requirements
with open("requirements-docs.txt", "r") as fp:
docs_reqs = fp.readlines()
docs_reqs = [req.replace("\n", "") for req in docs_reqs]

setup(
name='ml-metadata',
version=__version__,
Expand Down Expand Up @@ -167,15 +172,7 @@ def run(self):
'six>=1.10,<2',
],
# TODO: Pin versions for docs
extras_require={"docs": ["mkdocs",
"mkdocs-material",
"mkdocstrings[python]",
"griffe-inherited-docstrings",
"mkdocs-autorefs",
"black",
"mkdocs-caption"
]
}
extras_require={"docs": docs_reqs}
python_requires='>=3.9,<4',
packages=find_packages(),
include_package_data=True,
Expand Down

0 comments on commit 16c41ea

Please sign in to comment.