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
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.12.8
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.31.1
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 want and run `pre-commit install` to add it to your local git hooks.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's important to be able to evaluate on-demand without installing as a git hook; is the below correct?

Suggested change
Install the tool as you want/your operating system want and run `pre-commit install` to add it to your local git hooks.
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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but I as more seeing pre-commit as a "shield" for commits, when you want to run it "normally", I would suggest to use usual uv run commands (that are not documented).

Having different methods of invocation shouldn't be an issue except for version management (updated in lock file but not in pre-commits). So would it be better with a make file like others projects and pre-commits running it? It's more 'heavily', but we can version (and tooling) guaranteed :)