Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature/template maintenance and consistency #15

Merged
merged 14 commits into from
May 15, 2024
Merged
11 changes: 0 additions & 11 deletions .github/dependabot.yml

This file was deleted.

28 changes: 28 additions & 0 deletions .github/workflows/renovatebot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Renovate

on:
push:
branches: ["main"]
schedule:
# * is a special character in YAML so you have to quote this string
- cron: "14 3 * * 1-5"
workflow_dispatch:

jobs:
renovate:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Run renovatebot
uses: renovatebot/[email protected]
env:
RENOVATE_GIT_PRIVATE_KEY: ${{ secrets.GPG_SIGNING_KEY }}
RENOVATE_REPOSITORIES: "robert-koch-institut/mex-template"
with:
configurationFile: renovate.json
token: ${{ secrets.WORKFLOW_TOKEN }}
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,10 @@ dmypy.json

# SQLite databases
*.db

# Default exports
*.ndjson
data/
identity.csv
schema.json
work/
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- configure renovatebot for mex-template itself

### Changes

- harmonize git and docker ignore files
- update requirements, actions and sample dependencies

### Deprecated

### Removed

### Fixed

- fix `export-all` pdm script

### Security

## [0.2.0] - 2024-04-30
Expand Down
7 changes: 7 additions & 0 deletions mex-{{ cookiecutter.project_name }}/.dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,13 @@ dmypy.json
# SQLite databases
*.db

# Default exports
*.ndjson
data/
identity.csv
schema.json
work/

# Docker specifics
**/.dockerignore
**/.git
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ jobs:
timeout-minutes: 10
steps:
- name: Build, tag and push docker image to ghcr
uses: GlueOps/github-actions-build-push-containers@v0.3
uses: GlueOps/github-actions-build-push-containers@v0.4
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
python-version: 3.11

- name: Setup pages
uses: actions/configure-pages@v4
uses: actions/configure-pages@v5

- name: Install requirements
run: make install
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
fetch-depth: 1

- name: Run renovatebot
uses: renovatebot/[email protected].9
uses: renovatebot/[email protected].11
env:
RENOVATE_GIT_PRIVATE_KEY: {% raw %}${{ secrets.GPG_SIGNING_KEY }}{% endraw %}
RENOVATE_REPOSITORIES: "robert-koch-institut/mex-{{ cookiecutter.project_name }}"
Expand Down
7 changes: 7 additions & 0 deletions mex-{{ cookiecutter.project_name }}/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,10 @@ dmypy.json

# SQLite databases
*.db

# Default exports
*.ndjson
data/
identity.csv
schema.json
work/
23 changes: 11 additions & 12 deletions mex-{{ cookiecutter.project_name }}/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ urls = { Repository = "https://github.com/robert-koch-institut/mex-{{ cookiecutt
requires-python = "<3.13,>=3.11"
dependencies = []
optional-dependencies.dev = [
"black==24.3.0",
"ipdb==0.13.13",
"mypy==1.9.0",
"pytest-cov==4.1.0",
"pytest-random-order==1.1.1",
"pytest-xdist==3.5.0",
"pytest==8.1.1",
"ruff==0.3.5",
"sphinx==7.2.6",
"black>=24.4.2",
"ipdb>=0.13.13",
"mypy>=1.10.0",
"pytest-cov>=5.0.0",
"pytest-random-order>=1.1.1",
"pytest-xdist>=3.6.1",
"pytest>=8.2.0",
"ruff>=0.4.4",
"sphinx>=7.3.7",
]

[project.scripts]
Expand All @@ -43,7 +43,7 @@ distribution = true
update-all = { cmd = "pdm update --group :all --update-eager --save-minimum" }
lock-all = { cmd = "pdm lock --group :all" }
install-all = { cmd = "pdm install --group :all" }
export-all = { cmd = "pdm export --all :all -f requirements" }
export-all = { cmd = "pdm export --group :all -f requirements" }
apidoc = { cmd = "pdm run sphinx-apidoc -f -o docs/source mex" }
sphinx = { cmd = "pdm run sphinx-build -aE -b dirhtml docs docs/dist" }
doc = { composite = ["apidoc", "sphinx"] }
Expand All @@ -54,7 +54,6 @@ unit = { cmd = "pdm run pytest -m 'not integration'" }
test = { cmd = "pdm run pytest --numprocesses=auto --dist=worksteal" }
all = { composite = ["install-all", "lint", "test", "doc"] }


[tool.pydantic-mypy]
warn_untyped_fields = true

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

[build-system]
requires = ["pdm-backend==2.1.8"]
requires = ["pdm-backend>=2.3.0"]
build-backend = "pdm.backend"
4 changes: 2 additions & 2 deletions mex-{{ cookiecutter.project_name }}/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cruft==2.15.0
pdm==2.13.2
pre-commit==3.7.0
pdm==2.15.2
pre-commit==3.7.1
wheel==0.43.0
30 changes: 30 additions & 0 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"enabledManagers": [
"github-actions",
"html",
"npm",
"pep621",
"pip_requirements"
],
"gitAuthor": "RKIMetadataExchange <[email protected]>",
"lockFileMaintenance": {
"enabled": true,
"schedule": [
"before 4am on monday"
]
},
"packageRules": [
{
"matchUpdateTypes": [
"digest",
"lockFileMaintenance",
"major",
"minor",
"patch",
"pin"
],
"minimumReleaseAge": "7 days"
}
]
}