Skip to content

Commit

Permalink
Move dependencies for docs to docs-requirements.txt so they don't n…
Browse files Browse the repository at this point in the history
…eed to be duplicated in the github docs workflow
  • Loading branch information
smokestacklightnin committed Sep 29, 2024
1 parent b389952 commit 2d18f58
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 13 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 mkdocs-jupyter mkdocs-caption markdown-grid-tables
run: pip install $(<docs-requirements.txt)

- name: Deploy to GitHub Pages
run: mkdocs gh-deploy --force
Expand Down
Empty file added docs-requirements.txt
Empty file.
19 changes: 7 additions & 12 deletions tfx/dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
from __future__ import annotations

import os

from pathlib import Path

def select_constraint(default, nightly=None, git_master=None):
"""Select dependency constraint based on TFX_DEPENDENCY_SELECTOR env var."""
Expand Down Expand Up @@ -262,17 +262,12 @@ def make_extra_packages_docs() -> list[str]:
list[str]
List of packages required for building docs
"""
return [
"mkdocs",
"mkdocstrings[python]",
"mkdocs-material",
"griffe-inherited-docstrings",
"mkdocs-autorefs",
"mkdocs-jupyter",
"mkdocs-caption",
"pymdown-extensions",
"markdown-grid-tables",
]
with open(Path(__file__).resolve().parent.parent / "docs-requirements.txt", "r") as fp:
reqs = fp.readlines()

reqs = [req.replace("\n", "") for req in reqs]

return reqs


def make_extra_packages_all():
Expand Down

0 comments on commit 2d18f58

Please sign in to comment.