Skip to content

Commit

Permalink
enforce versions on dependencies, remove optional dependencies (#262)
Browse files Browse the repository at this point in the history
* enforce versions on dependencies, remove optional dependencies (test and sphinx) from setup.py

Signed-off-by: cfujitsang <cfujitsang@nvidia.com>

* update pip before installing the dependencies

Signed-off-by: cfujitsang <cfujitsang@nvidia.com>

* fix pytest-cov installation

Signed-off-by: cfujitsang <cfujitsang@nvidia.com>

* fix wrong f-string syntax on setup.py

Signed-off-by: cfujitsang <cfujitsang@nvidia.com>
  • Loading branch information
Caenorst committed May 14, 2020
1 parent c3ec548 commit 594a596
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 20 deletions.
11 changes: 9 additions & 2 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,15 @@ steps:
- name: test
image: pytorch/pytorch:1.2-cuda10.0-cudnn7-devel
commands:
- pip install --no-dependencies nuscenes-devkit opencv-python-headless scikit-learn joblib pyquaternion cachetools
- pip install -r requirements.txt
- pip install --upgrade pip>=18.0.0
- pip install flake8==3.7.9 \
flake8-bugbear==20.1.4 \
flake8-comprehensions==3.2.2 \
flake8-mypy==17.8.0 \
flake8-pyi==19.3.0 \
pytest==5.4.2 \
pytest-cov==2.8.1
- pip install --no-dependencies -r requirements.txt
- apt-get update && apt-get -y install libglib2.0-0 # needed by opencv
- flake8 --config=.flake8 .
- python setup.py develop
Expand Down
10 changes: 8 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,14 @@ image: "pytorch/pytorch:1.2-cuda10.0-cudnn7-devel"

before_script:
- pip install --upgrade pip>=18.0.0
- pip install --no-dependencies nuscenes-devkit opencv-python-headless scikit-learn joblib pyquaternion cachetools
- pip install -r requirements.txt
- pip install flake8==3.7.9 \
flake8-bugbear==20.1.4 \
flake8-comprehensions==3.2.2 \
flake8-mypy==17.8.0 \
flake8-pyi==19.3.0 \
pytest==5.4.2 \
pytest-cov==2.8.1
- pip install --no-dependencies -r requirements.txt
- apt-get update && apt-get -y install libglib2.0-0 # needed by opencv

stages:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Kaolin curates a large _model zoo_ containing reference implementations of popul
Windows support is in the works and is currently considered experimental.

### Dependencies
- numpy >= 1.17
- numpy >= 1.17, <1.18.4
- PyTorch >=1.2, <1.5 and Torchvision >=0.4.0, <0.6.0 (see [pytorch.org](http://pytorch.org) for installation instructions)

### Installation
Expand Down
12 changes: 8 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
flake8-bugbear
flake8-comprehensions
flake8-mypy
flake8-pyi
nuscenes-devkit==1.0.8
opencv-python-headless==4.2.0.34
scikit-learn==0.22.2
joblib==0.14.1
pyquaternion==0.9.5
numpy<1.18.4
cachetools==4.1.0
sphinx==2.2.0
15 changes: 4 additions & 11 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
# Check that torchvision version installed meets minimum requirements
torchvision_ver = parse_version(torchvision.__version__)
if torchvision_ver < parse_version('0.4.0') or torchvision_ver >= parse_version('0.6.0'):
logger.warning(f'Kaolin is tested with torchvision >=0.4.0, <0.6.0 Found version (torchvision.__version__) instead.')
logger.warning(f'Kaolin is tested with torchvision >=0.4.0, <0.6.0 Found version {torchvision.__version__} instead.')

# Get version number from version.py
version = {}
Expand Down Expand Up @@ -209,18 +209,11 @@ def get_extensions():
def get_requirements():
return [
'matplotlib<3.0.0',
'scikit-image',
'shapely',
'scikit-image==0.16.2',
'trimesh>=3.0',
'scipy==1.4.1',
'sphinx==2.2.0', # pinned to resolve issue with docutils 0.16b0.dev
'pytest>=4.6',
'pytest-cov>=2.7',
'tqdm',
'pytest',
'pptk',
'autopep8',
'flake8',
'tqdm==4.32.1',
'pptk==0.1.0',
'pillow<7.0.0',
]

Expand Down

0 comments on commit 594a596

Please sign in to comment.