Skip to content

Commit 0e12104

Browse files
🛠️ fix(pyproject): update pyproject.toml (#3179)
* chore: update dependencies in pyproject.toml * Replace "pre-commit" with "prek" in both root and application/backend pyproject.toml files. * Remove dependency for "geti-inspect" in the root pyproject.toml. Signed-off-by: Ashwin Vaidya <[email protected]> * Update prek references Signed-off-by: Ashwin Vaidya <[email protected]> * Update uv.lock Signed-off-by: Ashwin Vaidya <[email protected]> --------- Signed-off-by: Ashwin Vaidya <[email protected]>
1 parent 6e49a0d commit 0e12104

File tree

10 files changed

+71
-876
lines changed

10 files changed

+71
-876
lines changed

.github/workflows/_reusable-code-quality.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Code Quality Workflow
22
#
3-
# This reusable workflow executes code quality checks using prek (pre-commit workspace tool)
4-
# with support for monorepo configurations and multiple pre-commit configs.
3+
# This reusable workflow executes code quality checks using prek (prek workspace tool)
4+
# with support for monorepo configurations and multiple prek configs.
55
#
66
# Key Features:
77
# - Workspace mode support (multiple .pre-commit-config.yaml files)

.github/workflows/pre_merge.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
- name: Install Tox
3535
run: pip install tox
3636
- name: Code quality checks
37-
run: tox -e pre-commit
37+
run: tox -e prek
3838
Pre-Merge-Checks:
3939
runs-on: [self-hosted, linux, x64, anomalib]
4040
needs: Code-Quality-Checks

CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,15 @@ Set up your development environment to start contributing. This involves install
6969
3. Install and configure pre-commit hooks:
7070

7171
```bash
72-
pre-commit install
72+
prek install
7373
```
7474

7575
Pre-commit hooks help ensure code quality and consistency. After each commit,
76-
`pre-commit` will automatically run the configured checks for the changed file.
76+
`prek` will automatically run the configured checks for the changed file.
7777
If you would like to manually run the checks for all files, use:
7878

7979
```bash
80-
pre-commit run --all-files
80+
prek run --all-files
8181
```
8282

8383
To bypass pre-commit hooks temporarily (e.g., for a work-in-progress commit),
@@ -102,7 +102,7 @@ However, make sure to address any pre-commit issues before finalizing your pull
102102
4. **Pass Tests and Quality Checks:** Ensure the test suite passes and that your code meets quality standards by running:
103103

104104
```bash
105-
pre-commit run --all-files
105+
prek run --all-files
106106
pytest tests/
107107
```
108108

application/backend/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ dependencies = [
3131
[dependency-groups]
3232
dev = [
3333
"pytest~=8.3",
34-
"pre-commit~=4.1",
34+
"prek",
3535
"pdbpp~=0.10",
3636
"flaky~=3.8",
3737
"testfixtures~=8.2",

application/backend/uv.lock

Lines changed: 27 additions & 68 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/source/markdown/guides/developer/contributing.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,15 @@ Set up your development environment to start contributing. This involves install
4545
2. Install and configure pre-commit hooks:
4646

4747
```bash
48-
pre-commit install
48+
prek install
4949
```
5050

5151
Pre-commit hooks help ensure code quality and consistency. After each commit,
52-
`pre-commit` will automatically run the configured checks for the changed file.
52+
`prek` will automatically run the configured checks for the changed file.
5353
If you would like to manually run the checks for all files, use:
5454

5555
```bash
56-
pre-commit run --all-files
56+
prek run --all-files
5757
```
5858

5959
To bypass pre-commit hooks temporarily (e.g., for a work-in-progress commit), use:
@@ -77,7 +77,7 @@ Set up your development environment to start contributing. This involves install
7777
4. **Pass Tests and Quality Checks:** Ensure the test suite passes and that your code meets quality standards by running:
7878

7979
```bash
80-
pre-commit run --all-files
80+
prek run --all-files
8181
pytest tests/
8282
```
8383

pyproject.toml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ docs = [
8686
"sphinx_design",
8787
]
8888
test = [
89-
"pre-commit",
89+
"prek",
9090
"pytest",
9191
"pytest-cov",
9292
"pytest-xdist",
@@ -131,10 +131,6 @@ xpu = [
131131
]
132132
full = ["anomalib[clip,openvino,loggers,notebooks,vlm,video]"]
133133
dev = ["anomalib[full,docs,test]"]
134-
# Geti Inspect application requires python>=3.13
135-
application = [
136-
"geti-inspect ; python_version >= '3.13'"
137-
]
138134

139135
[project.scripts]
140136
anomalib = "anomalib.cli.cli:main"
@@ -234,7 +230,6 @@ pytorch-triton-rocm = [
234230
pytorch-triton-xpu = [
235231
{ index = "pytorch-xpu", extra = "xpu" },
236232
]
237-
geti-inspect = { path = "./application/backend", editable = true }
238233

239234

240235
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #

tests/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Before running the tests, make sure you have the following prerequisites
1010
installed:
1111

1212
- Python 3.8 or newer
13-
- `pre-commit`
13+
- `prek`
1414
- `pytest`
1515
- `pytest-cov`
1616
- `pytest-sugar`
@@ -93,7 +93,7 @@ This will provide instructions on how to check test coverage with `pytest-cov.`
9393
ensuring compatibility. In Anomalib, `tox` is used to automate multiple tests.
9494
Here's a brief explanation of each:
9595

96-
- `pre-commit`: These tests are run before each commit is made to the
96+
- `prek`: These tests are run before each commit is made to the
9797
repository. They're used to catch issues early and prevent problematic code
9898
from being committed to the repository. They can include things like style
9999
checks, unit tests, and static analysis.
@@ -118,7 +118,7 @@ environment. Here are some examples:
118118
To run the pre-commit tests
119119

120120
```bash
121-
tox -e pre-commit
121+
tox -e prek
122122
```
123123

124124
To run the unit and integration tests

tox.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
isolated_build = True
33
skip_missing_interpreters = true
44
envlist =
5-
pre-commit
5+
prek
66
pre-merge-py{38,39,310}
77
snyk-scan
88

@@ -12,7 +12,7 @@ passenv = ftp_proxy
1212
HTTPS_PROXY
1313
CUDA_VISIBLE_DEVICES
1414

15-
[testenv:pre-commit]
15+
[testenv:prek]
1616
basepython = py310
1717
deps =
1818
prek

0 commit comments

Comments
 (0)