Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -161,3 +161,6 @@ cython_debug/
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
.idea/

# Downloaded assets
docs/assets/downloaded/
2 changes: 1 addition & 1 deletion docs/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,4 @@ zappend --help-config md > docs/config.md
`zappend` is open source made available under the terms and conditions of the
[MIT License](https://github.com/bcdev/zappend/blob/main/LICENSE).

Copyright © 2024 Brockmann Consult Development
Copyright © 2024-2026 Brockmann Consult Development
48 changes: 48 additions & 0 deletions docs/hooks/download_fonts.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Copyright © 2024-2026 Brockmann Consult and contributors
# Permissions are hereby granted under the terms of the MIT License:
# https://opensource.org/licenses/MIT.

from pathlib import Path
from urllib.error import URLError
from urllib.request import urlretrieve

ROBOTO_BASE_URL = "https://raw.githubusercontent.com/google/fonts/main/ofl/roboto"

DOWNLOADS = (
{
"name": "Roboto.ttf",
"url": f"{ROBOTO_BASE_URL}/Roboto%5Bwdth,wght%5D.ttf",
},
{
"name": "Roboto-Italic.ttf",
"url": f"{ROBOTO_BASE_URL}/Roboto-Italic%5Bwdth,wght%5D.ttf",
},
{
"name": "OFL.txt",
"url": f"{ROBOTO_BASE_URL}/OFL.txt",
},
)


def on_config(config):
"""Download self-hosted Roboto assets before MkDocs builds the site."""
docs_dir = Path(config["docs_dir"])
font_dir = docs_dir / "assets" / "downloaded" / "fonts"
font_dir.mkdir(parents=True, exist_ok=True)

for item in DOWNLOADS:
target = font_dir / item["name"]
if target.exists():
continue

try:
print(f"Downloading Roboto asset: {item['name']}")
urlretrieve(item["url"], target)
except URLError as exc:
raise RuntimeError(
f"Could not download {item['name']} from {item['url']}. "
"Check your network connection or place the file manually in "
f"{font_dir}."
) from exc

return config
17 changes: 17 additions & 0 deletions docs/overrides/partials/copyright.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!--
~ Copyright © 2024-2026 Brockmann Consult and contributors
~ Permissions are hereby granted under the terms of the MIT License:
~ https://opensource.org/licenses/MIT.
-->

<div class="md-copyright">
{% if config.copyright %}
<div class="md-copyright__highlight">
{{ config.copyright }}
{% for link in config.extra.footer_links %}
&nbsp;&nbsp;&nbsp;
<a href="{{ link.href }}" rel="noopener">{{ link.text }}</a>
{% endfor %}
</div>
{% endif %}
</div>
21 changes: 21 additions & 0 deletions docs/stylesheet/extra.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
@font-face {
font-family: "Roboto";
src: url("../assets/downloaded/fonts/Roboto.ttf") format("truetype");
font-style: normal;
font-weight: 100 900;
font-stretch: 75% 100%;
font-display: swap;
}

@font-face {
font-family: "Roboto";
src: url("../assets/downloaded/fonts/Roboto-Italic.ttf") format("truetype");
font-style: italic;
font-weight: 100 900;
font-stretch: 75% 100%;
font-display: swap;
}

:root {
--md-text-font: "Roboto", "Segoe UI", Helvetica, Arial, sans-serif;
}
15 changes: 14 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ site_name: zappend
repo_url: https://github.com/bcdev/zappend
repo_name: bcdev/zappend

copyright: Copyright &copy; 2024, 2025 Brockmann Consult and contributors
copyright: Copyright &copy; 2024-2026 Brockmann Consult and contributors

nav:
- Overview: index.md
Expand All @@ -18,6 +18,8 @@ theme:
name: material
logo: assets/logo.png
favicon: assets/logo-small.png
font: false
custom_dir: docs/overrides
palette:
# Palette toggle for light mode
- scheme: default
Expand All @@ -43,6 +45,11 @@ extra:
link: https://github.com/bcdev/zappend
- icon: fontawesome/brands/python
link: https://pypi.org/project/zappend/
footer_links:
- text: Imprint
href: https://www.brockmann-consult.de/imprint/
- text: Privacy Policy
href: https://www.brockmann-consult.de/privacy-policy-documentation-pages/

plugins:
- search
Expand All @@ -56,3 +63,9 @@ plugins:
show_source: false
heading_level: 3
annotations_path: brief

extra_css:
- stylesheet/extra.css

hooks:
- docs/hooks/download_fonts.py
6 changes: 3 additions & 3 deletions tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Copyright © 2024, 2025 Brockmann Consult and contributors
# Permissions are hereby granted under the terms of the MIT License:
# https://opensource.org/licenses/MIT.
# Copyright © 2024-2026 Brockmann Consult and contributors
# Permissions are hereby granted under the terms of the MIT License:
# https://opensource.org/licenses/MIT.
4 changes: 4 additions & 0 deletions tests/config/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright © 2024-2026 Brockmann Consult and contributors
# Permissions are hereby granted under the terms of the MIT License:
# https://opensource.org/licenses/MIT.

6 changes: 3 additions & 3 deletions tests/config/test_attrs.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright © 2024, 2025 Brockmann Consult and contributors
# Permissions are hereby granted under the terms of the MIT License:
# https://opensource.org/licenses/MIT.
# Copyright © 2024-2026 Brockmann Consult and contributors
# Permissions are hereby granted under the terms of the MIT License:
# https://opensource.org/licenses/MIT.

import datetime
import json
Expand Down
6 changes: 3 additions & 3 deletions tests/config/test_config.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright © 2024, 2025 Brockmann Consult and contributors
# Permissions are hereby granted under the terms of the MIT License:
# https://opensource.org/licenses/MIT.
# Copyright © 2024-2026 Brockmann Consult and contributors
# Permissions are hereby granted under the terms of the MIT License:
# https://opensource.org/licenses/MIT.

import unittest

Expand Down
6 changes: 3 additions & 3 deletions tests/config/test_normalize.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright © 2024, 2025 Brockmann Consult and contributors
# Permissions are hereby granted under the terms of the MIT License:
# https://opensource.org/licenses/MIT.
# Copyright © 2024-2026 Brockmann Consult and contributors
# Permissions are hereby granted under the terms of the MIT License:
# https://opensource.org/licenses/MIT.

import json
import os
Expand Down
6 changes: 3 additions & 3 deletions tests/config/test_schema.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright © 2024, 2025 Brockmann Consult and contributors
# Permissions are hereby granted under the terms of the MIT License:
# https://opensource.org/licenses/MIT.
# Copyright © 2024-2026 Brockmann Consult and contributors
# Permissions are hereby granted under the terms of the MIT License:
# https://opensource.org/licenses/MIT.

import unittest

Expand Down
6 changes: 3 additions & 3 deletions tests/config/test_validate.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright © 2024, 2025 Brockmann Consult and contributors
# Permissions are hereby granted under the terms of the MIT License:
# https://opensource.org/licenses/MIT.
# Copyright © 2024-2026 Brockmann Consult and contributors
# Permissions are hereby granted under the terms of the MIT License:
# https://opensource.org/licenses/MIT.

import unittest

Expand Down
6 changes: 3 additions & 3 deletions tests/contrib/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Copyright © 2024, 2025 Brockmann Consult and contributors
# Permissions are hereby granted under the terms of the MIT License:
# https://opensource.org/licenses/MIT.
# Copyright © 2024-2026 Brockmann Consult and contributors
# Permissions are hereby granted under the terms of the MIT License:
# https://opensource.org/licenses/MIT.
6 changes: 3 additions & 3 deletions tests/contrib/test_levels.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright © 2024, 2025 Brockmann Consult and contributors
# Permissions are hereby granted under the terms of the MIT License:
# https://opensource.org/licenses/MIT.
# Copyright © 2024-2026 Brockmann Consult and contributors
# Permissions are hereby granted under the terms of the MIT License:
# https://opensource.org/licenses/MIT.

import json
import unittest
Expand Down
6 changes: 3 additions & 3 deletions tests/fsutil/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Copyright © 2024, 2025 Brockmann Consult and contributors
# Permissions are hereby granted under the terms of the MIT License:
# https://opensource.org/licenses/MIT.
# Copyright © 2024-2026 Brockmann Consult and contributors
# Permissions are hereby granted under the terms of the MIT License:
# https://opensource.org/licenses/MIT.
6 changes: 3 additions & 3 deletions tests/fsutil/test_fileobj.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright © 2024, 2025 Brockmann Consult and contributors
# Permissions are hereby granted under the terms of the MIT License:
# https://opensource.org/licenses/MIT.
# Copyright © 2024-2026 Brockmann Consult and contributors
# Permissions are hereby granted under the terms of the MIT License:
# https://opensource.org/licenses/MIT.

import os.path
import unittest
Expand Down
6 changes: 3 additions & 3 deletions tests/fsutil/test_path.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright © 2024, 2025 Brockmann Consult and contributors
# Permissions are hereby granted under the terms of the MIT License:
# https://opensource.org/licenses/MIT.
# Copyright © 2024-2026 Brockmann Consult and contributors
# Permissions are hereby granted under the terms of the MIT License:
# https://opensource.org/licenses/MIT.

import unittest

Expand Down
6 changes: 3 additions & 3 deletions tests/fsutil/test_transaction.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright © 2024, 2025 Brockmann Consult and contributors
# Permissions are hereby granted under the terms of the MIT License:
# https://opensource.org/licenses/MIT.
# Copyright © 2024-2026 Brockmann Consult and contributors
# Permissions are hereby granted under the terms of the MIT License:
# https://opensource.org/licenses/MIT.

import unittest
from typing import Callable
Expand Down
6 changes: 3 additions & 3 deletions tests/helpers.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright © 2024, 2025 Brockmann Consult and contributors
# Permissions are hereby granted under the terms of the MIT License:
# https://opensource.org/licenses/MIT.
# Copyright © 2024-2026 Brockmann Consult and contributors
# Permissions are hereby granted under the terms of the MIT License:
# https://opensource.org/licenses/MIT.

from contextlib import contextmanager
from typing import Any
Expand Down
4 changes: 4 additions & 0 deletions tests/slice/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright © 2024-2026 Brockmann Consult and contributors
# Permissions are hereby granted under the terms of the MIT License:
# https://opensource.org/licenses/MIT.

6 changes: 3 additions & 3 deletions tests/slice/test_callable.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright © 2024, 2025 Brockmann Consult and contributors
# Permissions are hereby granted under the terms of the MIT License:
# https://opensource.org/licenses/MIT.
# Copyright © 2024-2026 Brockmann Consult and contributors
# Permissions are hereby granted under the terms of the MIT License:
# https://opensource.org/licenses/MIT.

import unittest

Expand Down
6 changes: 3 additions & 3 deletions tests/slice/test_cm.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright © 2024, 2025 Brockmann Consult and contributors
# Permissions are hereby granted under the terms of the MIT License:
# https://opensource.org/licenses/MIT.
# Copyright © 2024-2026 Brockmann Consult and contributors
# Permissions are hereby granted under the terms of the MIT License:
# https://opensource.org/licenses/MIT.

import contextlib
import shutil
Expand Down
6 changes: 3 additions & 3 deletions tests/slice/test_source.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright © 2024, 2025 Brockmann Consult and contributors
# Permissions are hereby granted under the terms of the MIT License:
# https://opensource.org/licenses/MIT.
# Copyright © 2024-2026 Brockmann Consult and contributors
# Permissions are hereby granted under the terms of the MIT License:
# https://opensource.org/licenses/MIT.

import unittest

Expand Down
6 changes: 3 additions & 3 deletions tests/test_api.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright © 2024, 2025 Brockmann Consult and contributors
# Permissions are hereby granted under the terms of the MIT License:
# https://opensource.org/licenses/MIT.
# Copyright © 2024-2026 Brockmann Consult and contributors
# Permissions are hereby granted under the terms of the MIT License:
# https://opensource.org/licenses/MIT.

import os
import shutil
Expand Down
6 changes: 3 additions & 3 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright © 2024, 2025 Brockmann Consult and contributors
# Permissions are hereby granted under the terms of the MIT License:
# https://opensource.org/licenses/MIT.
# Copyright © 2024-2026 Brockmann Consult and contributors
# Permissions are hereby granted under the terms of the MIT License:
# https://opensource.org/licenses/MIT.

import unittest

Expand Down
6 changes: 3 additions & 3 deletions tests/test_context.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright © 2024, 2025 Brockmann Consult and contributors
# Permissions are hereby granted under the terms of the MIT License:
# https://opensource.org/licenses/MIT.
# Copyright © 2024-2026 Brockmann Consult and contributors
# Permissions are hereby granted under the terms of the MIT License:
# https://opensource.org/licenses/MIT.

import unittest

Expand Down
6 changes: 3 additions & 3 deletions tests/test_log.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright © 2024, 2025 Brockmann Consult and contributors
# Permissions are hereby granted under the terms of the MIT License:
# https://opensource.org/licenses/MIT.
# Copyright © 2024-2026 Brockmann Consult and contributors
# Permissions are hereby granted under the terms of the MIT License:
# https://opensource.org/licenses/MIT.

import logging
import unittest
Expand Down
6 changes: 3 additions & 3 deletions tests/test_metadata.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright © 2024, 2025 Brockmann Consult and contributors
# Permissions are hereby granted under the terms of the MIT License:
# https://opensource.org/licenses/MIT.
# Copyright © 2024-2026 Brockmann Consult and contributors
# Permissions are hereby granted under the terms of the MIT License:
# https://opensource.org/licenses/MIT.

import math
import unittest
Expand Down
6 changes: 3 additions & 3 deletions tests/test_processor.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright © 2024, 2025 Brockmann Consult and contributors
# Permissions are hereby granted under the terms of the MIT License:
# https://opensource.org/licenses/MIT.
# Copyright © 2024-2026 Brockmann Consult and contributors
# Permissions are hereby granted under the terms of the MIT License:
# https://opensource.org/licenses/MIT.

import unittest

Expand Down
6 changes: 3 additions & 3 deletions tests/test_profiler.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright © 2024, 2025 Brockmann Consult and contributors
# Permissions are hereby granted under the terms of the MIT License:
# https://opensource.org/licenses/MIT.
# Copyright © 2024-2026 Brockmann Consult and contributors
# Permissions are hereby granted under the terms of the MIT License:
# https://opensource.org/licenses/MIT.

import os
import unittest
Expand Down
6 changes: 3 additions & 3 deletions tests/test_rollbackstore.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright © 2024, 2025 Brockmann Consult and contributors
# Permissions are hereby granted under the terms of the MIT License:
# https://opensource.org/licenses/MIT.
# Copyright © 2024-2026 Brockmann Consult and contributors
# Permissions are hereby granted under the terms of the MIT License:
# https://opensource.org/licenses/MIT.

import copy
import unittest
Expand Down
6 changes: 3 additions & 3 deletions tests/test_tailoring.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright © 2024, 2025 Brockmann Consult and contributors
# Permissions are hereby granted under the terms of the MIT License:
# https://opensource.org/licenses/MIT.
# Copyright © 2024-2026 Brockmann Consult and contributors
# Permissions are hereby granted under the terms of the MIT License:
# https://opensource.org/licenses/MIT.

import unittest

Expand Down
Loading
Loading