Div. dev ops updates (#43)

* Pipline rework to limit mypy and balck to src and tests
* Poetry update
* pre-commit update
This commit is contained in:
Philipp Horstenkamp 2023-08-10 19:20:12 +02:00 committed by GitHub
parent 29b851169c
commit 50bf7811ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 571 additions and 368 deletions

View File

@ -9,8 +9,7 @@ on:
pull_request: pull_request:
jobs: jobs:
run-linters: Black:
name: Black & mypy
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Set up python - name: Set up python
@ -28,10 +27,29 @@ jobs:
virtualenvs-path: ~/local/share/virtualenvs virtualenvs-path: ~/local/share/virtualenvs
- run: poetry install --without develop,doc,test - run: poetry install --without develop,doc,test
- name: Run linters - name: Run linters
uses: wearerequired/lint-action@v2 run: |
black src tests
mypy:
runs-on: ubuntu-latest
steps:
- name: Set up python
id: setup-python
uses: actions/setup-python@v4
with: with:
black: true python-version: '3.11'
mypy: true - name: Check out Git repository
uses: actions/checkout@v3
- name: Install and configure Poetry
uses: snok/install-poetry@v1
with:
version: 1.4.2
virtualenvs-create: false
virtualenvs-path: ~/local/share/virtualenvs
- run: poetry install --without develop,doc
- name: Run linters
run: |
mypy src tests
ruff: ruff:
runs-on: ubuntu-latest runs-on: ubuntu-latest

View File

@ -25,13 +25,13 @@ repos:
- repo: https://github.com/astral-sh/ruff-pre-commit - repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version. # Ruff version.
rev: v0.0.277 rev: v0.0.284
hooks: hooks:
- id: ruff - id: ruff
args: [--fix, --exit-non-zero-on-fix] args: [--fix, --exit-non-zero-on-fix]
- repo: https://github.com/psf/black - repo: https://github.com/psf/black
rev: 23.3.0 rev: 23.7.0
hooks: hooks:
- id: black - id: black
args: [--config=pyproject.toml] args: [--config=pyproject.toml]
@ -40,7 +40,7 @@ repos:
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks - repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.9.0 rev: v2.10.0
hooks: hooks:
- id: pretty-format-ini - id: pretty-format-ini
args: [--autofix] args: [--autofix]
@ -61,7 +61,7 @@ repos:
- types-requests - types-requests
- repo: https://github.com/frnmst/md-toc - repo: https://github.com/frnmst/md-toc
rev: 8.1.9 rev: 8.2.0
hooks: hooks:
- id: md-toc - id: md-toc
@ -76,6 +76,6 @@ repos:
- id: validate-html - id: validate-html
- repo: https://github.com/python-jsonschema/check-jsonschema - repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.23.2 rev: 0.24.0
hooks: hooks:
- id: check-github-workflows - id: check-github-workflows

View File

@ -1,5 +1,6 @@
"""Placholder to login int the FH db."""
HOSTNAME = "stagingdbtransparenzreg.ioappzs.mongodb.net" HOSTNAME = "stagingdbtransparenzreg.ioappzs.mongodb.net"
DATABASE = "transparenzregister" DATABASE = "transparenzregister"
PORT = None PORT = None
USERNAME = "db_user" USERNAME = "db_user"
PASSWORD="secret_password" PASSWORD = "secret_password" # noqa: S105

View File

@ -1,5 +1,6 @@
"""Placholder to login int the FH db."""
HOSTNAME = "172.17.38.210" HOSTNAME = "172.17.38.210"
DATABASE = "transparenzregister" DATABASE = "transparenzregister"
PORT = 30217 PORT = 30217
USERNAME = "root" USERNAME = "root"
PASSWORD="secret_password" PASSWORD = "secret_password" # noqa: S105

879
poetry.lock generated

File diff suppressed because it is too large Load Diff