Skip to content

Commit 0cd338d

Browse files
authored
πŸ—‘οΈ Remove requirements directory (open-edge-platform#1945)
* Remove requirements directory * Remove reference to requirements * Update the readthedocs config to pass extra requirements Signed-off-by: Samet Akcay <samet.akcay@intel.com> * Remove setup.py file Signed-off-by: Samet Akcay <samet.akcay@intel.com> * Update docs readme file Signed-off-by: Samet Akcay <samet.akcay@intel.com> * Update readthedocs config Signed-off-by: Samet Akcay <samet.akcay@intel.com> * Add docs requirements to pyproject.toml file Signed-off-by: Samet Akcay <samet.akcay@intel.com> * Revert full dependencies Signed-off-by: Samet Akcay <samet.akcay@intel.com> * Install jsonargparse as full --------- Signed-off-by: Samet Akcay <samet.akcay@intel.com>
1 parent 7de541d commit 0cd338d

15 files changed

Lines changed: 58 additions & 209 deletions

File tree

β€Ž.ci/Dockerfileβ€Ž

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -59,17 +59,11 @@ RUN conda install python=3.10
5959
## Anomalib Development Env
6060
#########################################################
6161

62-
FROM python_base_cuda11.4 as anomalib_development_env
62+
FROM python_base_cuda as anomalib_development_env
6363

6464
# Install all anomalib requirements
65-
COPY ./requirements/installer.txt /tmp/anomalib/requirements/installer.txt
66-
RUN pip install --no-cache-dir -r /tmp/anomalib/requirements/installer.txt
65+
COPY ./pyproject.toml /tmp/anomalib/pyproject.toml
66+
RUN pip install --no-cache-dir .[full]
6767

68-
COPY ./requirements/openvino.txt /tmp/anomalib/requirements/openvino.txt
69-
RUN pip install --no-cache-dir -r /tmp/anomalib/requirements/openvino.txt
70-
71-
# Install other requirements related to development
72-
COPY ./requirements/dev.txt /tmp/anomalib/requirements/dev.txt
73-
RUN pip install --no-cache-dir -r /tmp/anomalib/requirements/dev.txt
7468

7569
WORKDIR /home/user

β€Ž.readthedocs.yamlβ€Ž

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,7 @@ formats:
2929
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
3030
python:
3131
install:
32-
- requirements: docs/requirements.txt
33-
- requirements: requirements/core.txt
34-
- requirements: requirements/loggers.txt
35-
- requirements: requirements/notebooks.txt
36-
- requirements: requirements/openvino.txt
3732
- method: pip
3833
path: .
34+
extra_requirements:
35+
- dev

β€ŽCONTRIBUTING.mdβ€Ž

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,24 @@ Set up your development environment to start contributing. This involves install
4646
conda activate anomalib_dev
4747
```
4848

49-
2. Install the base and development requirements:
49+
2. Install the development requirements:
5050

5151
```bash
52-
pip install -r requirements/installer.txt -r requirements/dev.txt
53-
anomalib install -v
52+
# Option I: Via anomalib install
53+
anomalib install --option dev
54+
55+
#Option II: Via pip install
56+
pip install -e .[dev]
5457
```
5558

5659
Optionally, for a full installation with all dependencies:
5760

5861
```bash
59-
pip install -e .[all]
62+
# Option I: via anomalib install
63+
anomalib install --option full
64+
65+
# Option II: via pip install
66+
pip install -e .[full]
6067
```
6168

6269
3. Install and configure pre-commit hooks:

β€ŽREADME.mdβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Installing the library with pip is the easiest way to get started with anomalib.
5252
pip install anomalib
5353
```
5454

55-
This will install Anomalib CLI using the [installer](requirements/installer.txt) dependencies. Anomalib CLI is a command line interface for training, inference, benchmarking, and hyperparameter optimization. If you want to use the library as a Python package, you can install the library with the following command:
55+
This will install Anomalib CLI using the [dependencies](/pyproject.toml) in the `pyproject.toml` file. Anomalib CLI is a command line interface for training, inference, benchmarking, and hyperparameter optimization. If you want to use the library as a Python package, you can install the library with the following command:
5656

5757
```bash
5858
# Get help for the installation arguments
@@ -92,7 +92,7 @@ cd anomalib
9292
pip install -e .
9393
```
9494

95-
This will install Anomalib CLI using the [installer](requirements/installer.txt) dependencies. Anomalib CLI is a command line interface for training, inference, benchmarking, and hyperparameter optimization. If you want to use the library as a Python package, you can install the library with the following command:
95+
This will install Anomalib CLI using the [dependencies](/pyproject.toml) in the `pyproject.toml` file. Anomalib CLI is a command line interface for training, inference, benchmarking, and hyperparameter optimization. If you want to use the library as a Python package, you can install the library with the following command:
9696

9797
```bash
9898
# Get help for the installation arguments

β€Ždocs/README.mdβ€Ž

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,17 @@ This is the source code for the Anomalib documentation. It is built using sphinx
66

77
## Installation
88

9-
To install the dependencies, run the following command:
9+
To install the dependencies, run the following command from the project root:
1010

1111
```bash
12-
pip install -r requirements.txt
12+
pip install .[docs]
1313
```
1414

1515
## Build
1616

1717
To build the documentation, run the following command:
1818

1919
```bash
20+
cd docs
2021
sphinx-build -b html source build
2122
```

β€Ždocs/source/markdown/guides/developer/contributing.mdβ€Ž

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,24 @@ Set up your development environment to start contributing. This involves install
2222
conda activate anomalib_dev
2323
```
2424

25-
Install the base and development requirements:
25+
Install the development requirements:
2626

2727
```bash
28-
pip install -r requirements/installer.txt -r requirements/dev.txt
29-
anomalib install -v
28+
# Option I: Via anomalib install
29+
anomalib install --option dev
30+
31+
#Option II: Via pip install
32+
pip install -e .[dev]
3033
```
3134

3235
Optionally, for a full installation with all dependencies:
3336

3437
```bash
35-
pip install -e .[all]
38+
# Option I: via anomalib install
39+
anomalib install --option full
40+
41+
# Option II: via pip install
42+
pip install -e .[full]
3643
```
3744

3845
2. Install and configure pre-commit hooks:

β€Žpyproject.tomlβ€Ž

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ authors = [{ name = "Intel OpenVINO" }]
1818
dependencies = [
1919
"omegaconf>=2.1.1",
2020
"rich>=13.5.2",
21-
"jsonargparse==4.27.7",
21+
"jsonargparse[all]>=4.27.7",
2222
"docstring_parser", # CLI help-formatter
2323
"rich_argparse", # CLI help-formatter
2424
]
@@ -47,7 +47,17 @@ loggers = [
4747
"wandb==0.12.17",
4848
]
4949
notebooks = ["gitpython", "ipykernel", "ipywidgets", "notebook"]
50-
dev = [
50+
docs = [
51+
"myst-parser",
52+
"nbsphinx",
53+
"pandoc",
54+
"sphinx<8.0", # 7.0 breaks readthedocs builds.
55+
"sphinx_autodoc_typehints",
56+
"sphinx_book_theme",
57+
"sphinx-copybutton",
58+
"sphinx_design",
59+
]
60+
test = [
5161
"pre-commit",
5262
"pytest",
5363
"pytest-cov",
@@ -58,6 +68,7 @@ dev = [
5868
"tox",
5969
]
6070
full = ["anomalib[core,openvino,loggers,notebooks]"]
71+
dev = ["anomalib[full,docs,test]"]
6172

6273
[project.scripts]
6374
anomalib = "anomalib.cli.cli:main"

β€Žrequirements/core.txtβ€Ž

Lines changed: 0 additions & 13 deletions
This file was deleted.

β€Žrequirements/dev.txtβ€Ž

Lines changed: 0 additions & 8 deletions
This file was deleted.

β€Žrequirements/installer.txtβ€Ž

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
Β (0)