diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c4768be14..7c2c566c5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,6 +9,7 @@ repos: rev: 5.10.1 hooks: - id: isort + args: ["--profile", "black"] - repo: https://github.com/PyCQA/flake8 rev: 5.0.4 diff --git a/VERSION b/VERSION index af0b7ddbf..b0f3d96f8 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.0.6 +1.0.8 diff --git a/doc/source/conf.py b/doc/source/conf.py index bec783f9e..fef20ab2a 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -1,30 +1,23 @@ """Sphinx documentation configuration file.""" +import os import pathlib import yaml -from ansys_sphinx_theme import ansys_favicon, ansys_logo_black +from ansys_sphinx_theme import ansys_favicon, ansys_logo_black, get_version_match from tabulate import tabulate as Table # Project information project = "PyAnsys Actions" copyright = "(c) 2022 ANSYS, Inc. All rights reserved" author = "ANSYS, Inc." +cname = os.getenv("DOCUMENTATION_CNAME", "nocname.com") # Read version from VERSION file in base root directory source_dir = pathlib.Path(__file__).parent.resolve().absolute() version_file = source_dir / "../../VERSION" with open(str(version_file), "r") as file: __version__ = file.read().splitlines()[0] -release = version = __version__ - - -def get_version_match(semver): - """Evaluate the version match for the multi-documentation.""" - if semver.endswith("dev0"): - return "dev" - major, minor, _ = semver.split(".") - return ".".join([major, minor]) # Use the default pyansys logo @@ -33,14 +26,11 @@ def get_version_match(semver): html_favicon = ansys_favicon # Specify the location of your GitHub repo -version_mapper = ( - "https://raw.githubusercontent.com/pyansys/actions/gh-pages/release/versions.json" -) html_theme_options = { "github_url": "https://github.com/pyansys/actions", "show_prev_next": False, "switcher": { - "json_url": version_mapper, + "json_url": f"https://{cname}/release/versions.json", "version_match": get_version_match(__version__), }, "navbar_end": ["version-switcher", "theme-switcher", "navbar-icon-links"], diff --git a/requirements/requirements_doc.txt b/requirements/requirements_doc.txt index 6c27aa2d4..52d54d952 100644 --- a/requirements/requirements_doc.txt +++ b/requirements/requirements_doc.txt @@ -1,4 +1,4 @@ -ansys-sphinx-theme==0.7.0 +ansys-sphinx-theme==0.7.4 pyyaml==6.0.0 Sphinx==5.3.0 sphinx-copybutton==0.5 diff --git a/tests/pyansys-actions/pyproject.toml b/tests/pyansys-actions/pyproject.toml index 970eda39d..7d9bc96ae 100644 --- a/tests/pyansys-actions/pyproject.toml +++ b/tests/pyansys-actions/pyproject.toml @@ -5,7 +5,7 @@ build-backend = "flit_core.buildapi" [project] # Check https://flit.readthedocs.io/en/latest/pyproject_toml.html for all available sections name = "ansys-actions-core" -version = "1.0.2" +version = "1.0.8" description = "A demo library for testing pyansys actions" readme = "README.rst" requires-python = ">=3.7"