Skip to content

Commit

Permalink
[V2] Clean up dev dependencies (#125)
Browse files Browse the repository at this point in the history
* Remove unneeded dev dependencies

* Split out docs and lint deps for faster installation

Co-authored-by: Jay Qi <jayqi@users.noreply.github.com>
  • Loading branch information
jayqi and jayqi authored Oct 11, 2021
1 parent 2ef7fb0 commit 03213ce
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 32 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/docs-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,12 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
pip install -r requirements-dev/docs.txt
- name: Build documentation
run: |
make docs
- name: Deploy site preview to Netlify
uses: nwtgck/actions-netlify@v1.1
with:
Expand All @@ -38,4 +40,4 @@ jobs:
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
timeout-minutes: 1
timeout-minutes: 1
6 changes: 4 additions & 2 deletions .github/workflows/docs-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,12 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
pip install -r requirements-dev/docs.txt
- name: Build documentation
run: |
make docs
- name: Deploy docs to Netlify
uses: nwtgck/actions-netlify@v1.1
with:
Expand All @@ -37,4 +39,4 @@ jobs:
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
timeout-minutes: 1
timeout-minutes: 1
12 changes: 8 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,13 @@ jobs:

- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools
pip install -e .[cpu,dev]
python -m pip install --upgrade pip
pip install -r requirements-dev/lint.txt
- name: Lint package
run: |
make lint
tests:
name: Test suite (${{ matrix.os }}, Python ${{ matrix.python-version }})
needs: code-quality
Expand Down Expand Up @@ -59,8 +61,9 @@ jobs:

- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools
pip install -e .[dev]
python -m pip install --upgrade pip setuptools wheel
pip install -r requirements-dev.txt
- name: Run tests
run: |
make tests
Expand Down Expand Up @@ -99,6 +102,7 @@ jobs:
run: |
python -m pip install --upgrade pip setuptools
pip install .
- name: Run zamba CLI to ensure proper install
run: |
zamba --help
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ ifeq (${CPU_OR_GPU}, gpu)
conda install cudatoolkit=11.0.3 cudnn=8.0 -c conda-forge
endif
$(PYTHON_INTERPRETER) -m pip install -U pip setuptools wheel
$(PYTHON_INTERPRETER) -m pip install -e .[dev,internal]
$(PYTHON_INTERPRETER) -m pip install -r requirements-dev.txt


## Delete all compiled Python files
Expand Down
8 changes: 4 additions & 4 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
mkdocs>=1.1
mkdocs-jupyter
mkdocs-material>=7
mkdocstrings>=0.15
-e .[tests]

-r requirements-dev/docs.txt
-r requirements-dev/lint.txt
3 changes: 3 additions & 0 deletions requirements-dev/docs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
mkdocs>=1.1
mkdocs-material>=7
mkdocstrings>=0.15
2 changes: 2 additions & 0 deletions requirements-dev/lint.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
black
flake8
20 changes: 1 addition & 19 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -68,27 +68,9 @@ console_scripts =
zamba = zamba.cli:app

[options.extras_require]
dev =
awscli
black
tests =
coverage
flake8
ipython
jedi
jupyter
jupyterlab>=3.1.4
matplotlib
mkdocs
mkdocs-jupyter
mkdocs-material
mkdocstrings
nbautoexport
nb_black
pip
pytest
pytest-coverage
pytest-mock
seaborn
wheel
xlrd
internal = labslib @ git+https://github.com/drivendataorg/labslib.git

0 comments on commit 03213ce

Please sign in to comment.