Skip to content

Commit

Permalink
Add: python package dependency page to guide
Browse files Browse the repository at this point in the history
Many thanks to all of the reviewers on this and discussion in slack as well!
  • Loading branch information
lwasser authored Dec 15, 2023
2 parents 981a98f + f7e2927 commit 83f4469
Show file tree
Hide file tree
Showing 6 changed files with 393 additions and 11 deletions.
1 change: 1 addition & 0 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"sphinx_design",
"sphinx_copybutton",
"sphinx.ext.intersphinx",
"sphinx.ext.todo",
"sphinx_sitemap",
"sphinxext.opengraph",
]
Expand Down
Binary file added images/python-package-dependencies.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/python-package-dependency-types.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 14 additions & 11 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
nox.options.reuse_existing_virtualenvs = True

OUTPUT_DIR = "_build"
build_command = ["-b", "html", ".", "/".join([OUTPUT_DIR, "/html"])]
docs_dir = os.path.join("_build", "html")
build_command = ["-b", "html", ".", docs_dir]

@nox.session
def docs(session):
Expand All @@ -25,12 +26,14 @@ def docs_live(session):
"build_assets",
"tmp",
]

# Explicitly include custom CSS in each build since
# sphinx doesn't think _static files should change since,
# well, they're static.
# Include these as the final `filenames` argument

AUTOBUILD_INCLUDE = [
"_static/pyos.css"
os.path.join("_static", "pyos.css")
]

# ----------------
Expand All @@ -39,19 +42,19 @@ def docs_live(session):
for folder in AUTOBUILD_IGNORE:
cmd.extend(["--ignore", f"*/{folder}/*"])

cmd.extend(build_command)
#cmd.extend(build_command)
cmd.extend(build_command + session.posargs)

# use positional arguments if we have them
if len(session.posargs) > 0:
cmd.extend(session.posargs)
# otherwise use default output and include directory
else:
cmd.extend(AUTOBUILD_INCLUDE)
# Use positional arguments if we have them
# if len(session.posargs) > 0:
# cmd.extend(session.posargs)
# # Otherwise use default output and include directory
# else:
# cmd.extend(AUTOBUILD_INCLUDE)

# ----------------
session.run(*cmd)

docs_dir = os.path.join("_build", "html")


@nox.session(name="docs-clean")
def clean_dir(dir_path=docs_dir):
Expand Down
Loading

0 comments on commit 83f4469

Please sign in to comment.