Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scripts:docs_setup: install docs dev and build env #97

Merged
merged 1 commit into from
Dec 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/requirements.in
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
mkdocs==1.5.3
mkdocs-material==9.4.9
mkdocs-material==9.5.3
mkdocs-material[imaging]==9.5.3
#mkdocstrings[python]
markdown-include==0.8.1
mike==2.0.0
pygments==2.17.1
pymdown-extensions==10.4
markdown-include==0.8.1
# FIXME TypeError: '<' not supported between instances of 'int' and 'str'
#markdown-blockdiag @ git+https://github.com/silopolis/markdown-blockdiag@master
mkdocs-awesome-pages-plugin==2.9.2
#mkdocs-literate-nav==
mkdocs-section-index==0.3.8
mkdocs-git-revision-date-localized-plugin==1.2.1
mkdocs-material[imaging]==9.4.9
mkdocs-ezglossary-plugin==1.5.5
mkdocs-kroki-plugin==0.6.1
mkdocs-macros-plugin==1.0.5
Expand All @@ -21,4 +21,4 @@ mkdocs-macros-plugin==1.0.5
# mkdocs-pdf-export-plugin
# mkdocs-with-pdf
# django-weasyprint
# mkdocs-include-markdown-plugin
mkdocs-include-markdown-plugin==6.0.4
31 changes: 18 additions & 13 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
#
# pip-compile --output-file=requirements.txt requirements.in
#
anyio==4.0.0
anyio==4.2.0
# via starlette
asyncpg==0.27.0
# via -r requirements.app.in
babel==2.13.1
babel==2.14.0
# via
# mkdocs-git-revision-date-localized-plugin
# mkdocs-material
Expand Down Expand Up @@ -51,11 +51,11 @@ greenlet==3.0.1
# via sqlalchemy
h11==0.14.0
# via uvicorn
idna==3.4
idna==3.6
# via
# anyio
# requests
importlib-metadata==6.8.0
importlib-metadata==7.0.1
# via mike
importlib-resources==6.1.1
# via mike
Expand Down Expand Up @@ -89,6 +89,7 @@ mkdocs==1.5.3
# mkdocs-awesome-pages-plugin
# mkdocs-ezglossary-plugin
# mkdocs-git-revision-date-localized-plugin
# mkdocs-include-markdown-plugin
# mkdocs-kroki-plugin
# mkdocs-macros-plugin
# mkdocs-material
Expand All @@ -99,13 +100,15 @@ mkdocs-ezglossary-plugin==1.5.5
# via -r docs/requirements.in
mkdocs-git-revision-date-localized-plugin==1.2.1
# via -r docs/requirements.in
mkdocs-include-markdown-plugin==6.0.4
# via -r docs/requirements.in
mkdocs-kroki-plugin==0.6.1
# via -r docs/requirements.in
mkdocs-macros-plugin==1.0.5
# via -r docs/requirements.in
mkdocs-material[imaging]==9.4.9
mkdocs-material[imaging]==9.5.3
# via -r docs/requirements.in
mkdocs-material-extensions==1.3
mkdocs-material-extensions==1.3.1
# via mkdocs-material
mkdocs-section-index==0.3.8
# via -r docs/requirements.in
Expand All @@ -119,15 +122,15 @@ packaging==23.2
# mkdocs
paginate==0.5.6
# via mkdocs-material
pathspec==0.11.2
pathspec==0.12.1
# via mkdocs
pillow==9.5.0
# via
# cairosvg
# mkdocs-material
pip-tools==7.3.0
# via -r requirements.python.in
platformdirs==4.0.0
platformdirs==4.1.0
# via mkdocs
psycopg2-binary==2.9.5
# via -r requirements.app.in
Expand Down Expand Up @@ -164,7 +167,7 @@ pyyaml==6.0.1
# pyyaml-env-tag
pyyaml-env-tag==0.1
# via mkdocs
regex==2023.10.3
regex==2023.12.25
# via mkdocs-material
requests==2.31.0
# via
Expand All @@ -182,13 +185,13 @@ sqlalchemy==1.4.41
# ormar
starlette==0.22.0
# via fastapi
termcolor==2.3.0
termcolor==2.4.0
# via mkdocs-macros-plugin
tinycss2==1.2.1
# via
# cairosvg
# cssselect2
typing-extensions==4.8.0
typing-extensions==4.9.0
# via pydantic
urllib3==2.1.0
# via requests
Expand All @@ -199,12 +202,14 @@ verspec==0.1.0
watchdog==3.0.0
# via mkdocs
wcmatch==8.5
# via mkdocs-awesome-pages-plugin
# via
# mkdocs-awesome-pages-plugin
# mkdocs-include-markdown-plugin
webencodings==0.5.1
# via
# cssselect2
# tinycss2
wheel==0.41.3
wheel==0.42.0
# via pip-tools
zipp==3.17.0
# via importlib-metadata
Expand Down
2 changes: 2 additions & 0 deletions scripts/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,7 @@ if [ -f .env ]; then
source .env
fi

./scripts/docs_setup.sh "$@"

## and go back
cd "$cwd"
28 changes: 28 additions & 0 deletions scripts/docs_setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash

set -e #ux

## Record directory we are called from
cwd="$(pwd)"
## Change to project directory
cd "$(dirname "$0")/.."
if [ -f .env ]; then
# shellcheck source="../.env" disable=SC1091
source .env
fi

# shellcheck disable=SC2143
if [[ ! $(pip -V) =~ .*\.venv.* ]]; then
echo "-- Activate Python virtual environment"
# shellcheck source="../.venv/bin/activate"
source .venv/bin/activate
fi

echo "-- Install Python requirements for docs in venv"
pip install -r docs/requirements.in

echo "-- Install Playwright browser dependency for PDF export"
playwright install firefox #chromium

## and go back
cd "$cwd"