Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

[RFC] Change installation for extra packages #346

Merged
merged 13 commits into from
May 30, 2021
3 changes: 2 additions & 1 deletion .azure-pipelines/gpu-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ jobs:

- bash: |
# python -m pip install "pip==20.1"
pip install --requirement ./requirements/devel.txt --upgrade-strategy only-if-needed
pip install '.[all]'
pip install '.[test]' --upgrade-strategy only-if-needed
pip list
displayName: 'Install dependencies'

Expand Down
3 changes: 1 addition & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ references:
# we need to use py3.7 ot higher becase of an issue with metaclass inheritence
pyenv global 3.7.3
python --version
pip install -e .
pip install -r requirements/docs.txt --progress-bar off
pip install -e ".[docs]" --progress-bar off
pip list
cd docs
make clean
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:
python --version
pip --version
pip install -e '.[${{ matrix.topic }}]' --pre --upgrade --find-links https://download.pytorch.org/whl/cpu/torch_stable.html
pip install --requirement requirements/test.txt --upgrade
pip install -e '.[test]' --pre --upgrade
pip list
shell: bash

Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/docs-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ jobs:
run: |
python --version
pip --version
pip install -e .
pip install -r requirements/docs.txt
pip install -e '.[docs]'
# install Texlive, see https://linuxconfig.org/how-to-install-latex-on-ubuntu-20-04-focal-fossa-linux
sudo apt-get update && sudo apt-get install -y texlive-latex-extra dvipng texlive-pictures
pip list
Expand Down Expand Up @@ -90,8 +89,8 @@ jobs:

- name: Install dependencies
run: |
pip install -e '.[dev-test]' --find-links https://download.pytorch.org/whl/cpu/torch_stable.html --quiet
pip install --requirement requirements/docs.txt --upgrade-strategy only-if-needed
pip install -e '.[test]' --find-links https://download.pytorch.org/whl/cpu/torch_stable.html
pip install -e '.[docs]' --upgrade-strategy only-if-needed
python --version
pip --version
pip list
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/docs-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ jobs:
${{ runner.os }}-pip-
- name: Install dependencies
run: |
pip install . --find-links https://download.pytorch.org/whl/cpu/torch_stable.html --quiet
pip install --requirement requirements/docs.txt --upgrade-strategy only-if-needed
pip install '.[docs]' --find-links https://download.pytorch.org/whl/cpu/torch_stable.html
# install Texlive, see https://linuxconfig.org/how-to-install-latex-on-ubuntu-20-04-focal-fossa-linux
sudo apt-get update
sudo apt-get install -y texlive-latex-extra dvipng texlive-pictures
Expand Down
10 changes: 6 additions & 4 deletions requirements/devel.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# install all mandatory dependencies
-r ../requirements.txt
-r ../requirements.txt

# extended list of dependencies for development and run lint and tests
-r ./test.txt
-r ./test.txt

-r ./docs.txt

-r ./datatype_image.txt

-r ./datatype_image_style_transfer.txt

-r ./datatype_tabular.txt

-r ./datatype_text.txt
Expand Down
7 changes: 2 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,8 @@ def _load_py_module(fname, pkg="flash"):

# remove possible duplicate.
extras["vision"] = list(set(extras["image"] + extras["video"] + extras["image_style_transfer"]))
extras["dev"] = list(set(extras["vision"] + extras["tabular"] + extras["text"] + extras["image"]))
extras["dev-test"] = list(set(extras["test"] + extras["dev"]))
extras["all"] = list(set(extras["dev"] + extras["docs"]))

print(extras)
extras["all"] = list(set(extras["vision"] + extras["tabular"] + extras["text"]))
extras["dev"] = list(set(extras["all"] + extras["test"] + extras["docs"]))

# https://packaging.python.org/discussions/install-requires-vs-requirements /
# keep the meta-data here for simplicity in reading this file... it's not obvious
Expand Down