Skip to content

Commit

Permalink
Merge remote-tracking branch 'structure-local/py-ci-cli' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
rpatterson committed Oct 29, 2023
2 parents 3ff9924 + 48caf62 commit 92571d8
Show file tree
Hide file tree
Showing 24 changed files with 64 additions and 40 deletions.
5 changes: 5 additions & 0 deletions .env.in
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ nosetests.xml
*,cover
**/,cover
.hypothesis
.mypy_cache
**/.mypy_cache
.pytest_cache
**/.pytest_cache

# Translations
*.mo
Expand Down Expand Up @@ -108,6 +108,7 @@ celerybeat-schedule
# Linters:
.tox
.mypy_cache
**/.mypy_cache

# virtualenv
venv
Expand Down
4 changes: 3 additions & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
14 changes: 9 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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))
Expand Down Expand Up @@ -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=

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 ! (
Expand Down
2 changes: 1 addition & 1 deletion bin/test-lint-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion bin/test-lint-prose.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion build-host/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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/**`:
Expand Down
6 changes: 3 additions & 3 deletions docker-compose.override.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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"
Expand Down
6 changes: 6 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]+",
]
2 changes: 1 addition & 1 deletion newsfragments/+upgrade-requirements.bugfix.rst
Original file line number Diff line number Diff line change
@@ -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.
4 changes: 2 additions & 2 deletions requirements/py310/build.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 6 additions & 4 deletions requirements/py311/build.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion requirements/py311/devel.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion requirements/py311/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion requirements/py311/user.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions requirements/py312/build.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 6 additions & 4 deletions requirements/py38/build.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion requirements/py38/devel.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion requirements/py38/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion requirements/py38/user.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
10 changes: 6 additions & 4 deletions requirements/py39/build.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion requirements/py39/devel.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion requirements/py39/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion requirements/py39/user.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 92571d8

Please sign in to comment.