Skip to content

Commit

Permalink
🚀 Remove pl dependency from Anomalib CLI & Add install subcommand (#1748
Browse files Browse the repository at this point in the history
)

* Remove pl dependency from anomalib CLI

Signed-off-by: Kang, Harim <[email protected]>

* Add CHANGELOG.md

Signed-off-by: Kang, Harim <[email protected]>

* Remove blank in requirement txt

Signed-off-by: Kang, Harim <[email protected]>

* Add Missing arguments

Signed-off-by: Kang, Harim <[email protected]>

* Reflect some comments

Signed-off-by: Kang, Harim <[email protected]>

* Fix verbosity level

Signed-off-by: Kang, Harim <[email protected]>

* Add pytest-mock in tox

Signed-off-by: Kang, Harim <[email protected]>

---------

Signed-off-by: Kang, Harim <[email protected]>
  • Loading branch information
harimkang authored Feb 21, 2024
1 parent 84ee0b7 commit 8c6a4fa
Show file tree
Hide file tree
Showing 18 changed files with 1,041 additions and 207 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ repos:
rev: "v1.7.0"
hooks:
- id: mypy
additional_dependencies: [types-PyYAML]
additional_dependencies: [types-PyYAML, types-setuptools]
exclude: "tests"

# add bandit for security checks
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- 🔒 Address checkmarx issues. by @samet-akcay in https://github.com/openvinotoolkit/anomalib/pull/1672
- 📚 Update contribution guidelines by @samet-akcay in https://github.com/openvinotoolkit/anomalib/pull/1677
- 🔨 Refactor Visualisation by @ashwinvaidya17 in https://github.com/openvinotoolkit/anomalib/pull/1693
- 🔨 Remove Lightning dependencies from the CLI and Add `anomalib install` subcommand by @harimkang in https://github.com/openvinotoolkit/anomalib/pull/1748

### Deprecated

Expand Down
3 changes: 2 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ Set up your development environment to start contributing. This involves install
2. Install the base and development requirements:

```bash
pip install -r requirements/base.txt -r requirements/dev.txt
pip install -r requirements/installer.txt -r requirements/dev.txt
anomalib install -v
```

Optionally, for a full installation with all dependencies:
Expand Down
3 changes: 2 additions & 1 deletion docs/source/markdown/guides/developer/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ Set up your development environment to start contributing. This involves install
Install the base and development requirements:

```bash
pip install -r requirements/base.txt -r requirements/dev.txt
pip install -r requirements/installer.txt -r requirements/dev.txt
anomalib install -v
```

Optionally, for a full installation with all dependencies:
Expand Down
6 changes: 1 addition & 5 deletions requirements/base.txt → requirements/core.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,12 @@ av>=10.0.0
einops>=0.3.2
freia>=0.2
imgaug==0.4.0
jsonargparse[signatures]>=4.3
kornia>=0.6.6,<0.6.10
matplotlib>=3.4.3
omegaconf>=2.1.1
opencv-python>=4.5.3.56
pandas>=1.1.0
lightning>2,<2.2.0 # We need to sort out the compatibility with the latest version of Lightning
setuptools>=41.0.0
timm>=0.5.4,<=0.6.13
lightning>2,<2.2.0 # We need to sort out the compatibility with the latest version of Lightning
torch>=2,<2.2.0 # rkde export fails even with ONNX 17 (latest) with torch 2.2.0. TODO(ashwinvaidya17): revisit
torchmetrics==0.10.3
rich-argparse
open-clip-torch>=2.23.0
1 change: 1 addition & 0 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ pytest
pytest-cov
pytest-sugar
pytest-xdist
pytest-mock
coverage[toml]
tox
5 changes: 5 additions & 0 deletions requirements/installer.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
jsonargparse[signatures]>=4.3
omegaconf>=2.1.1
rich>=13.5.2
setuptools>=41.0.0
rich-argparse
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,10 @@ def get_required_packages(requirement_files: list[str]) -> list[str]:

VERSION = get_version()
LONG_DESCRIPTION = (Path(__file__).parent / "README.md").read_text(encoding="utf8")
INSTALL_REQUIRES = get_required_packages(requirement_files=["base"])
INSTALL_REQUIRES = get_required_packages(requirement_files=["installer"])
EXTRAS_REQUIRE = {
"loggers": get_required_packages(requirement_files=["loggers"]),
"core": get_required_packages(requirement_files=["core"]),
"notebooks": get_required_packages(requirement_files=["notebooks"]),
"openvino": get_required_packages(requirement_files=["openvino"]),
"full": get_required_packages(requirement_files=["loggers", "notebooks", "openvino"]),
Expand Down
Loading

0 comments on commit 8c6a4fa

Please sign in to comment.