Skip to content
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ MANIFEST
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt
Expand Down Expand Up @@ -163,3 +162,8 @@ doc/source/examples/gallery-examples/
doc/source/sg_execution_times.rst
# rendering of sphinx autoapi examples
doc/source/examples/api/


# node modules and env
node_modules/
.nodeenv/
1 change: 1 addition & 0 deletions doc/changelog.d/639.maintenance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
feat: migrate the builds system to stb
39 changes: 22 additions & 17 deletions doc/changelog.d/changelog_template.jinja
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
{% if sections[""] %}
{% for category, val in definitions.items() if category in sections[""] %}

{{ definitions[category]['name'] }}
{% set underline = '^' * definitions[category]['name']|length %}
{{ underline }}

{% for text, values in sections[""][category].items() %}
- {{ text }} {{ values|join(', ') }}
{% endfor %}

{% endfor %}
{% else %}
No significant changes.


{% endif %}
{% if sections[""] %}

.. tab-set::

{%+ for category, val in definitions.items() if category in sections[""] %}

.. tab-item:: {{ definitions[category]['name'] }}

.. list-table::
:header-rows: 0
:widths: auto

{% for text, values in sections[""][category].items() %}
* - {{ text }}
- {{ values|join(', ') }}

{% endfor %}
{% endfor %}

{% else %}
No significant changes.
{% endif %}
11 changes: 11 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "ansys_sphinx_theme",
"repository": "https://github.com/ansys/ansys-sphinx-theme",

"description": "",
"main": "",
"scripts": {
"build": "echo 'No build step needed' "
},
"dependencies": {},
"devDependencies": {}
}
42 changes: 18 additions & 24 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
[build-system]
requires = ["flit_core >=3.2,<4"]
build-backend = "flit_core.buildapi"
requires = [
"sphinx-theme-builder @ https://github.com/pradyunsg/sphinx-theme-builder/archive/87214d0671c943992c05e3db01dca997e156e8d6.zip",
]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason for this particular commit? Why not pointing to the latest stable version?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I initially encountered an infinite loop while testing with another package, possibly due to an oversight when adapting from PyData. I'll test the latest release again and make the necessary adjustments.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this going to prevent us from releasing? I know PyPI doesn't like links to repositories as dependencies

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i updated to latest version, working with my tox env, (may be issue is only with nox env)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you elaborate more about this issue, @Revathyvenugopal162?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, STB can run the docs live using the command stb serve doc/source/ --open-browser. However, I encountered an issue where it was stuck in an infinite loop, preventing the browser from opening and running it properly. I referred to other themes and noticed they were using a specific commit. After testing with Tox, it worked fine, so the issue might be related to my environment or possibly the Nox environment.

Copy link
Contributor Author

@Revathyvenugopal162 Revathyvenugopal162 Mar 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i will open another PR to add docs-preview in tox env, but the issue persists when using Sphinx-Gallery with build_example = True, causing the docs to enter an infinite loop.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR : #642

build-backend = "sphinx_theme_builder"

[tool.sphinx-theme-builder]
node-version = "22.9.0"
theme-name = "ansys_sphinx_theme"

[project]
# Check https://flit.readthedocs.io/en/latest/pyproject_toml.html for all available sections
Expand Down Expand Up @@ -63,19 +69,7 @@ changelog = [
]

[project.entry-points."sphinx.html_themes"]
ansys_sphinx_theme = "ansys_sphinx_theme"

[tool.flit.module]
name = "ansys_sphinx_theme"

[tool.flit.sdist]
include = [
"src/ansys_sphinx_theme/theme/ansys_sphinx_theme/layout.html",
"src/ansys_sphinx_theme/theme/ansys_sphinx_theme/components/breadcrumbs.html",
"src/ansys_sphinx_theme/theme/ansys_sphinx_theme/theme.conf",
"src/ansys_sphinx_theme/theme/ansys_sphinx_theme/_templates/",
"src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/",
]
"ansys_sphinx_theme" = "ansys_sphinx_theme"

[project.urls]
Home = "https://sphinxdocs.ansys.com/"
Expand Down Expand Up @@ -147,18 +141,18 @@ name = "Fixed"
showcontent = true

[[tool.towncrier.type]]
directory = "dependencies"
name = "Dependencies"
directory = "documentation"
name = "Documentation"
showcontent = true

[[tool.towncrier.type]]
directory = "miscellaneous"
name = "Miscellaneous"
directory = "test"
name = "Test"
showcontent = true

[[tool.towncrier.type]]
directory = "documentation"
name = "Documentation"
directory = "dependencies"
name = "Dependencies"
showcontent = true

[[tool.towncrier.type]]
Expand All @@ -167,6 +161,6 @@ name = "Maintenance"
showcontent = true

[[tool.towncrier.type]]
directory = "test"
name = "Test"
showcontent = true
directory = "miscellaneous"
name = "Miscellaneous"
showcontent = true
Empty file.
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
@import "sphinx-design.css";
@import "table-custom.css";
@import "sphinx-gallery.css";
@import "whatsnew.css";
@import "nbsphinx.css";
@import "ansys-sphinx-theme-variable.css";

/*
* Code cell
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
@import "ansys-sphinx-theme-variable.css";

.static-search-results {
display: flex;
flex-direction: column;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
/* Provided by the Sphinx base theme template at build time,
styles exclusively for the ansys-sphinx-theme classes. */

@import "ansys-sphinx-theme-variable.css";

/**
* Breadcrumbs
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/* Changes associated with the Ansys Sphinx Theme */
/* for pydata-sphinx-theme */
@import "ansys-sphinx-theme-variable.css";

/*
*
* _secondary sidebar and primary sidebars
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
@import "ansys-sphinx-theme-variable.css";

/**
* Sphinx gallery output cell
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[theme]
inherit = pydata_sphinx_theme
stylesheet = styles/ansys-sphinx-theme.css

[options]
contact_mail =
Expand Down
Loading