Skip to content

Commit

Permalink
feature/template maint 2024-11-22 (#129)
Browse files Browse the repository at this point in the history
# PR Context
- some regular version maintenance
- includes version fix for mx-1731, for try-out see
https://github.com/robert-koch-institut/mex-release/pull/87/files and
the correct versions on that release
https://github.com/robert-koch-institut/mex-release/releases/tag/0.3.1

# Changed
- optimize pip and pdm environment variables
- bump year in license files to 2025

# Removed
- remove wheel dependency from requirements.txt

# Fixed
- build correct package versions in release pipeline

---------

Signed-off-by: Nicolas Drebenstedt <[email protected]>
Co-authored-by: RKI | Metadata Exchange <[email protected]>
  • Loading branch information
cutoffthetop and RKIMetadataExchange authored Jan 15, 2025
1 parent a4f25ab commit 57e9b75
Show file tree
Hide file tree
Showing 16 changed files with 39 additions and 24 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ on:
required: true

env:
PIP_NO_OPTION: on
PDM_CHECK_UPDATE: False
PIP_DISABLE_PIP_VERSION_CHECK: on
PIP_NO_CLEAN: on
PIP_NO_INPUT: on
PIP_PREFER_BINARY: on

permissions:
Expand Down Expand Up @@ -84,6 +86,7 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 1
ref: ${{ needs.release.outputs.tag }}

- name: Cache requirements
uses: actions/cache@v4
Expand All @@ -106,6 +109,5 @@ jobs:
- name: Build wheel and sdist distros and create a github release
env:
GH_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
PDM_CHECK_UPDATE: False
run: |
gh release create ${{ needs.release.outputs.tag }} --generate-notes --latest --verify-tag
2 changes: 1 addition & 1 deletion .github/workflows/renovatebot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
fetch-depth: 1

- name: Run renovatebot
uses: renovatebot/[email protected].2
uses: renovatebot/[email protected].8
env:
RENOVATE_GIT_PRIVATE_KEY: ${{ secrets.GPG_SIGNING_KEY }}
RENOVATE_REPOSITORIES: "robert-koch-institut/mex-template"
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- constrain dev-dependencies only to major/minor versions, to limit renovate noise
- title-case readme headings for a more professional look
- use commit-signing flow from mex-release
- optimize pip and pdm environment variables
- bump year in license files to 2025

### Deprecated

### Removed

- remove black dependency and pre-commit hook
- remove wheel dependency from requirements.txt

### Fixed

- remove --no-editable flag to avoid installing local package into venv
- build correct package versions in release pipeline

### Security

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2024 Robert Koch-Institut
Copyright (c) 2025 Robert Koch-Institut

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ concurrency:
cancel-in-progress: true

env:
PIP_NO_OPTION: on
PDM_CHECK_UPDATE: False
PIP_DISABLE_PIP_VERSION_CHECK: on
PIP_NO_CLEAN: on
PIP_NO_INPUT: on
PIP_PREFER_BINARY: on

jobs:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ on:
workflow_dispatch:

env:
PIP_NO_OPTION: on
PDM_CHECK_UPDATE: False
PIP_DISABLE_PIP_VERSION_CHECK: on
PIP_NO_CLEAN: on
PIP_NO_INPUT: on
PIP_PREFER_BINARY: on

permissions:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ on:
workflow_dispatch:

env:
PIP_NO_OPTION: on
PDM_CHECK_UPDATE: False
PIP_DISABLE_PIP_VERSION_CHECK: on
PIP_NO_CLEAN: on
PIP_NO_INPUT: on
PIP_PREFER_BINARY: on

concurrency:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ on:
required: true

env:
PIP_NO_OPTION: on
PDM_CHECK_UPDATE: False
PIP_DISABLE_PIP_VERSION_CHECK: on
PIP_NO_CLEAN: on
PIP_NO_INPUT: on
PIP_PREFER_BINARY: on

permissions:
Expand Down Expand Up @@ -133,6 +135,7 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 1
{% raw %}ref: ${{ needs.release.outputs.tag }}{% endraw %}

- name: Cache requirements
uses: actions/cache@v4
Expand All @@ -155,7 +158,6 @@ jobs:
- name: Build wheel and sdist distros and create a github release
env:
{% raw %}GH_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}{% endraw %}
PDM_CHECK_UPDATE: False
run: |
{% raw -%}
gh release create ${{ needs.release.outputs.tag }} --generate-notes --latest --verify-tag
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
fetch-depth: 1

- name: Run renovatebot
uses: renovatebot/[email protected].2
uses: renovatebot/[email protected].8
env:
RENOVATE_GIT_PRIVATE_KEY: {% raw %}${{ secrets.GPG_SIGNING_KEY }}{% endraw %}
RENOVATE_REPOSITORIES: "robert-koch-institut/mex-{{ cookiecutter.project_name }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ on:
workflow_dispatch:

env:
PIP_NO_OPTION: on
PDM_CHECK_UPDATE: False
PIP_DISABLE_PIP_VERSION_CHECK: on
PIP_NO_CLEAN: on
PIP_NO_INPUT: on
PIP_PREFER_BINARY: on

concurrency:
Expand Down
4 changes: 2 additions & 2 deletions mex-{{ cookiecutter.project_name }}/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ default_language_version:
python: python3.11
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.3
rev: v0.9.1
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand All @@ -25,7 +25,7 @@ repos:
- id: fix-byte-order-marker
name: byte-order
- repo: https://github.com/pdm-project/pdm
rev: 2.20.1
rev: 2.22.2
hooks:
- id: pdm-lock-check
name: pdm
Expand Down
5 changes: 3 additions & 2 deletions mex-{{ cookiecutter.project_name }}/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ LABEL org.opencontainers.image.vendor="robert-koch-institut"
ENV PYTHONUNBUFFERED=1
ENV PYTHONOPTIMIZE=1

ENV PIP_PROGRESS_BAR=off
ENV PIP_PREFER_BINARY=on
ENV PIP_DISABLE_PIP_VERSION_CHECK=on
ENV PIP_NO_INPUT: on
ENV PIP_PREFER_BINARY=on
ENV PIP_PROGRESS_BAR=off

ENV MEX_{{ cookiecutter.project_name|upper }}_HOST=0.0.0.0

Expand Down
2 changes: 1 addition & 1 deletion mex-{{ cookiecutter.project_name }}/LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2024 Robert Koch-Institut
Copyright (c) 2025 Robert Koch-Institut

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions mex-{{ cookiecutter.project_name }}/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ optional-dependencies.dev = [
"pytest-random-order>=1,<2",
"pytest-xdist>=3,<4",
"pytest>=8,<9",
"ruff>=0.7,<1",
"ruff>=0.9,<1",
"sphinx>=8,<9",
]

Expand Down Expand Up @@ -138,5 +138,5 @@ known-first-party = ["mex", "tests"]
convention = "google"

[build-system]
requires = ["pdm-backend==2.4.1"]
requires = ["pdm-backend==2.4.3"]
build-backend = "pdm.backend"
5 changes: 2 additions & 3 deletions mex-{{ cookiecutter.project_name }}/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
cruft==2.15.0
cruft==2.16.0
mex-release==0.3.0
pdm==2.20.1
pdm==2.22.1
pre-commit==4.0.1
wheel==0.45.0
5 changes: 2 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
cruft==2.15.0
cruft==2.16.0
mex-release==0.3.0
pdm==2.20.1
pdm==2.22.2
pre-commit==4.0.1
wheel==0.45.0

0 comments on commit 57e9b75

Please sign in to comment.