Skip to content

Commit

Permalink
Merge branch 'main' into doc/desing-doc-updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicoretti authored Nov 12, 2024
2 parents fd89ddf + fc2fc48 commit 20325c4
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:

- name: Build Documentation
run: |
poetry run python -m nox -s build-docs
poetry run python -m nox -s docs:build
Lint:
name: Linting (Python-${{ matrix.python-version }})
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

- name: Build Documentation
run: |
poetry run sphinx-multiversion doc/ .html-documentation
poetry run python -m nox -s docs:multiversion
- name: Deploy
uses: JamesIves/[email protected]
Expand Down
5 changes: 5 additions & 0 deletions doc/changes/unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,15 @@
## 🚨 Breaking Changes

* Dropped python 3.8 support
* Changed names of Documentation related nox tasks
- `build-docs` -> `docs:build`
- `open-docs` -> `docs:open`
- `clean-docs` -> `docs:clean`

## ✨ Added

* Added support for multi version Documentation
* Added nox tasks for building multi-version documentation

## 🐞 Fixed

Expand Down
8 changes: 4 additions & 4 deletions doc/user_guide/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Build and open the documentation:

.. code-block:: shell
nox -s build-docs open-docs
nox -s docs:build docs:open
Execute the unit tests of the project:

Expand Down Expand Up @@ -191,9 +191,9 @@ You are ready to use the toolbox. With *nox -l* you can list all available tasks
- unit-tests -> Runs all unit tests
- integration-tests -> Runs the all integration tests
- coverage -> Runs all tests (unit + integration) and reports the code coverage
- build-docs -> Builds the project documentation
- open-docs -> Opens the built project documentation
- clean-docs -> Removes the documentations build folder
- docs:build -> Builds the project documentation
- docs:open -> Opens the built project documentation
- docs:clean -> Removes the documentations build folder
- report -> Collects and generates a metrics summary for the workspace
sessions marked with * are selected, sessions marked with - are skipped.
Expand Down
22 changes: 19 additions & 3 deletions exasol/toolbox/nox/_documentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,29 @@ def _build_docs(session: nox.Session, config: Config) -> None:
)


@nox.session(name="build-docs", python=False)
def _build_multiversion_docs(session: nox.Session, config: Config) -> None:
session.run(
"poetry",
"run",
"sphinx-multiversion",
f"{config.doc}",
DOCS_OUTPUT_DIR,
)


@nox.session(name="docs:multiversion", python=False)
def build_multiversion(session: Session) -> None:
"""Builds the project documentation"""
_build_multiversion_docs(session, PROJECT_CONFIG)


@nox.session(name="docs:build", python=False)
def build_docs(session: Session) -> None:
"""Builds the project documentation"""
_build_docs(session, PROJECT_CONFIG)


@nox.session(name="open-docs", python=False)
@nox.session(name="docs:open", python=False)
def open_docs(session: Session) -> None:
"""Opens the built project documentation"""
docs_folder = PROJECT_CONFIG.root / DOCS_OUTPUT_DIR
Expand All @@ -42,7 +58,7 @@ def open_docs(session: Session) -> None:
webbrowser.open_new_tab(index.as_uri())


@nox.session(name="clean-docs", python=False)
@nox.session(name="docs:clean", python=False)
def clean_docs(_session: Session) -> None:
"""Removes the documentations build folder"""
docs_folder = PROJECT_CONFIG.root / DOCS_OUTPUT_DIR
Expand Down
2 changes: 1 addition & 1 deletion exasol/toolbox/templates/github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:

- name: Build Documentation
run: |
poetry run python -m nox -s build-docs
poetry run python -m nox -s docs:build
Lint:
name: Linting (Python-${{ matrix.python-version }})
Expand Down

0 comments on commit 20325c4

Please sign in to comment.