Skip to content

Conversation

@jonperron
Copy link
Contributor

Changelog:

  • Add pre-commit in dev dependancies of pyproject.toml
  • Add ruff as linter in dev dependancies of pyproject.toml
  • Add pre-commit config file and set configuration for ruff
  • Update Contributing.md to mention the requirement of using pre-commit before merging
  • Update dockerignore to ignore pre-commit related files

Fix #364

@jonperron
Copy link
Contributor Author

jonperron commented Mar 29, 2025

I chose ruff because it's one of the best and fastest linter at the moment, it is still maintained and has an important community.

I tested the configuration using a dummy modification of main.py and a clean installation of the repository, seems to work fine

(venv) jperron:~/boaviztapi-dev$ git checkout -b chore/test_pre-commit
Basculement sur la nouvelle branche 'chore/test_pre-commit'
(venv) jperron:~/boaviztapi-dev$ git status
Sur la branche chore/test_pre-commit
Modifications qui ne seront pas validées :
  (utilisez "git add <fichier>..." pour mettre à jour ce qui sera validé)
  (utilisez "git restore <fichier>..." pour annuler les modifications dans le répertoire de travail)
	modifié :         boaviztapi/main.py

aucune modification n'a été ajoutée à la validation (utilisez "git add" ou "git commit -a")
(venv) jperron:~/boaviztapi-dev$ git add boaviztapi/main.py 
(venv) jperron:~/boaviztapi-dev$ git commit
ruff.....................................................................Passed
[chore/test_pre-commit 44b5542] WIP test
 1 file changed, 1 insertion(+)

@jonperron jonperron changed the title feat(lint): add pre-commit as dependancy of the project feat(lint): add pre-commit and linter as dependancies of the project Mar 29, 2025
@jonperron jonperron changed the title feat(lint): add pre-commit and linter as dependancies of the project feat(lint): add pre-commit and linter as dependencies of the project Mar 29, 2025
Changelog:
* Add pre-commit in dev dependancies of pyproject.toml
* Add ruff as linter in dev dependancies of pyproject.toml
* Add pre-commit config file and set configuration for ruff
* Update Contributing.md to mention the requirement of using pre-commit before merging
* Update dockerignore to ignore pre-commit related files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add lint to pre-commit and/or to CI

1 participant