Skip to content

Commit

Permalink
introduce conda-lock file for docs (#4553)
Browse files Browse the repository at this point in the history
* introduce conda-lock file for docs

Signed-off-by: Niels Bantilan <[email protected]>

* add back _version.py

Signed-off-by: Niels Bantilan <[email protected]>

---------

Signed-off-by: Niels Bantilan <[email protected]>
  • Loading branch information
cosmicBboy authored Dec 8, 2023
1 parent e221f9f commit f440278
Show file tree
Hide file tree
Showing 6 changed files with 16,732 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ jobs:
- name: Codespell
uses: codespell-project/actions-codespell@v2
with:
skip: "*.pb"
skip: "*.pb,monodocs-environment.lock.yaml"
15 changes: 9 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,15 @@ jobs:
uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: 3.9
mamba-version: "*"
channels: conda-forge
channel-priority: true
activate-environment: monodocs-env
environment-file: monodocs-environment.yaml
- shell: bash -el {0}
run: |
conda install -c conda-forge conda-lock
conda-lock install -n monodocs-env monodocs-environment.lock.yaml
- shell: bash -el {0}
run: |
conda activate monodocs-env
conda info
conda list
conda config --show-sources
Expand All @@ -48,7 +49,9 @@ jobs:
uses: ts-graphviz/setup-graphviz@v1
- name: Build the documentation
shell: bash -el {0}
run: make docs
run: |
conda activate monodocs-env
make docs
generate_kustomize:
runs-on: ubuntu-latest
Expand Down
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ install-piptools: ## Install pip-tools
doc-requirements.txt: doc-requirements.in install-piptools
$(call PIP_COMPILE,doc-requirements.in)

.PHONY: install-conda-lock
install-conda-lock:
pip install conda-lock

.PHONY: conda-lock
conda-lock: install-conda-lock
conda-lock -f monodocs-environment.yaml --without-cuda --lockfile monodocs-environment.lock.yaml

.PHONY: stats
stats:
@generate-dashboard -o deployment/stats/prometheus/flytepropeller-dashboard.json stats/flytepropeller.dashboard.py
Expand Down
11 changes: 8 additions & 3 deletions docs/.readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,15 @@ build:
os: "ubuntu-22.04"
tools:
python: "mambaforge-22.9"
commands:
- cat monodocs-environment.lock.yaml
- mamba install -c conda-forge conda-lock
- conda-lock install -p /home/docs/monodocs-env monodocs-environment.lock.yaml
- conda info
- conda env list
- cat docs/conf.py
- cd docs && /home/docs/monodocs-env/bin/python -m sphinx -T -E -b html -d docs/_build/doctrees -D language=en . $READTHEDOCS_OUTPUT/html

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py

conda:
environment: monodocs-environment.yaml
Loading

0 comments on commit f440278

Please sign in to comment.