Skip to content

Commit

Permalink
v(3.5.11) - GitHub Pages and documentation compilation in actions imp…
Browse files Browse the repository at this point in the history
…rovement (#445)

* Add gcloud and google.cloud to documentations mocks

* Added a mock class and overwrite WandBOutputFormat (stable baselines 3 dependency)

* Update documentation year

* Update documentation modules with new mocks

* Added Python EnergyPlus API to the sphinx mock

* Updated Sinergym version from 3.5.10 to 3.5.11

* Github Actions: Documentation process en PR and main push updated, minimal installation required and redirect documentation push to github-pages branch

* Delete documentation compilation

* Delete documentation compilation 2

* Add pandoc installation in actions

* Docker usage recommendation in documentation

* Update paths-filter to v3 in pr action

* Add docs/compilation in gitignore

* Update index for temporal doc builds, updated pr filter in actions

* Ignoring changes due to bug with many files detection

* create_pr: fix apt install pandoc with sudo

* re-enabling ifs for check source doc updates
  • Loading branch information
AlejandroCN7 authored Sep 18, 2024
1 parent b8c5577 commit 5626aa8
Show file tree
Hide file tree
Showing 13,297 changed files with 46 additions and 2,677,619 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
18 changes: 12 additions & 6 deletions .github/workflows/create_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,22 +52,28 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ vars.PYTHON_VERSION }}
- name: Verify documentation update
uses: dorny/paths-filter@v2
uses: dorny/paths-filter@v3
id: verify-documentation-update
with:
filters: |
doc:
- 'docs/source/**'
- name: Build the latest Docker image
- name: Install dependencies
if: steps.verify-documentation-update.outputs.doc == 'true'
run: docker build . --file Dockerfile --build-arg SINERGYM_EXTRAS=[extras] --tag pullrequest/sinergym:latest
- name: Compile documentation
run: |
sudo apt install pandoc
pip install -e .[doc]
- name: Check build docs
if: steps.verify-documentation-update.outputs.doc == 'true'
run: docker run -t pullrequest/sinergym:latest /bin/bash -c 'sphinx-build -M html docs/source docs/build'
run: sphinx-build -M html docs/source docs/build
- name: Check sphinx spelling
if: steps.verify-documentation-update.outputs.doc == 'true'
run: docker run -t pullrequest/sinergym:latest /bin/bash -c 'sphinx-build -M spelling docs/source docs/build'
run: sphinx-build -M spelling docs/source docs/build

tests:
name: build container and execute pytest
Expand Down
31 changes: 13 additions & 18 deletions .github/workflows/merge_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,27 +61,22 @@ jobs:
filters: |
doc:
- 'docs/source/**'
- name: Build the latest Docker image
if: steps.verify-documentation-update.outputs.doc == 'true'
run: docker build . --file Dockerfile --build-arg SINERGYM_EXTRAS=[extras] --tag pushmain/sinergym:latest
- name: Give permissions to container for see the repository
if: steps.verify-documentation-update.outputs.doc == 'true'
run: git config --global --add safe.directory /sinergym
- name: Compile documentation
- name: Install dependencies
if: steps.verify-documentation-update.outputs.doc == 'true'
run: docker run -v ${GITHUB_WORKSPACE}/docs/compilation:/workspaces/sinergym/docs/compilation -t pushmain/sinergym:latest /bin/bash -c 'sphinx-multiversion docs/source docs/compilation'
- name: Check sphinx spelling
run: |
apt install pandoc
pip install -e .[doc]
- name: Build multiversion docs
if: steps.verify-documentation-update.outputs.doc == 'true'
run: docker run -t pushmain/sinergym:latest /bin/bash -c 'sphinx-build -M spelling docs/source docs/compilation'
- name: Pull local repository (needed if format commit has been done before)
run: sphinx-multiversion docs/source docs/compilation
- name: Deploy to GitHub Pages
if: steps.verify-documentation-update.outputs.doc == 'true'
run: git pull origin main
- name: Commit and push changes if exists
if: steps.verify-documentation-update.outputs.doc == 'true'
uses: stefanzweifel/git-auto-commit-action@v5
with:
file_pattern: docs/compilation/*
commit_message: Documentation source update detected and pushed compilation build directory for Github Pages
run: |
git config --local user.name "GitHub Actions"
git config --local user.email "[email protected]"
git add docs/compilation
git commit -m "Deploy documentation to GitHub Pages"
git push --force origin `git subtree split --prefix build main`:github-pages
tests:
needs: [apply-autopep8]
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ start_mlflow_tracking.sh
# Source docs _build directory generation using RST preview in Visual Studio Code
docs/source/_build/
docs/build/
docs/compilation/

#dist folder for pypi packages
dist/
Expand Down
Binary file removed docs/compilation/doctrees/environment.pickle
Binary file not shown.
Binary file removed docs/compilation/doctrees/index.doctree
Binary file not shown.
246 changes: 0 additions & 246 deletions docs/compilation/doctrees/nbsphinx/pages/notebooks/basic_example.ipynb

This file was deleted.

Loading

0 comments on commit 5626aa8

Please sign in to comment.