From 12b8c4b7f1d14556cc459f672b501e901da2d216 Mon Sep 17 00:00:00 2001 From: Dennis Fink Date: Thu, 20 Aug 2026 22:22:15 +0200 Subject: chore(core): standardize SPDX copyright headers Add SPDX copyright and license headers to source, test, migration, template, and static files throughout the project. Include the maintainer email in copyright notices and fill in the BSD license copyright holder. --- .gitignore | 2 +- LICENSES/BSD-3-Clause.txt | 2 +- README.md | 2 +- migrations/alembic.ini | 4 ++++ migrations/env.py | 4 ++++ migrations/versions/681a2a9a1bc0_webmention_sender.py | 4 ++++ .../be6e229d6a3d_do_not_limit_username_and_password_hash_.py | 4 ++++ migrations/versions/f63641044cc1_initial_database_schema.py | 4 ++++ pyproject.toml | 2 +- tests/conftest.py | 4 ++++ tests/tasks/test_receiver.py | 4 ++++ tests/tasks/test_scanner.py | 4 ++++ tests/tasks/test_sender.py | 4 ++++ tests/test_forms.py | 4 ++++ tests/test_url_security.py | 4 ++++ tests/test_views.py | 4 ++++ uv.lock.license | 1 + webmentions_ssg/__init__.py | 2 +- webmentions_ssg/auth.py | 4 ++++ webmentions_ssg/config.py | 4 ++++ webmentions_ssg/forms/__init__.py | 4 ++++ webmentions_ssg/forms/validators.py | 4 ++++ webmentions_ssg/models.py | 4 ++++ webmentions_ssg/static/js/confirmation-modal.js | 4 ++++ webmentions_ssg/tasks/__init__.py | 4 ++++ webmentions_ssg/tasks/consumer.py | 4 ++++ webmentions_ssg/tasks/extension.py | 4 ++++ webmentions_ssg/tasks/receiver.py | 4 ++++ webmentions_ssg/tasks/scanner.py | 4 ++++ webmentions_ssg/tasks/sender.py | 4 ++++ webmentions_ssg/templates/base.html | 6 ++++++ webmentions_ssg/templates/includes/confirmation_modal.html | 6 ++++++ webmentions_ssg/templates/login.html | 6 ++++++ webmentions_ssg/templates/received.html | 6 ++++++ webmentions_ssg/templates/sent.html | 6 ++++++ webmentions_ssg/templates/sent_source.html | 6 ++++++ webmentions_ssg/templates/status.html | 6 ++++++ webmentions_ssg/url_security.py | 4 ++++ webmentions_ssg/views.py | 4 ++++ 39 files changed, 152 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index dea8e47..f4aec67 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2026 Dennis Fink +# SPDX-FileCopyrightText: 2026 Dennis Fink # # SPDX-License-Identifier: BSD-3-Clause diff --git a/LICENSES/BSD-3-Clause.txt b/LICENSES/BSD-3-Clause.txt index ea890af..cff945a 100644 --- a/LICENSES/BSD-3-Clause.txt +++ b/LICENSES/BSD-3-Clause.txt @@ -1,4 +1,4 @@ -Copyright (c) . +Copyright (c) 2026 Dennis Fink . Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/README.md b/README.md index 06253ad..55d9556 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ diff --git a/migrations/alembic.ini b/migrations/alembic.ini index ec9d45c..bdfa231 100644 --- a/migrations/alembic.ini +++ b/migrations/alembic.ini @@ -1,3 +1,7 @@ +; SPDX-FileCopyrightText: 2026 Dennis Fink +; +; SPDX-License-Identifier: BSD-3-Clause + # A generic, single database configuration. [alembic] diff --git a/migrations/env.py b/migrations/env.py index a5d762b..fa912c3 100644 --- a/migrations/env.py +++ b/migrations/env.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2026 Dennis Fink +# +# SPDX-License-Identifier: BSD-3-Clause + import logging from logging.config import fileConfig diff --git a/migrations/versions/681a2a9a1bc0_webmention_sender.py b/migrations/versions/681a2a9a1bc0_webmention_sender.py index 29142af..23bf2dd 100644 --- a/migrations/versions/681a2a9a1bc0_webmention_sender.py +++ b/migrations/versions/681a2a9a1bc0_webmention_sender.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2026 Dennis Fink +# +# SPDX-License-Identifier: BSD-3-Clause + """Webmention sender Revision ID: 681a2a9a1bc0 diff --git a/migrations/versions/be6e229d6a3d_do_not_limit_username_and_password_hash_.py b/migrations/versions/be6e229d6a3d_do_not_limit_username_and_password_hash_.py index 5555ab9..4bb7a7c 100644 --- a/migrations/versions/be6e229d6a3d_do_not_limit_username_and_password_hash_.py +++ b/migrations/versions/be6e229d6a3d_do_not_limit_username_and_password_hash_.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2026 Dennis Fink +# +# SPDX-License-Identifier: BSD-3-Clause + """Do not limit username and password hash length Revision ID: be6e229d6a3d diff --git a/migrations/versions/f63641044cc1_initial_database_schema.py b/migrations/versions/f63641044cc1_initial_database_schema.py index c65af21..5017bc3 100644 --- a/migrations/versions/f63641044cc1_initial_database_schema.py +++ b/migrations/versions/f63641044cc1_initial_database_schema.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2026 Dennis Fink +# +# SPDX-License-Identifier: BSD-3-Clause + """Initial database schema Revision ID: f63641044cc1 diff --git a/pyproject.toml b/pyproject.toml index 81dcd1b..e30959c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2026 Dennis Fink +# SPDX-FileCopyrightText: 2026 Dennis Fink # # SPDX-License-Identifier: BSD-3-Clause diff --git a/tests/conftest.py b/tests/conftest.py index 45658b4..3064393 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2026 Dennis Fink +# +# SPDX-License-Identifier: BSD-3-Clause + from collections.abc import Iterator import pytest diff --git a/tests/tasks/test_receiver.py b/tests/tasks/test_receiver.py index 7e8f531..17dd45a 100644 --- a/tests/tasks/test_receiver.py +++ b/tests/tasks/test_receiver.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2026 Dennis Fink +# +# SPDX-License-Identifier: BSD-3-Clause + import logging import uuid from types import ModuleType diff --git a/tests/tasks/test_scanner.py b/tests/tasks/test_scanner.py index 89e2995..332b8bf 100644 --- a/tests/tasks/test_scanner.py +++ b/tests/tasks/test_scanner.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2026 Dennis Fink +# +# SPDX-License-Identifier: BSD-3-Clause + from pathlib import Path from types import ModuleType from uuid import UUID diff --git a/tests/tasks/test_sender.py b/tests/tasks/test_sender.py index 1c8ef99..dac56a5 100644 --- a/tests/tasks/test_sender.py +++ b/tests/tasks/test_sender.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2026 Dennis Fink +# +# SPDX-License-Identifier: BSD-3-Clause + import logging import uuid from datetime import UTC, datetime diff --git a/tests/test_forms.py b/tests/test_forms.py index 73c6ffc..fc16858 100644 --- a/tests/test_forms.py +++ b/tests/test_forms.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2026 Dennis Fink +# +# SPDX-License-Identifier: BSD-3-Clause + from unittest.mock import patch import pytest diff --git a/tests/test_url_security.py b/tests/test_url_security.py index 70d5146..db513f9 100644 --- a/tests/test_url_security.py +++ b/tests/test_url_security.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2026 Dennis Fink +# +# SPDX-License-Identifier: BSD-3-Clause + from unittest.mock import Mock, patch import dns.resolver diff --git a/tests/test_views.py b/tests/test_views.py index 67ed190..0de8b9b 100644 --- a/tests/test_views.py +++ b/tests/test_views.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2026 Dennis Fink +# +# SPDX-License-Identifier: BSD-3-Clause + import uuid from datetime import UTC, datetime from unittest.mock import Mock, call, patch diff --git a/uv.lock.license b/uv.lock.license index 40901c5..c53d275 100644 --- a/uv.lock.license +++ b/uv.lock.license @@ -1,3 +1,4 @@ SPDX-FileCopyrightText: 2026 Dennis Fink +SPDX-FileCopyrightText: 2026 Dennis Fink SPDX-License-Identifier: BSD-3-Clause diff --git a/webmentions_ssg/__init__.py b/webmentions_ssg/__init__.py index 3928195..ad77667 100644 --- a/webmentions_ssg/__init__.py +++ b/webmentions_ssg/__init__.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2026 Dennis Fink +# SPDX-FileCopyrightText: 2026 Dennis Fink # # SPDX-License-Identifier: BSD-3-Clause diff --git a/webmentions_ssg/auth.py b/webmentions_ssg/auth.py index 7bd93a3..de5b297 100644 --- a/webmentions_ssg/auth.py +++ b/webmentions_ssg/auth.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2026 Dennis Fink +# +# SPDX-License-Identifier: BSD-3-Clause + from flask_login import LoginManager from . import DATABASE as db diff --git a/webmentions_ssg/config.py b/webmentions_ssg/config.py index 6996b57..72842c4 100644 --- a/webmentions_ssg/config.py +++ b/webmentions_ssg/config.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2026 Dennis Fink +# +# SPDX-License-Identifier: BSD-3-Clause + import logging import secrets diff --git a/webmentions_ssg/forms/__init__.py b/webmentions_ssg/forms/__init__.py index c386eb1..7ab82e3 100644 --- a/webmentions_ssg/forms/__init__.py +++ b/webmentions_ssg/forms/__init__.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2026 Dennis Fink +# +# SPDX-License-Identifier: BSD-3-Clause + import re from flask_wtf import FlaskForm diff --git a/webmentions_ssg/forms/validators.py b/webmentions_ssg/forms/validators.py index c4b5eda..fd54e0f 100644 --- a/webmentions_ssg/forms/validators.py +++ b/webmentions_ssg/forms/validators.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2026 Dennis Fink +# +# SPDX-License-Identifier: BSD-3-Clause + from urllib.parse import urlsplit from flask import current_app diff --git a/webmentions_ssg/models.py b/webmentions_ssg/models.py index f89e587..e7ff0be 100644 --- a/webmentions_ssg/models.py +++ b/webmentions_ssg/models.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2026 Dennis Fink +# +# SPDX-License-Identifier: BSD-3-Clause + from __future__ import annotations import uuid diff --git a/webmentions_ssg/static/js/confirmation-modal.js b/webmentions_ssg/static/js/confirmation-modal.js index e278790..fee825f 100644 --- a/webmentions_ssg/static/js/confirmation-modal.js +++ b/webmentions_ssg/static/js/confirmation-modal.js @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2026 Dennis Fink +// +// SPDX-License-Identifier: BSD-3-Clause + document.addEventListener("DOMContentLoaded", () => { const confirmationModal = document.getElementById("confirmation-modal"); diff --git a/webmentions_ssg/tasks/__init__.py b/webmentions_ssg/tasks/__init__.py index 5af3987..62249ca 100644 --- a/webmentions_ssg/tasks/__init__.py +++ b/webmentions_ssg/tasks/__init__.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2026 Dennis Fink +# +# SPDX-License-Identifier: BSD-3-Clause + from .extension import Huey __all__ = ["Huey"] diff --git a/webmentions_ssg/tasks/consumer.py b/webmentions_ssg/tasks/consumer.py index 3bfe861..0f73529 100644 --- a/webmentions_ssg/tasks/consumer.py +++ b/webmentions_ssg/tasks/consumer.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2026 Dennis Fink +# +# SPDX-License-Identifier: BSD-3-Clause + from huey import Huey, crontab from .. import HUEY, create_app diff --git a/webmentions_ssg/tasks/extension.py b/webmentions_ssg/tasks/extension.py index 15bc669..95f190f 100644 --- a/webmentions_ssg/tasks/extension.py +++ b/webmentions_ssg/tasks/extension.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2026 Dennis Fink +# +# SPDX-License-Identifier: BSD-3-Clause + from functools import wraps from typing import Any, Callable from urllib.parse import urlsplit, urlunsplit diff --git a/webmentions_ssg/tasks/receiver.py b/webmentions_ssg/tasks/receiver.py index 4aba3d8..c33f517 100644 --- a/webmentions_ssg/tasks/receiver.py +++ b/webmentions_ssg/tasks/receiver.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2026 Dennis Fink +# +# SPDX-License-Identifier: BSD-3-Clause + import uuid from urllib.parse import urljoin diff --git a/webmentions_ssg/tasks/scanner.py b/webmentions_ssg/tasks/scanner.py index fa6a47b..0cf038a 100644 --- a/webmentions_ssg/tasks/scanner.py +++ b/webmentions_ssg/tasks/scanner.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2026 Dennis Fink +# +# SPDX-License-Identifier: BSD-3-Clause + from collections.abc import Iterator from dataclasses import dataclass from datetime import UTC, datetime diff --git a/webmentions_ssg/tasks/sender.py b/webmentions_ssg/tasks/sender.py index 629c538..1d22ad9 100644 --- a/webmentions_ssg/tasks/sender.py +++ b/webmentions_ssg/tasks/sender.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2026 Dennis Fink +# +# SPDX-License-Identifier: BSD-3-Clause + import re import uuid from datetime import UTC, datetime diff --git a/webmentions_ssg/templates/base.html b/webmentions_ssg/templates/base.html index eb11b8e..1275391 100644 --- a/webmentions_ssg/templates/base.html +++ b/webmentions_ssg/templates/base.html @@ -1,3 +1,9 @@ + + {% from "bootstrap5/utils.html" import render_messages %} diff --git a/webmentions_ssg/templates/includes/confirmation_modal.html b/webmentions_ssg/templates/includes/confirmation_modal.html index ff9bd06..5c0a5a1 100644 --- a/webmentions_ssg/templates/includes/confirmation_modal.html +++ b/webmentions_ssg/templates/includes/confirmation_modal.html @@ -1,3 +1,9 @@ + +