aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAdam Janovsky2023-02-04 09:47:50 +0100
committerAdam Janovsky2023-02-04 09:47:50 +0100
commit3eb2529d876c7f138329d6581b9ea72fafd4004f (patch)
treefff627a63878e69fa0a4cdac70155de9ee671ce6
parente9ef55642b3712cf8cae6b5e46a51208b74b72c0 (diff)
downloadsec-certs-3eb2529d876c7f138329d6581b9ea72fafd4004f.tar.gz
sec-certs-3eb2529d876c7f138329d6581b9ea72fafd4004f.tar.zst
sec-certs-3eb2529d876c7f138329d6581b9ea72fafd4004f.zip
final commit
-rw-r--r--.github/workflows/lint.yml42
-rw-r--r--.github/workflows/new_lint.yml44
-rw-r--r--CONTRIBUTING.md7
-rw-r--r--pyproject.toml2
4 files changed, 27 insertions, 68 deletions
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index 90e4a459..9cb2236f 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -3,40 +3,42 @@ on:
push:
workflow_dispatch:
jobs:
- mypy:
+ black:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- - name: Setup python
- uses: actions/setup-python@v4
+ - uses: actions/setup-python@v4
with:
- python-version: "3.9"
- - name: Install external dependencies
- run: sudo apt-get install build-essential libpoppler-cpp-dev pkg-config python3-dev -y
- - name: Install python dependencies
+ python-version: "3.8"
+ - name: Install dependencies
run: |
- pip install -r requirements/requirements.txt
+ sudo apt-get install build-essential libpoppler-cpp-dev pkg-config python3-dev -y
pip install -r requirements/dev_requirements.txt
- - name: Run mypy
- run: mypy .
- black:
+ - name: Run Black
+ run: black . --check --target-version py38
+ ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- - uses: psf/black@stable
+ - uses: actions/setup-python@v4
with:
- version: "23.1.0"
- options: "--check --target-version py38"
- ruff:
+ python-version: "3.8"
+ - name: Install dependencies
+ run: |
+ sudo apt-get install build-essential libpoppler-cpp-dev pkg-config python3-dev -y
+ pip install -r requirements/dev_requirements.txt
+ - name: Run Ruff
+ run: ruff . --format=github
+ mypy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
- python-version: 3.8
+ python-version: "3.8"
- name: Install dependencies
run: |
- python -m pip install --upgrade pip
- pip install ruff==v0.0.239
- - name: Run Ruff
- run: ruff --format=github .
+ sudo apt-get install build-essential libpoppler-cpp-dev pkg-config python3-dev -y
+ pip install -r requirements/dev_requirements.txt
+ - name: Run Mypy
+ run: mypy .
diff --git a/.github/workflows/new_lint.yml b/.github/workflows/new_lint.yml
deleted file mode 100644
index 9cb2236f..00000000
--- a/.github/workflows/new_lint.yml
+++ /dev/null
@@ -1,44 +0,0 @@
-name: Lint (MyPy, Black, Ruff)
-on:
- push:
- workflow_dispatch:
-jobs:
- black:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v3
- - uses: actions/setup-python@v4
- with:
- python-version: "3.8"
- - name: Install dependencies
- run: |
- sudo apt-get install build-essential libpoppler-cpp-dev pkg-config python3-dev -y
- pip install -r requirements/dev_requirements.txt
- - name: Run Black
- run: black . --check --target-version py38
- ruff:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v3
- - uses: actions/setup-python@v4
- with:
- python-version: "3.8"
- - name: Install dependencies
- run: |
- sudo apt-get install build-essential libpoppler-cpp-dev pkg-config python3-dev -y
- pip install -r requirements/dev_requirements.txt
- - name: Run Ruff
- run: ruff . --format=github
- mypy:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v3
- - uses: actions/setup-python@v4
- with:
- python-version: "3.8"
- - name: Install dependencies
- run: |
- sudo apt-get install build-essential libpoppler-cpp-dev pkg-config python3-dev -y
- pip install -r requirements/dev_requirements.txt
- - name: Run Mypy
- run: mypy .
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 3e4c59e0..32f2f0ab 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -33,8 +33,9 @@ Note on single-sourcing the package version: More can be read [here](https://pac
### Currently, the release process is as follows
-1. Create a release from GitHub UI. Include release notes, add proper version tag and publish the release (or create it from scratch with new tag).
-2. This will automatically update PyPi and DockerHub packages.
+1. Update dependencies with `pre-commit autoupdate`, pin new versions of linters into `pyproject.toml` and run `cd requirements && ./compile.sh`.
+2. Create a release from GitHub UI. Include release notes, add proper version tag and publish the release (or create it from scratch with new tag).
+3. This will automatically update PyPi and DockerHub packages.
## Quality assurance
@@ -46,7 +47,7 @@ All commits shall pass the lint pipeline of the following tools:
- Ruff (see [pyproject.toml](https://github.com/crocs-muni/sec-certs/blob/main/pyproject.toml) for settings)
- PyUpgrade
-These tools can be installed via [dev_requirements.txt](https://github.com/crocs-muni/sec-certs/blob/main/dev_requirements.txt) You can use [pre-commit](https://pre-commit.com/) tool register git hook that will evalute these checks prior to any commit and abort the commit for you. Note that the pre-commit is not meant to automatically fix the issues, just warn you.
+These tools can be installed via [dev_requirements.txt](https://github.com/crocs-muni/sec-certs/blob/main/dev_requirements.txt) You can use [pre-commit](https://pre-commit.com/) tool to register git hook that will evalute these checks prior to any commit and abort the commit for you. Note that the pre-commit is not meant to automatically fix the issues, just warn you.
It should thus suffice to:
diff --git a/pyproject.toml b/pyproject.toml
index a7f67db0..7406e307 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -62,9 +62,9 @@
[project.optional-dependencies]
dev = [
- "mypy==0.991",
"black==23.1.0",
"ruff==0.0.239",
+ "mypy==0.991",
"types-PyYAML",
"types-python-dateutil",
"types-requests",