Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions .github/workflows/hygiene.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
jobs:
hygiene:
runs-on: ubuntu-latest
name: Ruff
name: Hygiene check
steps:
- uses: actions/checkout@v3
- name: setup-python
Expand All @@ -21,10 +21,9 @@ jobs:
architecture: "x64"
- name: Install uv
uses: astral-sh/setup-uv@v6
- name: Ruff format
run: uv run ruff format --check
- name: Ruff check
run: uv run ruff check
- name: Basedpyright check
run: uv run basedpyright

- name: Install project
run: uv sync
- name: Install pre-commit
run: pip install pre-commit
- name: Pre-commit checks on all files
run: pre-commit run --all-files
14 changes: 14 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.14.6
hooks:
# Run the linter.
- id: ruff-check
args: [ --fix ]
# Run the formatter.
- id: ruff-format
- repo: https://github.com/DetachHead/basedpyright-prek-mirror
rev: 1.34.0
hooks:
- id: basedpyright
6 changes: 6 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
Contributions to this repository are managed via the same process as for the [dss repository](https://github.com/interuss/dss/CONTRIBUTING.md).

## Hygiene

Formating and typing is verified by a CI job, however if you want to automaticaly check your code on each commit, this projet use [pre-commit](https://pre-commit.com/)

Install the tool as you want/your operating system wants and run `pre-commit install` to add it to your local git hooks, or run `pre-commit run --all-files` to run without installing as a git hook.
3 changes: 0 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ dependencies = [
dev = [
"pytest",
"pytest-cov",
"black",
"ruff>=0.12.8",
"basedpyright>=1.31.1",
]

[project.urls]
Expand Down
Loading
Loading