Skip to content

Commit

Permalink
Feature/template maintenance july 2024 (#35)
Browse files Browse the repository at this point in the history
# PR Context
- includes #34
- includes #33
- includes #32
- includes #36
- includes #37
- includes #38
- includes #39
- includes #40
- i tested ruff-format on mex-extractors and it only had 8 changes in
total, including just minor newline fixes and added trailing commas

# Added

- configure ruff formatting and pre-commit hook
- added RKI postal address to README files

# Changes

- update ruff and mypy versions
- update GlueOps actions container

# Removed

- remove black dependency and pre-commit hook

---------

Signed-off-by: Nicolas Drebenstedt <[email protected]>
Co-authored-by: Franziska Diehr <[email protected]>
Co-authored-by: RKIMetadataExchange <[email protected]>
Co-authored-by: RKI | Metadata Exchange <[email protected]>
  • Loading branch information
4 people authored Jul 22, 2024
1 parent 39db8b8 commit cf7f28e
Show file tree
Hide file tree
Showing 11 changed files with 42 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/open-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
group: ${{ github.workflow }}
cancel-in-progress: true

jobs:
Expand Down
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/github-action@v40.1.12
uses: renovatebot/github-action@v40.2.2
env:
RENOVATE_GIT_PRIVATE_KEY: ${{ secrets.GPG_SIGNING_KEY }}
RENOVATE_REPOSITORIES: "robert-koch-institut/mex-template"
Expand Down
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- configure ruff formatting and pre-commit hook
- added RKI postal address to README files

### Changes

- use new --frozen-lockfile instead of deprecated --no-lock
- update ruff
- update ruff and mypy versions

### Deprecated

### Removed

- remove black dependency and pre-commit hook

### Fixed

- remove --no-editable flag to avoid installing local package into venv
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,15 @@ For further details, please consult our
[FAIR data principles](https://www.go-fair.org/fair-principles/) – guidelines to make
data Findable, Accessible, Interoperable and Reusable.

**Contact** \
For more information, please feel free to email us at [[email protected]](mailto:[email protected]).

### Publisher of this document
**Robert Koch-Institut** \
Nordufer 20 \
13353 Berlin \
Germany

## package

The `mex-template` is a [cookiecutter](https://www.cookiecutter.io/) template to make
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ jobs:
needs: release
steps:
- name: Build, tag and push docker image to ghcr
uses: GlueOps/[email protected].2
uses: GlueOps/[email protected].3
with:
{% raw %}tags: "${{ github.sha }},${{ needs.release.outputs.tag }},latest"{% endraw %}

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/github-action@v40.1.12
uses: renovatebot/github-action@v40.2.2
env:
RENOVATE_GIT_PRIVATE_KEY: {% raw %}${{ secrets.GPG_SIGNING_KEY }}{% endraw %}
RENOVATE_REPOSITORIES: "robert-koch-institut/mex-{{ cookiecutter.project_name }}"
Expand Down
9 changes: 3 additions & 6 deletions mex-{{ cookiecutter.project_name }}/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,12 @@ fail_fast: false
default_language_version:
python: python3.11
repos:
- repo: https://github.com/psf/black
rev: 24.4.2
hooks:
- id: black
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.9
rev: v0.5.4
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
Expand All @@ -28,7 +25,7 @@ repos:
- id: fix-byte-order-marker
name: byte-order
- repo: https://github.com/pdm-project/pdm
rev: 2.15.4
rev: 2.17.1
hooks:
- id: pdm-lock-check
name: pdm
Expand Down
9 changes: 9 additions & 0 deletions mex-{{ cookiecutter.project_name }}/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,15 @@ For further details, please consult our
[FAIR data principles](https://www.go-fair.org/fair-principles/) – guidelines to make
data Findable, Accessible, Interoperable and Reusable.

**Contact** \
For more information, please feel free to email us at [[email protected]](mailto:[email protected]).

### Publisher of this document
**Robert Koch-Institut** \
Nordufer 20 \
13353 Berlin \
Germany

## package

{{ cookiecutter.long_summary|wordwrap(88, break_long_words=False, break_on_hyphens=False) }}
Expand Down
15 changes: 9 additions & 6 deletions mex-{{ cookiecutter.project_name }}/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,14 @@ urls = { Repository = "https://github.com/robert-koch-institut/mex-{{ cookiecutt
requires-python = "<3.13,>=3.11"
dependencies = []
optional-dependencies.dev = [
"black==24.4.2",
"ipdb==0.13.13",
"mypy==1.10.0",
"mypy==1.11.0",
"pytest-cov==5.0.0",
"pytest-random-order==1.1.1",
"pytest-xdist==3.6.1",
"pytest==8.2.2",
"ruff==0.4.9",
"sphinx==7.3.7",
"pytest==8.3.1",
"ruff==0.5.4",
"sphinx==7.4.0",
]

[project.scripts]
Expand Down Expand Up @@ -72,8 +71,12 @@ markers = "integration: mark a test as integration test"

[tool.ruff]
fix = true
line-length = 88
show-fixes = true

[tool.ruff.format]
docstring-code-format = true

[tool.ruff.lint]
ignore = [
"D100", # Allow missing module docstring for brevity
Expand Down Expand Up @@ -126,5 +129,5 @@ known-first-party = ["mex", "tests"]
convention = "google"

[build-system]
requires = ["pdm-backend==2.3.0"]
requires = ["pdm-backend==2.3.3"]
build-backend = "pdm.backend"
2 changes: 1 addition & 1 deletion mex-{{ cookiecutter.project_name }}/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cruft==2.15.0
mex-release @ git+https://github.com/robert-koch-institut/mex-release.git
pdm==2.15.4
pdm==2.17.1
pre-commit==3.7.1
wheel==0.43.0
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cruft==2.15.0
mex-release @ git+https://github.com/robert-koch-institut/mex-release.git
pdm==2.15.4
pdm==2.17.1
pre-commit==3.7.1
wheel==0.43.0

0 comments on commit cf7f28e

Please sign in to comment.