From 86bbd6a108938225ce2587ec90c54cd6657c4807 Mon Sep 17 00:00:00 2001 From: Han Xiao Date: Wed, 26 Jan 2022 15:38:16 +0100 Subject: [PATCH 1/2] refactor(deps): move cicd requirement to extra_requires --- .github/requirements-cicd.txt | 16 ---------------- .github/requirements-test.txt | 10 ---------- .github/workflows/cd.yml | 4 +--- .github/workflows/ci.yml | 4 +--- docs/index.md | 8 ++++++++ setup.py | 21 ++++++++++++++++++++- 6 files changed, 30 insertions(+), 33 deletions(-) delete mode 100644 .github/requirements-cicd.txt delete mode 100644 .github/requirements-test.txt diff --git a/.github/requirements-cicd.txt b/.github/requirements-cicd.txt deleted file mode 100644 index 63670f3d87b..00000000000 --- a/.github/requirements-cicd.txt +++ /dev/null @@ -1,16 +0,0 @@ -tensorflow==2.7.0 -paddlepaddle==2.2.0 -torch==1.9.0 -torchvision==0.10.0 -scipy==1.7.1 -datasets -av -trimesh -onnx -onnxruntime -matplotlib -rich -Pillow -lz4 -fastapi -jupyterlab \ No newline at end of file diff --git a/.github/requirements-test.txt b/.github/requirements-test.txt deleted file mode 100644 index 6d6d9a4de56..00000000000 --- a/.github/requirements-test.txt +++ /dev/null @@ -1,10 +0,0 @@ -pytest -pytest-timeout -pytest-mock -pytest-cov -pytest-repeat -pytest-asyncio -pytest-reraise -mock -pytest-custom_exit_code -black \ No newline at end of file diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 4993e825cea..c0c49cdfc66 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -40,9 +40,7 @@ jobs: run: | python -m pip install --upgrade pip python -m pip install wheel - pip install -r .github/requirements-test.txt - pip install -r .github/requirements-cicd.txt - pip install --no-cache-dir ".[full]" + pip install --no-cache-dir ".[full,test]" - name: Test id: test run: | diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f51d7b2d23f..d837164411e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -111,9 +111,7 @@ jobs: run: | python -m pip install --upgrade pip python -m pip install wheel - pip install -r .github/requirements-test.txt - pip install -r .github/requirements-cicd.txt - pip install --no-cache-dir ".[full]" + pip install --no-cache-dir ".[full,test]" - name: Test id: test run: | diff --git a/docs/index.md b/docs/index.md index e7cfdcfb343..cb161b42ea0 100644 --- a/docs/index.md +++ b/docs/index.md @@ -52,6 +52,14 @@ The following dependencies will be installed to enable additional features: Alternatively, you can first do basic installation and then install missing dependencies on-demand. ```` +````{tab} Developer install + +```bash +pip install "docarray[full,test]" +``` + +This will install all requirements to reproduce tests on your local environment. +``` ```pycon diff --git a/setup.py b/setup.py index 99d5d913dc9..0b0c13148a8 100644 --- a/setup.py +++ b/setup.py @@ -53,7 +53,26 @@ 'av', 'fastapi', 'uvicorn', - ] + ], + 'test': [ + 'pytest', + 'pytest-timeout', + 'pytest-mock', + 'pytest-cov', + 'pytest-repeat', + 'pytest-reraise', + 'mock', + 'pytest-custom_exit_code', + 'black', + 'tensorflow==2.7.0', + 'paddlepaddle==2.2.0', + 'torch==1.9.0', + 'torchvision==0.10.0', + 'datasets', + 'onnx', + 'onnxruntime', + 'jupyterlab', + ], }, classifiers=[ 'Development Status :: 5 - Production/Stable', From de36ef94093de21714f5a718be8e93f570c2b6b3 Mon Sep 17 00:00:00 2001 From: Han Xiao Date: Wed, 26 Jan 2022 15:39:54 +0100 Subject: [PATCH 2/2] refactor(deps): move cicd requirement to extra_requires --- docs/index.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/index.md b/docs/index.md index cb161b42ea0..d38fe4ef424 100644 --- a/docs/index.md +++ b/docs/index.md @@ -52,14 +52,14 @@ The following dependencies will be installed to enable additional features: Alternatively, you can first do basic installation and then install missing dependencies on-demand. ```` -````{tab} Developer install +````{tab} Developement install ```bash pip install "docarray[full,test]" ``` -This will install all requirements to reproduce tests on your local environment. -``` +This will install all requirements for reproducing tests on your local dev environment. +```` ```pycon