Skip to content

Commit

Permalink
Modifications regarding dependencies, use of pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
BaptisteMorisse committed Dec 1, 2023
1 parent 4de2d2d commit 0d24ee2
Show file tree
Hide file tree
Showing 4 changed files with 926 additions and 962 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ datasets
saved_models_path
experiments
*.code-workspace
**/.ruffcache
**/.ruffcache
40 changes: 40 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files

# Using this mirror lets us use mypyc-compiled black, which is about 2x faster
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 23.11.0
hooks:
- id: black

- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.1.4
hooks:
# Run the linter.
- id: ruff
args: [ --fix ]
# Run the formatter.
- id: ruff-format
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
args: ["--profile", "black", "--filter-files"]

- repo: https://github.com/python-poetry/poetry
rev: 1.7.1 # add version here
hooks:
- id: poetry-check
- id: poetry-lock
args: ["--no-update"]
- id: poetry-install
args: ["--sync"]
Loading

0 comments on commit 0d24ee2

Please sign in to comment.