diff --git a/.env.in b/.env.in index f507d4d7..087d8ee7 100644 --- a/.env.in +++ b/.env.in @@ -2,6 +2,11 @@ # # SPDX-License-Identifier: MIT +# Make non-default `./docker-compose*.yml` files the default: +# https://pscheit.medium.com/docker-compose-advanced-configuration-541356d121de#9aa6 +COMPOSE_PATH_SEPARATOR=: +COMPOSE_FILE=./docker-compose.yml:./gitlab-runner/docker-compose.yml:./docker-compose.override.yml + # Capture local values specific to this checkout: TZ=${TZ} PUID=${PUID} diff --git a/.gitignore b/.gitignore index c130cff1..ff138848 100644 --- a/.gitignore +++ b/.gitignore @@ -66,8 +66,8 @@ nosetests.xml *,cover **/,cover .hypothesis -.mypy_cache -**/.mypy_cache +.pytest_cache +**/.pytest_cache # Translations *.mo @@ -108,6 +108,7 @@ celerybeat-schedule # Linters: .tox .mypy_cache +**/.mypy_cache # virtualenv venv diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e62a7d59..3e0c4ec8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -15,7 +15,9 @@ variables: default: image: - name: "$CI_TEMPLATE_REGISTRY_HOST/$PROJECT_NAMESPACE/$CI_PROJECT_NAME:build-host" + # TEMPLATE: Only change these if you customize the `./build-host/Dockerfile` image. + # Otherwise use the version of this image from the project template in your CI/CD. + name: "registry.gitlab.com/rpatterson/project-structure:build-host" entrypoint: - "docker-entrypoint.sh" services: diff --git a/Makefile b/Makefile index 253b80d8..9c926113 100644 --- a/Makefile +++ b/Makefile @@ -15,6 +15,8 @@ export PROJECT_NAMESPACE=rpatterson export PROJECT_NAME=prunerr NPM_SCOPE=rpattersonnet export DOCKER_USER=merpatterson +# TEMPLATE: See comments towards the bottom and update. +GPG_SIGNING_KEYID=2EFF7CCE6828E359 # Option variables that control behavior: export TEMPLATE_IGNORE_EXISTING=false @@ -130,8 +132,8 @@ ifeq ($(PYTHON_MINOR),) # Fallback to the latest installed supported Python version PYTHON_MINOR=$(PYTHON_LATEST_BASENAME:python%=%) endif -PYTHON_LATEST_MINOR=$(firstword $(PYTHON_SUPPORTED_MINORS)) -PYTHON_LATEST_ENV=py$(subst .,,$(PYTHON_LATEST_MINOR)) +PYTHON_DEFAULT_MINOR=$(firstword $(PYTHON_SUPPORTED_MINORS)) +PYTHON_DEFAULT_ENV=py$(subst .,,$(PYTHON_DEFAULT_MINOR)) PYTHON_MINORS=$(PYTHON_SUPPORTED_MINORS) ifeq ($(PYTHON_MINOR),) PYTHON_MINOR=$(firstword $(PYTHON_MINORS)) @@ -272,7 +274,7 @@ export TOX_RUN_ARGS # The options that support running arbitrary commands in the venvs managed by tox # without Tox's startup time: TOX_EXEC_OPTS=--no-recreate-pkg --skip-pkg-install -TOX_EXEC_ARGS=tox exec $(TOX_EXEC_OPTS) -e "$(PYTHON_ENV)" +TOX_EXEC_ARGS=tox exec $(TOX_EXEC_OPTS) -e "$(PYTHON_DEFAULT_ENV)" TOX_EXEC_BUILD_ARGS=tox exec $(TOX_EXEC_OPTS) -e "build" PIP_COMPILE_EXTRA= @@ -386,9 +388,9 @@ ifeq ($(CI),true) export PIP_COMPILE_ARGS= endif GITHUB_RELEASE_ARGS=--prerelease +DOCKER_PLATFORMS= # Only publish releases from the `main` or `develop` branches and only under the # canonical CI/CD platform: -DOCKER_PLATFORMS= ifeq ($(GITLAB_CI),true) ifeq ($(VCS_BRANCH),main) RELEASE_PUBLISH=true @@ -1041,7 +1043,9 @@ endif ## Automatically correct code in this checkout according to linters and style checkers. devel-format: $(HOST_TARGET_DOCKER) ./var/log/npm-install.log $(HOME)/.local/bin/tox # Add license and copyright header to files missing them: - git ls-files -co --exclude-standard -z ':!*.license' ':!.reuse' ':!LICENSES' | + git ls-files -co --exclude-standard -z ':!*.license' ':!.reuse' ':!LICENSES' \ + ':!newsfragments/*' ':!NEWS*.rst' ':!styles/*/meta.json' \ + ':!styles/*/*.yml' ':!requirements/*/*.txt' | while read -d $$'\0' do if ! ( diff --git a/bin/test-lint-docs.sh b/bin/test-lint-docs.sh index 869bee93..33f63748 100755 --- a/bin/test-lint-docs.sh +++ b/bin/test-lint-docs.sh @@ -8,7 +8,7 @@ set -eu -o pipefail shopt -s inherit_errexit -if [ "${DEBUG:=false}" = "true" ] +if test "${DEBUG:=false}" = "true" then # Echo commands for easier debugging set -x diff --git a/bin/test-lint-prose.sh b/bin/test-lint-prose.sh index 30882858..08c12c8a 100755 --- a/bin/test-lint-prose.sh +++ b/bin/test-lint-prose.sh @@ -8,7 +8,7 @@ set -eu -o pipefail shopt -s inherit_errexit -if [ "${DEBUG:=false}" = "true" ] +if test "${DEBUG:=false}" = "true" then # Echo commands for easier debugging set -x diff --git a/build-host/Dockerfile b/build-host/Dockerfile index a5b1edee..30098e15 100644 --- a/build-host/Dockerfile +++ b/build-host/Dockerfile @@ -28,9 +28,9 @@ LABEL org.opencontainers.image.base.name="docker.io/library/docker:latest" # Build-time labels: LABEL org.opencontainers.image.version=1.0.0 -# Find the same home directory even when run as another user, for example `root`: ENV PROJECT_NAMESPACE="${PROJECT_NAMESPACE}" ENV PROJECT_NAME="${PROJECT_NAME}" +# Find the same home directory even when run as another user, for example `root`: ENV HOME="/home/runner" ENV PATH="${HOME}/.local/bin:${PATH}" # Prevent Node Version Manager (NVM) installing into `/bin/versions/**`: diff --git a/docker-compose.override.yml b/docker-compose.override.yml index a4c92601..07a005ff 100644 --- a/docker-compose.override.yml +++ b/docker-compose.override.yml @@ -22,7 +22,7 @@ services: # Configuration specific to development: prunerr-daemon: image: "\ - ${DOCKER_REGISTRY_HOST:-registry.gitlab.com}/prunerr\ + ${DOCKER_REGISTRY_HOST:-registry.gitlab.com}/rpatterson\ /prunerr:${PYTHON_ENV:-py311}-${DOCKER_BRANCH_TAG:-develop}" container_name: "prunerr-daemon-checkout" build: @@ -38,7 +38,7 @@ services: # Container for use by developers: prunerr-devel: image: "\ - ${DOCKER_REGISTRY_HOST:-registry.gitlab.com}/prunerr\ + ${DOCKER_REGISTRY_HOST:-registry.gitlab.com}/rpatterson\ /prunerr:devel-${PYTHON_ENV:-py311}-${DOCKER_BRANCH_TAG:-develop}" container_name: "prunerr-devel" profiles: @@ -164,7 +164,7 @@ services: # The container that runs CI/CD: build-host: image: "\ - ${DOCKER_REGISTRY_HOST:-registry.gitlab.com}/${DOCKER_USER:-}/prunerr\ + ${DOCKER_REGISTRY_HOST:-registry.gitlab.com}/rpatterson/prunerr\ :build-host" profiles: - "ci" diff --git a/docs/conf.py b/docs/conf.py index c47df287..a1460182 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -36,3 +36,9 @@ # Linter options: # Disallow redirects: linkcheck_allowed_redirects = {} +linkcheck_anchors_ignore = [ + # The default from the Sphinx extension: + "^!", + # Tolerate links to source code lines in VCS provider web UIs: + "^L[0-9]+", +] diff --git a/newsfragments/+upgrade-requirements.bugfix.rst b/newsfragments/+upgrade-requirements.bugfix.rst index 5c603a01..1c5600dc 100644 --- a/newsfragments/+upgrade-requirements.bugfix.rst +++ b/newsfragments/+upgrade-requirements.bugfix.rst @@ -1,2 +1,2 @@ Upgrade all requirements to the most recent versions as of -Thu Oct 26 11:56:03 AM UTC 2023. +Sun Oct 29 03:13:29 PM UTC 2023. diff --git a/requirements/py310/build.txt b/requirements/py310/build.txt index 69b2c102..d10970fa 100644 --- a/requirements/py310/build.txt +++ b/requirements/py310/build.txt @@ -51,11 +51,11 @@ docutils==0.20.1 # restructuredtext-lint # rstcheck-core # sphinx -filelock==3.12.4 +filelock==3.13.0 # via virtualenv future==0.18.3 # via proselint -identify==2.5.30 +identify==2.5.31 # via pre-commit idna==3.4 # via requests diff --git a/requirements/py311/build.txt b/requirements/py311/build.txt index baa6f3c6..54ab9a95 100644 --- a/requirements/py311/build.txt +++ b/requirements/py311/build.txt @@ -2,7 +2,7 @@ # This file is autogenerated by pip-compile with Python 3.11 # by the following command: # -# pip-compile --output-file=requirements/py311/build.txt --resolver=backtracking --strip-extras requirements/build.txt.in +# pip-compile --output-file=requirements/py311/build.txt --strip-extras requirements/build.txt.in # alabaster==0.7.13 # via sphinx @@ -51,11 +51,11 @@ docutils==0.20.1 # restructuredtext-lint # rstcheck-core # sphinx -filelock==3.12.4 +filelock==3.13.0 # via virtualenv future==0.18.3 # via proselint -identify==2.5.30 +identify==2.5.31 # via pre-commit idna==3.4 # via requests @@ -201,7 +201,9 @@ towncrier==23.10.0 twine==4.0.2 # via -r requirements/build.txt.in typer==0.9.0 - # via rstcheck + # via + # rstcheck + # typer typing-extensions==4.8.0 # via # pydantic diff --git a/requirements/py311/devel.txt b/requirements/py311/devel.txt index d5fc998d..73016654 100644 --- a/requirements/py311/devel.txt +++ b/requirements/py311/devel.txt @@ -2,7 +2,7 @@ # This file is autogenerated by pip-compile with Python 3.11 # by the following command: # -# pip-compile --extra=devel --output-file=requirements/py311/devel.txt --resolver=backtracking --strip-extras pyproject.toml +# pip-compile --extra=devel --output-file=requirements/py311/devel.txt --strip-extras pyproject.toml # argcomplete==3.1.2 # via prunerr (pyproject.toml) diff --git a/requirements/py311/test.txt b/requirements/py311/test.txt index 4f85bfdd..c68de5c7 100644 --- a/requirements/py311/test.txt +++ b/requirements/py311/test.txt @@ -2,7 +2,7 @@ # This file is autogenerated by pip-compile with Python 3.11 # by the following command: # -# pip-compile --extra=test --output-file=requirements/py311/test.txt --resolver=backtracking --strip-extras pyproject.toml +# pip-compile --extra=test --output-file=requirements/py311/test.txt --strip-extras pyproject.toml # argcomplete==3.1.2 # via prunerr (pyproject.toml) diff --git a/requirements/py311/user.txt b/requirements/py311/user.txt index b8a608f2..13d20d9f 100644 --- a/requirements/py311/user.txt +++ b/requirements/py311/user.txt @@ -2,7 +2,7 @@ # This file is autogenerated by pip-compile with Python 3.11 # by the following command: # -# pip-compile --output-file=requirements/py311/user.txt --resolver=backtracking --strip-extras pyproject.toml +# pip-compile --output-file=requirements/py311/user.txt --strip-extras pyproject.toml # argcomplete==3.1.2 # via prunerr (pyproject.toml) diff --git a/requirements/py312/build.txt b/requirements/py312/build.txt index b3a68836..186ed57a 100644 --- a/requirements/py312/build.txt +++ b/requirements/py312/build.txt @@ -51,11 +51,11 @@ docutils==0.20.1 # restructuredtext-lint # rstcheck-core # sphinx -filelock==3.12.4 +filelock==3.13.0 # via virtualenv future==0.18.3 # via proselint -identify==2.5.30 +identify==2.5.31 # via pre-commit idna==3.4 # via requests diff --git a/requirements/py38/build.txt b/requirements/py38/build.txt index 6c0ff0bf..e6c83380 100644 --- a/requirements/py38/build.txt +++ b/requirements/py38/build.txt @@ -2,7 +2,7 @@ # This file is autogenerated by pip-compile with Python 3.8 # by the following command: # -# pip-compile --output-file=requirements/py38/build.txt --resolver=backtracking --strip-extras requirements/build.txt.in +# pip-compile --output-file=requirements/py38/build.txt --strip-extras requirements/build.txt.in # alabaster==0.7.13 # via sphinx @@ -51,11 +51,11 @@ docutils==0.20.1 # restructuredtext-lint # rstcheck-core # sphinx -filelock==3.12.4 +filelock==3.13.0 # via virtualenv future==0.18.3 # via proselint -identify==2.5.30 +identify==2.5.31 # via pre-commit idna==3.4 # via requests @@ -209,7 +209,9 @@ towncrier==23.10.0 twine==4.0.2 # via -r requirements/build.txt.in typer==0.9.0 - # via rstcheck + # via + # rstcheck + # typer typing-extensions==4.8.0 # via # annotated-types diff --git a/requirements/py38/devel.txt b/requirements/py38/devel.txt index 5a9d77a4..c972523a 100644 --- a/requirements/py38/devel.txt +++ b/requirements/py38/devel.txt @@ -2,7 +2,7 @@ # This file is autogenerated by pip-compile with Python 3.8 # by the following command: # -# pip-compile --extra=devel --output-file=requirements/py38/devel.txt --resolver=backtracking --strip-extras pyproject.toml +# pip-compile --extra=devel --output-file=requirements/py38/devel.txt --strip-extras pyproject.toml # argcomplete==3.1.2 # via prunerr (pyproject.toml) diff --git a/requirements/py38/test.txt b/requirements/py38/test.txt index 4c41a44b..2bc0dd54 100644 --- a/requirements/py38/test.txt +++ b/requirements/py38/test.txt @@ -2,7 +2,7 @@ # This file is autogenerated by pip-compile with Python 3.8 # by the following command: # -# pip-compile --extra=test --output-file=requirements/py38/test.txt --resolver=backtracking --strip-extras pyproject.toml +# pip-compile --extra=test --output-file=requirements/py38/test.txt --strip-extras pyproject.toml # argcomplete==3.1.2 # via prunerr (pyproject.toml) diff --git a/requirements/py38/user.txt b/requirements/py38/user.txt index 107ace13..e31442a0 100644 --- a/requirements/py38/user.txt +++ b/requirements/py38/user.txt @@ -2,7 +2,7 @@ # This file is autogenerated by pip-compile with Python 3.8 # by the following command: # -# pip-compile --output-file=requirements/py38/user.txt --resolver=backtracking --strip-extras pyproject.toml +# pip-compile --output-file=requirements/py38/user.txt --strip-extras pyproject.toml # argcomplete==3.1.2 # via prunerr (pyproject.toml) diff --git a/requirements/py39/build.txt b/requirements/py39/build.txt index 8c277549..287959fb 100644 --- a/requirements/py39/build.txt +++ b/requirements/py39/build.txt @@ -2,7 +2,7 @@ # This file is autogenerated by pip-compile with Python 3.9 # by the following command: # -# pip-compile --output-file=requirements/py39/build.txt --resolver=backtracking --strip-extras requirements/build.txt.in +# pip-compile --output-file=requirements/py39/build.txt --strip-extras requirements/build.txt.in # alabaster==0.7.13 # via sphinx @@ -51,11 +51,11 @@ docutils==0.20.1 # restructuredtext-lint # rstcheck-core # sphinx -filelock==3.12.4 +filelock==3.13.0 # via virtualenv future==0.18.3 # via proselint -identify==2.5.30 +identify==2.5.31 # via pre-commit idna==3.4 # via requests @@ -208,7 +208,9 @@ towncrier==23.10.0 twine==4.0.2 # via -r requirements/build.txt.in typer==0.9.0 - # via rstcheck + # via + # rstcheck + # typer typing-extensions==4.8.0 # via # pydantic diff --git a/requirements/py39/devel.txt b/requirements/py39/devel.txt index 6452870a..91fcd5b4 100644 --- a/requirements/py39/devel.txt +++ b/requirements/py39/devel.txt @@ -2,7 +2,7 @@ # This file is autogenerated by pip-compile with Python 3.9 # by the following command: # -# pip-compile --extra=devel --output-file=requirements/py39/devel.txt --resolver=backtracking --strip-extras pyproject.toml +# pip-compile --extra=devel --output-file=requirements/py39/devel.txt --strip-extras pyproject.toml # argcomplete==3.1.2 # via prunerr (pyproject.toml) diff --git a/requirements/py39/test.txt b/requirements/py39/test.txt index abceff53..39198732 100644 --- a/requirements/py39/test.txt +++ b/requirements/py39/test.txt @@ -2,7 +2,7 @@ # This file is autogenerated by pip-compile with Python 3.9 # by the following command: # -# pip-compile --extra=test --output-file=requirements/py39/test.txt --resolver=backtracking --strip-extras pyproject.toml +# pip-compile --extra=test --output-file=requirements/py39/test.txt --strip-extras pyproject.toml # argcomplete==3.1.2 # via prunerr (pyproject.toml) diff --git a/requirements/py39/user.txt b/requirements/py39/user.txt index a4ce3b75..cfc7155e 100644 --- a/requirements/py39/user.txt +++ b/requirements/py39/user.txt @@ -2,7 +2,7 @@ # This file is autogenerated by pip-compile with Python 3.9 # by the following command: # -# pip-compile --output-file=requirements/py39/user.txt --resolver=backtracking --strip-extras pyproject.toml +# pip-compile --output-file=requirements/py39/user.txt --strip-extras pyproject.toml # argcomplete==3.1.2 # via prunerr (pyproject.toml)