Skip to content

Commit

Permalink
build: split requirements into lib and dev (#96)
Browse files Browse the repository at this point in the history
  • Loading branch information
kenichi-narioka authored Jul 1, 2022
1 parent 61711ad commit 8bf5338
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 13 deletions.
1 change: 1 addition & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ jobs:
pip install cython==0.29.21 numpy==1.19.4
sudo apt-get install jq
pip install -r requirements.txt
pip install -r requirements-dev.txt
pip install coverage-badge
- name: Run tests and calculate coverage
id: test-runner
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/doc-gen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
python -m pip install --upgrade pip
pip install cython==0.29.21 numpy==1.19.4
pip install -r requirements.txt
pip install -r requirements-dev.txt
pip install -r docs/requirements-doc.txt
cd docs
make html
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pre-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
python -m pip install --upgrade pip
pip install cython==0.29.21 numpy==1.19.4
pip install -r requirements.txt
pip install -r requirements-dev.txt
- name: Check python code formatting with YAPF
# Documentation: https://github.com/AlexanderMelde/yapf-action
uses: AlexanderMelde/yapf-action@master
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,10 @@ RUN pip install --no-cache-dir \
# Install python dependencies
ARG WORKSPACE=/home/dgp
WORKDIR ${WORKSPACE}
COPY requirements.txt /tmp/
COPY requirements.txt requirements-dev.txt /tmp/
RUN pip install --no-cache-dir cython==0.29.21 numpy==1.19.4
RUN pip install --no-cache-dir -r /tmp/requirements.txt
RUN pip install --no-cache-dir -r /tmp/requirements-dev.txt

# Settings for S3
RUN aws configure set default.s3.max_concurrent_requests 100 && \
Expand Down
10 changes: 10 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
awscli
coverage==6.0.2
grpcio==1.41.0
grpcio-tools==1.41.0
isort >=5.0,<6.0
pylint>=2.8.1
pytest==6.2.5
pytest-timeout==2.0.1
ujson==5.2.0
yapf==0.31.0
14 changes: 2 additions & 12 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,24 +1,14 @@
awscli
boto3
botocore
Click>=7.1.2
coverage==6.0.2
diskcache>=4.1.0
grpcio==1.41.0
grpcio-tools==1.41.0
isort >=5.0,<6.0
matplotlib>=3.0.3,<4.0
opencv-python==4.5.3.56
opencv-python>=4.5.3.56
Pillow>=8.3.2
pycocotools>=2.0.0
pylint>=2.8.1
pyquaternion==0.9.5
pytest==6.2.5
pytest-timeout==2.0.1
torch>=1.8.1
torchvision>=0.9.1
tqdm>=4.29.1
tenacity>=6.0.0
ujson==5.2.0
xarray==0.16.2
yapf==0.31.0
xarray==0.16.2
4 changes: 4 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ def run(self):
with open('requirements.txt', encoding='utf-8') as f:
requirements = f.read().splitlines()

with open('requirements-dev.txt', encoding='utf-8') as f:
requirements_dev = f.read().splitlines()

packages = find_packages(exclude=['tests'])
setup(
name="dgp",
Expand All @@ -54,6 +57,7 @@ def run(self):
include_package_data=True,
setup_requires=['cython==0.29.21', 'grpcio==1.41.0', 'grpcio-tools==1.41.0'],
install_requires=requirements,
extras_require={'dev': requirements_dev},
zip_safe=False,
python_requires='>=3.6',
cmdclass={
Expand Down

0 comments on commit 8bf5338

Please sign in to comment.