π Geometric Computer Vision Library for Spatial AI
Python artificial-intelligencecomputer-visiondeep-learninghacktoberfestimage-processingmachine-learningneural-networkpythonpytorchroboticsspatial-ai
reorganize requirements files (#1314)
Edgar Riba80f24492691c
diff --git a/.github/workflows/format.yml b/.github/workflows/format.ymlindex 1df648127..1c02339ca 100644--- a/.github/workflows/format.yml+++ b/.github/workflows/format.yml@@ -13,16 +13,10 @@ jobs:runs-on: [ubuntu-latest]steps:- uses: actions/checkout@v2- - name: Cache pip- uses: actions/cache@v2- with:- path: ~/.cache/pip- key: ${{ runner.os }}-pip-${{ hashFiles('requirements-dev.txt') }}- restore-keys: ${{ runner.os }}-pip-- name: Install dependenciesrun: |pip install torch --find-links https://download.pytorch.org/whl/cpu/torch_stable.html- pip install -r requirements-dev.txt+ pip install -r requirements/dev.txtpython setup.py develop --user- name: Run linter@@ -32,16 +26,10 @@ jobs:runs-on: [ubuntu-latest]steps:- uses: actions/checkout@v2- - name: Cache pip- uses: actions/cache@v2- with:- path: ~/.cache/pip- key: ${{ runner.os }}-pip-${{ hashFiles('requirements-dev.txt') }}- restore-keys: ${{ runner.os }}-pip-- name: Install dependenciesrun: |pip install torch --find-links https://download.pytorch.org/whl/cpu/torch_stable.html- pip install -r requirements-dev.txt+ pip install -r requirements/dev.txtpython setup.py develop --user- name: Run mypy@@ -51,16 +39,10 @@ jobs:runs-on: [ubuntu-latest]steps:- uses: actions/checkout@v2- - name: Cache pip- uses: actions/cache@v2- with:- path: ~/.cache/pip- key: ${{ runner.os }}-pip-${{ hashFiles('requirements-dev.txt') }}- restore-keys: ${{ runner.os }}-pip-- name: Install dependenciesrun: |pip install torch --find-links https://download.pytorch.org/whl/cpu/torch_stable.html- pip install -r requirements-dev.txt+ pip install -r requirements/dev.txtpython setup.py develop --user- name: Run doctestdiff --git a/.github/workflows/tests_cpu.yml b/.github/workflows/tests_cpu.ymlindex bf356fb96..6befc4c0b 100644--- a/.github/workflows/tests_cpu.yml+++ b/.github/workflows/tests_cpu.yml@@ -30,7 +30,7 @@ jobs:run: |conda install curl make -c conda-forgeconda install pytorch=${{ matrix.pytorch-version }} cpuonly -c pytorch- pip install -r requirements-dev.txt+ pip install -e .[all]make install- name: Run Testsshell: bash -l {0}@@ -61,7 +61,7 @@ jobs:run: |conda install curl make -c conda-forgeconda install pytorch=${{ matrix.pytorch-version }} cpuonly -c pytorch- pip install -r requirements-dev.txt+ pip install -e .[all]make install- name: Run Testsshell: bash -l {0}diff --git a/.github/workflows/tests_cpu_versions.yml b/.github/workflows/tests_cpu_versions.ymlindex 11ea6429d..d6cea8454 100644--- a/.github/workflows/tests_cpu_versions.yml+++ b/.github/workflows/tests_cpu_versions.yml@@ -29,7 +29,7 @@ jobs:run: |conda install curl make -c conda-forgeconda install pytorch=${{ matrix.pytorch-version }} cpuonly -c pytorch- pip install -r requirements-dev.txt+ pip install -e .[all]make install- name: Run Testsshell: bash -l {0}diff --git a/.github/workflows/tests_cuda.yml b/.github/workflows/tests_cuda.ymlindex fce5f0c95..dcb51133b 100644--- a/.github/workflows/tests_cuda.yml+++ b/.github/workflows/tests_cuda.yml@@ -23,8 +23,7 @@ jobs:run: |# NOTE: pytorch image does not include gitconda install -c anaconda git- pip install -r requirements-dev.txt- python setup.py install+ pip install -e .[all]- name: Run Testsshell: bash -l {0}run: pytest -v --device cuda --dtype float32,float64 ./testdiff --git a/requirements-dev.txt b/requirements/dev.txtsimilarity index 83%rename from requirements-dev.txtrename to requirements/dev.txtindex 1f8fae060..a94f76999 100644--- a/requirements-dev.txt+++ b/requirements/dev.txt@@ -1,4 +1,3 @@-# testpytest==6.2.5pytest-flake8==1.0.7pytest-cov==2.12.1@@ -11,5 +10,3 @@ yapfisortnumpyscipy-# x-accelerate==0.4.0diff --git a/requirements/x.txt b/requirements/x.txtnew file mode 100644index 000000000..d511deed2--- /dev/null+++ b/requirements/x.txt@@ -0,0 +1,2 @@+accelerate==0.4.0+dataclassesdiff --git a/setup.py b/setup.pyindex 297187762..0651140c4 100644--- a/setup.py+++ b/setup.py@@ -118,9 +118,17 @@ requirements = ['packaging' # REMOVE once we deprecate pytorch > 1.7.1. See: issue #1264]++def load_requirements(filename: str):+ with open(filename) as f:+ return [x.strip() for x in f.readlines()]++requirements_extras = {- "x": ["accelerate==0.4.0"],+ "x": load_requirements("requirements/x.txt"),+ "dev": load_requirements("requirements/dev.txt"),}+requirements_extras["all"] = requirements_extras["x"] + requirements_extras["dev"]if __name__ == '__main__':