afterpython 0.4.6__tar.gz → 0.4.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {afterpython-0.4.6 → afterpython-0.4.7}/PKG-INFO +1 -1
- {afterpython-0.4.6 → afterpython-0.4.7}/pyproject.toml +1 -1
- {afterpython-0.4.6 → afterpython-0.4.7}/pyproject.toml.orig +1 -1
- {afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/builders/build_pdoc.py +10 -4
- {afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/templates/pdoc/frame.html.jinja2 +5 -2
- afterpython-0.4.7/src/afterpython/templates/pdoc/module.html.jinja2 +13 -0
- {afterpython-0.4.6 → afterpython-0.4.7}/README.md +0 -0
- {afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/__init__.py +0 -0
- {afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/_io/toml.py +0 -0
- {afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/_io/yaml.py +0 -0
- {afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/_paths.py +0 -0
- {afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/_typing.py +0 -0
- {afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/builders/__init__.py +0 -0
- {afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/builders/comments_json.py +0 -0
- {afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/builders/content_json.py +0 -0
- {afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/builders/faq_json.py +0 -0
- {afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/builders/index_md.py +0 -0
- {afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/builders/jupyter_notebook.py +0 -0
- {afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/builders/llms_txt.py +0 -0
- {afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/builders/marimo_content.py +0 -0
- {afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/builders/marimo_notebook.py +0 -0
- {afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/builders/markdown.py +0 -0
- {afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/builders/metadata.py +0 -0
- {afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/builders/url_md.py +0 -0
- {afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/cli/__init__.py +0 -0
- {afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/cli/commands/add.py +0 -0
- {afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/cli/commands/build.py +0 -0
- {afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/cli/commands/bump.py +0 -0
- {afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/cli/commands/changelog.py +0 -0
- {afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/cli/commands/check.py +0 -0
- {afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/cli/commands/clean.py +0 -0
- {afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/cli/commands/commit_msg.py +0 -0
- {afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/cli/commands/dev.py +0 -0
- {afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/cli/commands/format.py +0 -0
- {afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/cli/commands/init.py +0 -0
- {afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/cli/commands/init_branch_rules.py +0 -0
- {afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/cli/commands/install.py +0 -0
- {afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/cli/commands/lint.py +0 -0
- {afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/cli/commands/lock.py +0 -0
- {afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/cli/commands/prek.py +0 -0
- {afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/cli/commands/preview.py +0 -0
- {afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/cli/commands/release.py +0 -0
- {afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/cli/commands/remove.py +0 -0
- {afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/cli/commands/serve.py +0 -0
- {afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/cli/commands/start.py +0 -0
- {afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/cli/commands/sync.py +0 -0
- {afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/cli/commands/update.py +0 -0
- {afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/cli/main.py +0 -0
- {afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/const.py +0 -0
- {afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/main.py +0 -0
- {afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/pcu.py +0 -0
- {afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/py.typed +0 -0
- {afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/templates/afterpython-template.toml +0 -0
- {afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/templates/ci-workflow-template.yml +0 -0
- {afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/templates/cliff-template.toml +0 -0
- {afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/templates/dependabot-template.yml +0 -0
- {afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/templates/deploy-workflow-template.yml +0 -0
- {afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/templates/pdoc/custom.css +0 -0
- {afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/templates/pdoc/syntax-highlighting.css +0 -0
- {afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/templates/pdoc/theme.css +0 -0
- {afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/templates/pre-commit-config-template.yaml +0 -0
- {afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/templates/release-workflow-template.yml +0 -0
- {afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/templates/ruff-template.toml +0 -0
- {afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/templates/ty-template.toml +0 -0
- {afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/tools/_afterpython.py +0 -0
- {afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/tools/_git.py +0 -0
- {afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/tools/branch_rules.py +0 -0
- {afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/tools/github_actions.py +0 -0
- {afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/tools/myst.py +0 -0
- {afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/tools/prek.py +0 -0
- {afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/tools/pyproject.py +0 -0
- {afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/utils.py +0 -0
- {afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/version.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: afterpython
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.7
|
|
4
4
|
Summary: CLI tool to streamline Python package maintenance and generate a dedicated project website
|
|
5
5
|
Keywords: package-maintenance,project-website,static-site-generator,developer-tools,documentation,cli-tool,ci/cd,mystmd,semantic-release,python-packaging
|
|
6
6
|
Author: Stephen Yau
|
|
@@ -20,6 +20,7 @@ def build_pdoc(base_path: str) -> None:
|
|
|
20
20
|
back to the project website root (matches MyST's UX).
|
|
21
21
|
"""
|
|
22
22
|
from afterpython._io.toml import _from_tomlkit
|
|
23
|
+
from afterpython.builders.metadata import _resolve_logo_path
|
|
23
24
|
from afterpython.tools._afterpython import read_afterpython
|
|
24
25
|
|
|
25
26
|
package_dir = find_package_directory()
|
|
@@ -37,16 +38,21 @@ def build_pdoc(base_path: str) -> None:
|
|
|
37
38
|
# user's own package, whose import-time behavior the user already trusts.
|
|
38
39
|
env = {**os.environ, "PDOC_ALLOW_EXEC": "1"}
|
|
39
40
|
|
|
40
|
-
#
|
|
41
|
-
#
|
|
42
|
-
#
|
|
41
|
+
# Logos come from afterpython.toml (afterpython/static/ is served at the
|
|
42
|
+
# site root); logo.svg is the project-website-template's fallback.
|
|
43
|
+
# pdoc's --logo takes one image, so the dark one goes through an env var
|
|
44
|
+
# that module.html.jinja2 reads (pdoc exposes os.environ to templates as
|
|
45
|
+
# `env`). logo-link points back to the project website root.
|
|
46
|
+
logo = _resolve_logo_path(website.get("logo", "")) or "/logo.svg"
|
|
47
|
+
logo_dark = _resolve_logo_path(website.get("logo_dark", ""))
|
|
48
|
+
env["AP_PDOC_LOGO_DARK"] = f"{base_path}{logo_dark}" if logo_dark else ""
|
|
43
49
|
result = subprocess.run(
|
|
44
50
|
[
|
|
45
51
|
"pdoc",
|
|
46
52
|
"-o",
|
|
47
53
|
str(output_dir),
|
|
48
54
|
"--logo",
|
|
49
|
-
f"{base_path}
|
|
55
|
+
f"{base_path}{logo}",
|
|
50
56
|
"--logo-link",
|
|
51
57
|
f"{base_path}/",
|
|
52
58
|
"--template-directory",
|
|
@@ -14,8 +14,11 @@
|
|
|
14
14
|
});
|
|
15
15
|
})();
|
|
16
16
|
</script>
|
|
17
|
-
{# Override pdoc's default 35vh logo height — too dominant in the sidebar.
|
|
17
|
+
{# Override pdoc's default 35vh logo height — too dominant in the sidebar.
|
|
18
|
+
The dark logo (see module.html.jinja2) replaces the light one in dark mode. #}
|
|
18
19
|
<style>
|
|
19
|
-
nav.pdoc img.logo { max-height:
|
|
20
|
+
nav.pdoc img.logo { max-height: 3rem; margin-bottom: 1.5rem; }
|
|
21
|
+
nav.pdoc img.logo-dark, html.dark nav.pdoc img.logo-light { display: none; }
|
|
22
|
+
html.dark nav.pdoc img.logo-dark { display: block; }
|
|
20
23
|
</style>
|
|
21
24
|
{% endblock %}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{% extends "default/module.html.jinja2" %}
|
|
2
|
+
{# Same as pdoc's nav_title, plus the dark logo (if set in afterpython.toml),
|
|
3
|
+
shown instead of the light one in dark mode by frame.html.jinja2's style. #}
|
|
4
|
+
{% block nav_title %}
|
|
5
|
+
{% if logo %}
|
|
6
|
+
{% if logo_link %}<a href="{{ logo_link }}">{% endif %}
|
|
7
|
+
<img src="{{ logo }}" class="logo{% if env.AP_PDOC_LOGO_DARK %} logo-light{% endif %}" alt="project logo"/>
|
|
8
|
+
{% if env.AP_PDOC_LOGO_DARK %}
|
|
9
|
+
<img src="{{ env.AP_PDOC_LOGO_DARK }}" class="logo logo-dark" alt="project logo"/>
|
|
10
|
+
{% endif %}
|
|
11
|
+
{% if logo_link %}</a>{% endif %}
|
|
12
|
+
{% endif %}
|
|
13
|
+
{% endblock %}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/templates/deploy-workflow-template.yml
RENAMED
|
File without changes
|
|
File without changes
|
{afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/templates/pdoc/syntax-highlighting.css
RENAMED
|
File without changes
|
|
File without changes
|
{afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/templates/pre-commit-config-template.yaml
RENAMED
|
File without changes
|
{afterpython-0.4.6 → afterpython-0.4.7}/src/afterpython/templates/release-workflow-template.yml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|