Skip to content

Commit

Permalink
Merge branch 'main' into feature/mx-1569-date-validation
Browse files Browse the repository at this point in the history
  • Loading branch information
cutoffthetop authored Mar 13, 2024
2 parents 845f29b + b3084a4 commit 689c4b9
Show file tree
Hide file tree
Showing 15 changed files with 114 additions and 33 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": "12165319453990fdbe02bce39a3236337e298bc0",
"commit": "a3eb74737274b4c114a85b5a816ff0f11eac4f7e",
"checkout": null,
"context": {
"cookiecutter": {
Expand Down
4 changes: 0 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ updates:
- package-ecosystem: "github-actions"
allow:
- dependency-type: "all"
assignees:
- ${{secrets.MEX_BOT_USER}}
directory: "/"
labels:
- "dependabot"
Expand All @@ -14,8 +12,6 @@ updates:
- package-ecosystem: "pip"
allow:
- dependency-type: "all"
assignees:
- ${{secrets.MEX_BOT_USER}}
directory: "/"
labels:
- "dependabot"
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/cookiecutter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ jobs:
git checkout -b cruft/cookiecutter-template-${template_ref}
cruft update --skip-apply-ask
printf '# Changes\n\n- bumped cookiecutter template to %s/commit/%s\n' "$template_url" "$template_ref" > .cruft-pr-body
if [[ $(git status --porcelain | grep .rej | wc -c) -ne 0 ]]; then
printf '\n# Conflicts\n' > .cruft-pr-body
if [[ $(find . -type f -name "*.rej" | wc -l) -ne 0 ]]; then
printf '\n# Conflicts\n' >> .cruft-pr-body
fi
git status --porcelain | grep .rej | awk '{print $2;}' | while read -r line ; do
find . -type f -name "*.rej" | while read -r line ; do
printf '\n```' >> .cruft-pr-body
cat ${line} >> .cruft-pr-body
printf '```\n' >> .cruft-pr-body
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cve-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
cache-name: cache-trivy
with:
path: ~/.cache/trivy
key: ${{ env.cache-name }}-${{ hashFiles('poetry.lock') }}
key: ${{ env.cache-name }}-${{ hashFiles('*.lock') }}
restore-keys: |
${{ env.cache-name }}-
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ jobs:
restore-keys: |
${{ env.cache-name }}-
- name: Cache poetry
- name: Cache environment
uses: actions/cache@v4
env:
cache-name: cache-poetry
cache-name: cache-environment
with:
path: ~/.cache/pip
key: ${{ env.cache-name }}-${{ hashFiles('poetry.lock') }}
key: ${{ env.cache-name }}-${{ hashFiles('*.lock') }}
restore-keys: |
${{ env.cache-name }}-
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ jobs:
restore-keys: |
${{ env.cache-name }}-
- name: Cache poetry
- name: Cache environment
uses: actions/cache@v4
env:
cache-name: cache-poetry
cache-name: cache-environment
with:
path: ~/.cache/pip
key: ${{ env.cache-name }}-${{ hashFiles('poetry.lock') }}
key: ${{ env.cache-name }}-${{ hashFiles('*.lock') }}
restore-keys: |
${{ env.cache-name }}-
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reviewing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
steps:
- name: Add assignee
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
run: |
user_name="${{ github.event.pull_request.user.login }}"
user_type=$(gh api "users/${user_name}" --jq ".type")
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ dist/
downloads/
eggs/
.eggs/
.pdm-python
lib/
lib64/
parts/
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ repos:
- id: fix-byte-order-marker
name: byte-order
- repo: https://github.com/python-poetry/poetry
rev: 1.8.1
rev: 1.8.2
hooks:
- id: poetry-check
name: poetry
74 changes: 74 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as contributors and
maintainers pledge to make participation in our project and our community a
harassment-free experience for everyone, regardless of age, body size, disability,
ethnicity, sex characteristics, gender identity and expression, level of experience,
education, socio-economic status, nationality, personal appearance, race, religion,
or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment include:

- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

- The use of sexualized language or imagery and unwelcome sexual attention or
advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project team members are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in response to
any instances of unacceptable behavior.

Project team members have the right and responsibility to remove, edit, or reject
comments, commits, code, and other contributions that are not aligned to this
Code of Conduct, or to ban temporarily or permanently any contributor for other
behaviors that they deem inappropriate, threatening, offensive, or harmful.

## Scope

This Code of Conduct applies within all project spaces, and it also applies when an
individual is representing the project or its community in public spaces. Examples of
representing a project or community include using an official project e-mail address,
appearing as a project maintainer, or acting as an appointed representative at an online
or offline event. Representation of a project may be further defined and clarified by
the project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by
contacting the project team at [email protected]. All complaints will be reviewed and
investigated and will result in a response that is deemed necessary and appropriate to
the circumstances. The project team is obligated to maintain confidentiality with regard
to the reporter of an incident. Further details of specific enforcement policies may be
posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may
face temporary or permanent repercussions as determined by project, departmental
or organizational leadership roles.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ hooks:
fi; \

install: setup hooks
# run the poetry installation with embedded virtual environment
# install packages from lock file in local virtual environment
@ echo installing package; \
poetry install --no-interaction --sync; \

Expand Down
19 changes: 9 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,12 @@ components of the MEx project are open-sourced under the same license as well.
- on unix, consider using pyenv https://github.com/pyenv/pyenv
- get pyenv `curl https://pyenv.run | bash`
- install 3.11 `pyenv install 3.11`
- create env `pyenv virtualenv 3.11 mex`
- go to repo root
- use env `pyenv local mex`
- switch version `pyenv global 3.11`
- run `make install`
- on windows, see https://python-poetry.org/docs/managing-environments
- install `python3.11` in your preferred way
- go to repo root
- on windows, consider using pyenv-win https://pyenv-win.github.io/pyenv-win/
- follow https://pyenv-win.github.io/pyenv-win/#quick-start
- install 3.11 `pyenv install 3.11`
- switch version `pyenv global 3.11`
- run `.\mex.bat install`

### linting and testing
Expand All @@ -73,15 +72,15 @@ components of the MEx project are open-sourced under the same license as well.
### updating dependencies

- update boilerplate files with `cruft update`
- update global dependencies in `requirements.txt` manually
- update global requirements in `requirements.txt` manually
- update git hooks with `pre-commit autoupdate`
- show outdated dependencies with `poetry show --outdated`
- update dependencies in poetry using `poetry update --lock`
- update github actions manually in `.github/workflows/*.yml`
- update github actions in `.github/workflows/*.yml` manually

### creating release

- update version, eg `poetry version minor`
- commit update `git commit --message "..." pyproject.toml`
- update version in `pyproject.toml` and `CHANGELOG.md`
- commit update `git commit --message "..."`
- create a tag `git tag ...`
- push `git push --follow-tags`
2 changes: 1 addition & 1 deletion mex.bat
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ if "%CI%"=="" (
if %errorlevel% neq 0 exit /b %errorlevel%
)

@REM run the poetry installation with embedded virtual environment
@REM install packages from lock file in local virtual environment
echo installing package
poetry install --no-interaction --sync
exit /b %errorlevel%
Expand Down
17 changes: 14 additions & 3 deletions poetry.lock

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

2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cruft==2.15.0
poetry==1.8.2
pre-commit==3.6.2
wheel==0.42.0
wheel==0.43.0

0 comments on commit 689c4b9

Please sign in to comment.