Skip to content

Commit 603e073

Browse files
committed
Fix: force versioning
1 parent 6fbb588 commit 603e073

File tree

3 files changed

+34
-15
lines changed

3 files changed

+34
-15
lines changed

docs/develop.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,3 +92,13 @@ hatch build
9292
```
9393

9494
Hatch will store the build distribution files in the `dist/` directory of the cloned repo.
95+
96+
## Making a release
97+
98+
Currently we are using a manual versioning process where you need to
99+
update the version of the package in our `__init__.py` file. Please
100+
be sure to do this before cutting a new release on GitHub.
101+
102+
Once you have updated the version of the package, you are ready to make a release on GitHub.
103+
104+
A new tagged release will push the newly built theme to PyPI.

pyproject.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
[build-system]
2-
requires = ["hatchling", "hatch-vcs", "sphinx-theme-builder @ https://github.com/pradyunsg/sphinx-theme-builder/archive/87214d0671c943992c05e3db01dca997e156e8d6.zip",]
2+
requires = ["sphinx-theme-builder @ https://github.com/pradyunsg/sphinx-theme-builder/archive/87214d0671c943992c05e3db01dca997e156e8d6.zip",]
33
build-backend = "sphinx_theme_builder"
44

55
[tool.sphinx-theme-builder]
6-
node-version = "16.13.2"
6+
node-version = "22.9.0"
77
theme-name = "pyos_sphinx_theme"
88

99
[project]
1010
name = "pyos-sphinx-theme"
1111
description = "PyOS Documentation Theme."
1212
dynamic = ["version"]
1313
readme = "README.md"
14-
authors = [{ name = "Leah Wasser", email = "leah@pyopensci.org" }]
14+
authors = [{ name = "pyOpenSci Community", email = "pyopensci@pyopensci.org" }]
1515
maintainers = [
16-
{ name = "pyOpenSci", email = "admin@pyopensci.org" }, # Optional
16+
{ name = "pyOpenSci", email = "pyopensci@pyopensci.org" },
1717
]
1818

1919
requires-python = ">=3.9"

src/pyos_sphinx_theme/__init__.py

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# from sphinx_book_theme import hash_assets_for_files
99
from sphinx.util import logging
1010

11-
__version__ = "0.1.dev0"
11+
__version__ = "0.2.dev0"
1212
current_year = datetime.now().year
1313
organization_name = "pyOpenSci"
1414

@@ -17,18 +17,22 @@
1717
THIS_PATH = Path(__file__).parent.resolve()
1818
THEME_PATH = THIS_PATH / "theme" / "pyos_sphinx_theme"
1919
TEMPLATE_PATH = THEME_PATH / "templates"
20-
LOGO_LIGHT = str((THEME_PATH / "static" / "images" / "logo-light-mode.png").absolute()).replace(
21-
"\\", "/"
22-
)
23-
LOGO_DARK = str((THEME_PATH / "static" / "images" / "logo-dark-mode.png").absolute()).replace(
24-
"\\", "/"
25-
)
20+
LOGO_LIGHT = str(
21+
(THEME_PATH / "static" / "images" / "logo-light-mode.png").absolute()
22+
).replace("\\", "/")
23+
LOGO_DARK = str(
24+
(THEME_PATH / "static" / "images" / "logo-dark-mode.png").absolute()
25+
).replace("\\", "/")
2626

2727
PYOPENSCI_LOGO_PACKAGE_GUIDE = str(
28-
(THEME_PATH / "static" / "images" / "pyopensci-logo-package-guide.png").absolute()
28+
(
29+
THEME_PATH / "static" / "images" / "pyopensci-logo-package-guide.png"
30+
).absolute()
2931
).replace("\\", "/")
3032
PYOPENSCI_PYTHON_PACKAGE_GUIDE = str(
31-
(THEME_PATH / "static" / "images" / "pyopensci-python-package-guide.png").absolute()
33+
(
34+
THEME_PATH / "static" / "images" / "pyopensci-python-package-guide.png"
35+
).absolute()
3236
).replace("\\", "/")
3337

3438

@@ -64,7 +68,10 @@ def update_config(app):
6468
]
6569

6670
if "logo" not in theme_options:
67-
theme_options["logo"] = {"image_dark": LOGO_DARK, "image_light": LOGO_LIGHT}
71+
theme_options["logo"] = {
72+
"image_dark": LOGO_DARK,
73+
"image_light": LOGO_LIGHT,
74+
}
6875

6976
if "header_links_before_dropdown" not in theme_options:
7077
theme_options["header_links_before_dropdown"] = 4
@@ -81,7 +88,9 @@ def update_config(app):
8188
app.config.copyright = f"{current_year}, {organization_name}"
8289

8390
# If no html_logo is set then use a stock pyOpenSci logo
84-
if not config_provided_by_user(app, "html_logo") and not social_cards.get("image"):
91+
if not config_provided_by_user(app, "html_logo") and not social_cards.get(
92+
"image"
93+
):
8594
line_color = "#6D597A"
8695
social_cards["image"] = str(LOGO_LIGHT)
8796
social_cards["line_color"] = line_color

0 commit comments

Comments
 (0)