Skip to content

Commit

Permalink
Merge branch 'master' into future
Browse files Browse the repository at this point in the history
  • Loading branch information
rumpelsepp authored Jan 16, 2025
2 parents 83ac315 + 915a113 commit 26d69d3
Show file tree
Hide file tree
Showing 46 changed files with 1,705 additions and 747 deletions.
53 changes: 0 additions & 53 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:

# This step generates an artifact attestation for the image, which is an unforgeable statement about where and how it was built. It increases supply chain security for people who consume the image. For more information, see "[AUTOTITLE](/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds)."
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v1
uses: actions/attest-build-provenance@v2
with:
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
subject-digest: ${{ steps.push.outputs.digest }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v4
uses: astral-sh/setup-uv@v5
with:
enable-cache: true

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/linters-win32.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.12', '3.13']
python-version: ['3.11', '3.12', '3.13']

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v4
uses: astral-sh/setup-uv@v5
with:
enable-cache: true

Expand All @@ -46,4 +46,4 @@ jobs:
- name: Run mypy
run: |
uv run make lint-win32
uv run just win32-lint-mypy
20 changes: 10 additions & 10 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.12', '3.13']
python-version: ['3.11', '3.12', '3.13']

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v4
uses: astral-sh/setup-uv@v5
with:
enable-cache: true

Expand All @@ -44,18 +44,18 @@ jobs:
run: |
uv sync --all-extras --dev
- name: Run ruff
- name: Run reuse lint
run: |
uv run ruff check src tests
uv run just lint-reuse
- name: Run mypy
- name: Run ruff format
run: |
uv run mypy src tests
uv run just lint-ruff-format
- name: Run ruff format
- name: Run ruff check
run: |
uv run ruff format --check src tests
uv run just lint-ruff-check
- name: Run reuse lint
- name: Run mypy
run: |
uv run reuse lint
uv run just lint-mypy
2 changes: 1 addition & 1 deletion .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v4
uses: astral-sh/setup-uv@v5
with:
enable-cache: true

Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.12', '3.13']
python-version: ['3.11', '3.12', '3.13']

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v4
uses: astral-sh/setup-uv@v5
with:
enable-cache: true

Expand All @@ -44,11 +44,13 @@ jobs:
- name: Run pytest
run: |
uv run make pytest
uv run just run-test-pytest
bats:
strategy:
fail-fast: false
matrix:
python-version: ['3.11', '3.12', '3.13']

runs-on: ubuntu-latest
container: debian:trixie
Expand All @@ -57,13 +59,14 @@ jobs:
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v4
uses: astral-sh/setup-uv@v5
with:
enable-cache: true

- name: Set up Python ${{ matrix.python-version }}
run: |
uv python install ${{ matrix.python-version }}
uv python pin ${{ matrix.python-version }}
- name: Install Dependencies
run: |
Expand All @@ -75,4 +78,4 @@ jobs:
- name: Run bats
run: |
uv run make bats
uv run just run-test-bats
2 changes: 0 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ Several linters and unit tests are used to catch programming errors and regressi
The relevant tools and their versions are specified in the `pyproject.toml`.
[Github Actions](https://docs.github.com/en/actions) are configured to run against all merge requests.

To run these checks locally, use `make lint` and `make test`.

## Commit Messages

We use [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) for structured commit messages.
53 changes: 0 additions & 53 deletions Makefile

This file was deleted.

5 changes: 5 additions & 0 deletions contrib/rnd.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# SPDX-FileCopyrightText: AISEC Pentesting Team
#
# SPDX-License-Identifier: CC0-1.0

KERNEL=="ttyACM[0-9]*", SUBSYSTEM=="tty", SUBSYSTEMS=="usb", ATTRS{idVendor}=="0416", ATTRS{idProduct}=="5011", SYMLINK+="rnd-netzteil"
63 changes: 63 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# SPDX-FileCopyrightText: AISEC Pentesting Team
#
# SPDX-License-Identifier: CC0-1.0

default:
@just --list

[private]
lint-mypy:
mypy --pretty src tests

[private]
lint-ruff-check:
ruff check

[private]
lint-ruff-format:
ruff format --check

[private]
lint-shellcheck:
find tests/bats \( -iname "*.bash" -or -iname "*.bats" -or -iname "*.sh" \) | xargs shellcheck

[private]
lint-reuse:
reuse lint

lint: lint-mypy lint-ruff-check lint-ruff-format lint-ruff-format lint-shellcheck lint-reuse

win32-lint-mypy:
mypy --platform win32 --exclude "gallia\/log\.py" --exclude "hr" src tests

fmt:
ruff check --fix-only
ruff format
find tests/bats \( -iname "*.bash" -or -iname "*.bats" -or -iname "*.sh" \) | xargs shfmt -w

run-tests: run-test-pytest run-test-bats

run-test-pytest:
python -m pytest -v --cov={{justfile_directory()}} --cov-report html tests/pytest

run-test-bats:
./tests/bats/run_bats.sh

gen-constants: && fmt
./scripts/gen_constants.py > src/gallia/transports/_can_constants.py

release increment:
cz bump --increment {{increment}}
git push --follow-tags
gh release create "v$(cz version -p)"

pre-release increment premode:
cz bump --increment {{increment}} --prerelease {{premode}}
git push --follow-tags
gh release create --prerelease "v$(cz version -p)"

make-docs:
make -C docs html

clean:
make -C docs clean
Loading

0 comments on commit 26d69d3

Please sign in to comment.