Skip to content

Commit

Permalink
fix: update logo and theme
Browse files Browse the repository at this point in the history
  • Loading branch information
Revathyvenugopal162 committed Aug 16, 2024
1 parent f7203ba commit 5bf8e73
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 33 deletions.
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
repos:

- repo: https://github.com/psf/black
rev: 23.3.0
rev: 24.8.0
hooks:
- id: black
exclude: ^src/ansys/templates/python/

- repo: https://github.com/pycqa/isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort

- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
rev: 7.1.1
hooks:
- id: flake8
args: [
Expand All @@ -32,7 +32,7 @@ repos:
exclude: ^src/ansys/templates/python/|^tests

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.6.0
hooks:
- id: check-merge-conflict
- id: check-yaml
Expand All @@ -42,12 +42,12 @@ repos:

# Validates github workflow files
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.22.0
rev: 0.29.1
hooks:
- id: check-github-workflows

- repo: https://github.com/ansys/pre-commit-hooks
rev: v0.3.1
rev: v0.4.3
hooks:
- id: add-license-headers
args:
Expand Down
5 changes: 2 additions & 3 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from datetime import datetime
import os

from ansys_sphinx_theme import ansys_favicon, ansys_logo_black, get_version_match
from ansys_sphinx_theme import ansys_favicon, get_version_match

from ansys.templates import __version__

Expand All @@ -38,7 +38,6 @@
switcher_version = get_version_match(__version__)

# use the default pyansys logo
html_logo = ansys_logo_black
html_favicon = ansys_favicon
html_theme = "ansys_sphinx_theme"
html_short_title = html_title = project # necessary for proper breadcrumb title
Expand All @@ -58,7 +57,7 @@
"json_url": f"https://{cname}/versions.json",
"version_match": get_version_match(__version__),
},
"check_switcher": False,
"logo": "ansys",
}

# Sphinx extensions
Expand Down
7 changes: 3 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ maintainers = [
classifiers = [
"Development Status :: 4 - Beta",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
Expand All @@ -64,9 +63,9 @@ tests = [
"pytest-cov==4.1.0",
]
doc = [
"ansys-sphinx-theme==0.16.5",
"numpydoc==1.6.0",
"sphinx==7.3.7",
"ansys-sphinx-theme==1.0.5",
"numpydoc==1.8.0",
"Sphinx==8.0.2",
"sphinx-copybutton==0.5.2",
]

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
repos:

- repo: https://github.com/psf/black
rev: 24.4.2
rev: 24.8.0
hooks:
- id: black

Expand All @@ -11,12 +11,12 @@ repos:
- id: isort

- repo: https://github.com/PyCQA/flake8
rev: 7.0.0
rev: 7.1.1
hooks:
- id: flake8

- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
rev: v2.3.0
hooks:
- id: codespell

Expand All @@ -35,11 +35,11 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.28.2
rev: 0.29.1
hooks:
- id: check-github-workflows

- repo: https://github.com/ansys/pre-commit-hooks
rev: v0.3.1
rev: v0.4.3
hooks:
- id: add-license-headers
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,6 @@
import os

from ansys_sphinx_theme import get_version_match
{%- if cookiecutter.__logo == "ansys" and cookiecutter.__logo_color == "white" %}
from ansys_sphinx_theme import ansys_logo_white as logo
{%- elif cookiecutter.__logo == "ansys" and cookiecutter.__logo_color == "black" %}
from ansys_sphinx_theme import ansys_logo_black as logo
{%- elif cookiecutter.__logo == "pyansys" and cookiecutter.__logo_color == "white" %}
from ansys_sphinx_theme import pyansys_logo_white as logo
{%- elif cookiecutter.__logo == "pyansys" and cookiecutter.__logo_color == "black" %}
from ansys_sphinx_theme import pyansys_logo_black as logo
{%- endif %}

{%- if cookiecutter.__template_name != "doc-project" %}
from {{cookiecutter.__pkg_namespace}} import __version__
Expand All @@ -36,7 +27,6 @@
switcher_version = get_version_match(__version__)

# Select desired logo, theme, and declare the html title
html_logo = logo
html_theme = "ansys_sphinx_theme"
html_short_title = html_title = "{{ cookiecutter.__project_name_slug }}"

Expand All @@ -57,6 +47,11 @@
"version_match": switcher_version,
},
"check_switcher": False,
{%- if cookiecutter.__logo == "pyansys" %}
"logo": "pyansys",
{%- elif cookiecutter.__logo == "ansys" %}
"logo": "ansys",
{%- endif %}
}

# Sphinx extensions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,16 @@ dependencies = []

[project.optional-dependencies]
tests = [
"pytest==7.4.3",
"pytest==8.2.1",
"pytest-cov==4.1.0",
]
doc = [
"ansys-sphinx-theme==0.15.2",
"numpydoc==1.7.0",
"sphinx==7.3.7",
"ansys-sphinx-theme==1.0.5",
"numpydoc==1.8.0",
"Sphinx==8.0.2",
"sphinx-copybutton==0.5.2",
]


[tool.flit.module]
name = "{{ cookiecutter.__pkg_namespace }}"

Expand Down

0 comments on commit 5bf8e73

Please sign in to comment.