Skip to content

Commit

Permalink
Bump cookiecutter template to 71137c (#86)
Browse files Browse the repository at this point in the history
# Changes

- bumped cookiecutter template to
robert-koch-institut/mex-template@71137c

---------

Co-authored-by: Nicolas Drebenstedt <drebenstedtn@rki.de>
  • Loading branch information
RKIMetadataExchange and cutoffthetop authored Jun 14, 2024
1 parent 25b3bc2 commit 3c87db2
Show file tree
Hide file tree
Showing 17 changed files with 100 additions and 32 deletions.
2 changes: 1 addition & 1 deletion .cruft.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"template": "https://github.com/robert-koch-institut/mex-template",
"commit": "5bac2fd56e8da37a4ac070283eaa26c99934c521",
"commit": "71137ce60c22f449d66138dcd113772acd678a39",
"checkout": null,
"context": {
"cookiecutter": {
Expand Down
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ dmypy.json
data/
identity.csv
schema.json
tmp*/
work/

# Docker specifics
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/cookiecutter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,13 @@ on:
branches: ["main"]
tags: ["**"]
schedule:
- cron: '0 0 * * *'
- cron: "14 3 * * 1-5"
workflow_dispatch:

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

env:
PIP_NO_OPTION: on
PIP_NO_CLEAN: on
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/cve-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,19 @@ name: CVE Scan

on:
push:
# Workflows triggered by Dependabot on the "push" event run with read-only access.
# Uploading Code Scanning results requires write access. We therefore only use the
# "pull_request" trigger for Dependabot branches.
branches-ignore:
- 'dependabot/**'
pull_request:
types:
- opened
- reopened
- synchronize
schedule:
- cron: '0 0 * * *'
- cron: "14 3 * * 1-5"
workflow_dispatch:

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

jobs:
scan:
runs-on: ubuntu-latest
Expand Down
14 changes: 0 additions & 14 deletions .github/workflows/docker.yml

This file was deleted.

8 changes: 5 additions & 3 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: Documentation

on:
push:
tags: ["**"]
workflow_run:
workflows: [Release]
types:
- completed
workflow_dispatch:

env:
Expand All @@ -16,7 +18,7 @@ permissions:
id-token: write

concurrency:
group: "pages"
group: ${{ github.workflow }}
cancel-in-progress: false

jobs:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ env:
PIP_NO_CLEAN: on
PIP_PREFER_BINARY: on

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

jobs:
lint:
runs-on: ubuntu-latest
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/open-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
tags: ["**"]
workflow_dispatch:

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

jobs:
sync:
runs-on: ubuntu-latest
Expand Down
56 changes: 55 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,18 @@ env:

permissions:
contents: write
packages: write

concurrency:
group: "release"
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false

jobs:
release:
runs-on: ubuntu-latest
timeout-minutes: 10
outputs:
tag: ${{ steps.release.outputs.tag }}
steps:
- name: Checkout repo
uses: actions/checkout@v4
Expand Down Expand Up @@ -72,7 +75,58 @@ jobs:
git config --local commit.gpgsign true
- name: Release new version
id: release
env:
GH_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
run: |
pdm release ${{ inputs.version }}
echo "tag=$(git describe --abbrev=0 --tags)" >> "$GITHUB_OUTPUT"
containerize:
runs-on: ubuntu-latest
timeout-minutes: 10
needs: release
steps:
- name: Build, tag and push docker image to ghcr
uses: GlueOps/github-actions-build-push-containers@v0.4.2
with:
tags: "${{ github.sha }},${{ needs.release.outputs.tag }},latest"

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

- name: Cache requirements
uses: actions/cache@v4
env:
cache-name: cache-requirements
with:
path: ~/.cache/pip
key: ${{ env.cache-name }}-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ env.cache-name }}-
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: 3.11

- name: Install requirements
run: make setup

- 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
pdm build --dest dist
for filename in dist/*; do
gh release upload ${{ needs.release.outputs.tag }} ${filename};
done
5 changes: 4 additions & 1 deletion .github/workflows/renovatebot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@ 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:

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

jobs:
renovate:
runs-on: ubuntu-latest
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/reviewing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
- opened
- reopened

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

jobs:
assignee:
runs-on: ubuntu-latest
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ env:
PIP_NO_CLEAN: on
PIP_PREFER_BINARY: on

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

jobs:
test:
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,5 @@ dmypy.json
data/
identity.csv
schema.json
tmp*/
work/
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ repos:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: pretty-format-json
name: json
Expand Down
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@

FROM python:3.11 as base

LABEL org.opencontainers.image.authors="RKI MEx Team <mex@rki.de>"
LABEL org.opencontainers.image.authors="mex@rki.de"
LABEL org.opencontainers.image.description="Backend server for the RKI metadata exchange."
LABEL org.opencontainers.image.licenses="MIT"
LABEL org.opencontainers.image.url="https://github.com/robert-koch-institut/mex-backend"
LABEL org.opencontainers.image.vendor="robert-koch-institut"

ENV PYTHONUNBUFFERED=1
ENV PYTHONOPTIMIZE=1
Expand Down
2 changes: 1 addition & 1 deletion pdm.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ requires-python = "<3.13,>=3.11"
dependencies = [
"fastapi==0.111.0",
"httpx==0.27.0",
"mex-common@git+https://github.com/robert-koch-institut/mex-common.git@0.27.0",
"mex-common@git+https://github.com/robert-koch-institut/mex-common.git@0.27.1",
"neo4j==5.21.0",
"pydantic==2.7.3",
"pydantic==2.7.4",
"uvicorn[standard]==0.30.1",
]
optional-dependencies.dev = [
Expand Down

0 comments on commit 3c87db2

Please sign in to comment.