diff --git a/docs/develop.md b/docs/develop.md index 89dd0bc..bd0804b 100644 --- a/docs/develop.md +++ b/docs/develop.md @@ -92,3 +92,13 @@ hatch build ``` Hatch will store the build distribution files in the `dist/` directory of the cloned repo. + +## Making a release + +Currently we are using a manual versioning process where you need to +update the version of the package in our `__init__.py` file. Please +be sure to do this before cutting a new release on GitHub. + +Once you have updated the version of the package, you are ready to make a release on GitHub. + +A new tagged release will push the newly built theme to PyPI. diff --git a/pyproject.toml b/pyproject.toml index 2fcd017..d9d236e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,9 +1,9 @@ [build-system] -requires = ["hatchling", "hatch-vcs", "sphinx-theme-builder @ https://github.com/pradyunsg/sphinx-theme-builder/archive/87214d0671c943992c05e3db01dca997e156e8d6.zip",] +requires = ["sphinx-theme-builder @ https://github.com/pradyunsg/sphinx-theme-builder/archive/87214d0671c943992c05e3db01dca997e156e8d6.zip",] build-backend = "sphinx_theme_builder" [tool.sphinx-theme-builder] -node-version = "16.13.2" +node-version = "22.9.0" theme-name = "pyos_sphinx_theme" [project] @@ -11,9 +11,9 @@ name = "pyos-sphinx-theme" description = "PyOS Documentation Theme." dynamic = ["version"] readme = "README.md" -authors = [{ name = "Leah Wasser", email = "leah@pyopensci.org" }] +authors = [{ name = "pyOpenSci Community", email = "pyopensci@pyopensci.org" }] maintainers = [ - { name = "pyOpenSci", email = "admin@pyopensci.org" }, # Optional + { name = "pyOpenSci", email = "pyopensci@pyopensci.org" }, ] requires-python = ">=3.9" diff --git a/src/pyos_sphinx_theme/__init__.py b/src/pyos_sphinx_theme/__init__.py index 49d516e..849a07b 100644 --- a/src/pyos_sphinx_theme/__init__.py +++ b/src/pyos_sphinx_theme/__init__.py @@ -8,7 +8,7 @@ # from sphinx_book_theme import hash_assets_for_files from sphinx.util import logging -__version__ = "0.1.dev0" +__version__ = "0.2.dev0" current_year = datetime.now().year organization_name = "pyOpenSci" @@ -17,18 +17,22 @@ THIS_PATH = Path(__file__).parent.resolve() THEME_PATH = THIS_PATH / "theme" / "pyos_sphinx_theme" TEMPLATE_PATH = THEME_PATH / "templates" -LOGO_LIGHT = str((THEME_PATH / "static" / "images" / "logo-light-mode.png").absolute()).replace( - "\\", "/" -) -LOGO_DARK = str((THEME_PATH / "static" / "images" / "logo-dark-mode.png").absolute()).replace( - "\\", "/" -) +LOGO_LIGHT = str( + (THEME_PATH / "static" / "images" / "logo-light-mode.png").absolute() +).replace("\\", "/") +LOGO_DARK = str( + (THEME_PATH / "static" / "images" / "logo-dark-mode.png").absolute() +).replace("\\", "/") PYOPENSCI_LOGO_PACKAGE_GUIDE = str( - (THEME_PATH / "static" / "images" / "pyopensci-logo-package-guide.png").absolute() + ( + THEME_PATH / "static" / "images" / "pyopensci-logo-package-guide.png" + ).absolute() ).replace("\\", "/") PYOPENSCI_PYTHON_PACKAGE_GUIDE = str( - (THEME_PATH / "static" / "images" / "pyopensci-python-package-guide.png").absolute() + ( + THEME_PATH / "static" / "images" / "pyopensci-python-package-guide.png" + ).absolute() ).replace("\\", "/") @@ -64,7 +68,10 @@ def update_config(app): ] if "logo" not in theme_options: - theme_options["logo"] = {"image_dark": LOGO_DARK, "image_light": LOGO_LIGHT} + theme_options["logo"] = { + "image_dark": LOGO_DARK, + "image_light": LOGO_LIGHT, + } if "header_links_before_dropdown" not in theme_options: theme_options["header_links_before_dropdown"] = 4 @@ -81,7 +88,9 @@ def update_config(app): app.config.copyright = f"{current_year}, {organization_name}" # If no html_logo is set then use a stock pyOpenSci logo - if not config_provided_by_user(app, "html_logo") and not social_cards.get("image"): + if not config_provided_by_user(app, "html_logo") and not social_cards.get( + "image" + ): line_color = "#6D597A" social_cards["image"] = str(LOGO_LIGHT) social_cards["line_color"] = line_color