Skip to content

Commit

Permalink
Added the 'Optional' extra require in setup.py (open-mmlab#1491)
Browse files Browse the repository at this point in the history
* Added the 'Optional' extra require in setup.py

Added the missing extra of "optional" as seen in other MM repos as mmaction2  (https://github.com/open-mmlab/mmaction2/blob/master/setup.py#L193)   and mmdetection  (https://github.com/open-mmlab/mmdetection/blob/master/setup.py#L216)

Without it, users who are used to install mmlab packages will automatically add the "optional" extra and will encounter a pip error

* move albumentations from optional.txt to albu.txt

* addd pip install albumentations command in the workflow

Co-authored-by: liqikai <tiger19971215@sjtu.edu.cn>
  • Loading branch information
2 people authored and shuheilocale committed May 5, 2023
1 parent 8e3787e commit d93d250
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ jobs:
pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cpu/${{matrix.torch_version}}/index.html
python -c 'import mmcv; print(mmcv.__version__)'
- name: Install other dependencies
run: pip install -r requirements.txt
run: |
pip install -r requirements.txt
pip install albumentations>=0.3.2 --no-binary imgaug,albumentations
- name: Build and install
run: rm -rf .eggs && pip install -e .
- name: Run unittests and generate coverage report
Expand Down Expand Up @@ -122,6 +124,7 @@ jobs:
python -V
python -m pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu101/${{matrix.torch_version}}/index.html
python -m pip install -r requirements.txt
python -m pip install albumentations>=0.3.2 --no-binary imgaug,albumentations
python -c 'import mmcv; print(mmcv.__version__)'
- name: Build and install
run: |
Expand Down Expand Up @@ -185,6 +188,7 @@ jobs:
python -V
python -m pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu102/${{matrix.torch_version}}/index.html
python -m pip install -r requirements.txt
python -m pip install albumentations>=0.3.2 --no-binary imgaug,albumentations
python -c 'import mmcv; print(mmcv.__version__)'
- name: Build and install
run: |
Expand Down
7 changes: 7 additions & 0 deletions requirements/optional.txt
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
<<<<<<< HEAD
=======
onnx
onnxruntime
poseval@git+https://github.com/svenkreiss/poseval.git
pyrender
>>>>>>> b52e4dfb (Added the 'Optional' extra require in setup.py (#1491))
requests
4 changes: 4 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,11 @@ def add_mim_extension():
=======
'build': parse_requirements('requirements/build.txt'),
'runtime': parse_requirements('requirements/runtime.txt'),
<<<<<<< HEAD
>>>>>>> 16027f63 ([Enhancement] Add mminstall.txt in setup.py (#1425))
=======
'optional': parse_requirements('requirements/optional.txt'),
>>>>>>> b52e4dfb (Added the 'Optional' extra require in setup.py (#1491))
'mim': parse_requirements('requirements/mminstall.txt'),
},
zip_safe=False)

0 comments on commit d93d250

Please sign in to comment.