Skip to content

Commit f9a40f5

Browse files
authored
Update development dependencies (#462)
Development dependencies should live in dev-requirements*.txt rather than tox-requirements*.txt. Having both is confusing. This commit moves development dependencies and unfreezes their versions as much as possible (a couple of packages need to be pinned because of Python 2 compatibility). * Bump development dependencies * Revert additional changes to tox.ini * Pin lazy-object-proxy==1.6.0 * Add comment for lazy-object-proxy==1.6.0 * Suppress new lint failures * Suppress more lint failures * Don't run pycodestyle * Restrict pylint-django<2.0 because >=2.0 depends on pylint>=2.0 * Restrict flake8<3.5 for Python 2 * Restrict pyflakes<1.6.0,>=1.5.0 for Python 2
1 parent 163a408 commit f9a40f5

File tree

12 files changed

+39
-46
lines changed

12 files changed

+39
-46
lines changed

.devcontainer/Dockerfile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,8 @@ RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/
1010

1111
RUN /usr/local/bin/python3 -m pip install --upgrade pip
1212

13-
COPY dev-requirements.txt /tmp/pip-tmp/requirements.txt
14-
RUN pip3 --disable-pip-version-check --no-cache-dir install -r /tmp/pip-tmp/requirements.txt && rm -rf /tmp/pip-tmp
15-
16-
COPY tox-requirements.txt /tmp/pip-tmp/requirements.txt
17-
RUN pip3 --disable-pip-version-check --no-cache-dir install -r /tmp/pip-tmp/requirements.txt && rm -rf /tmp/pip-tmp
13+
COPY dev-requirements*.txt /tmp/pip-tmp/
14+
RUN pip3 --disable-pip-version-check --no-cache-dir install -r /tmp/pip-tmp/dev-requirements-py3.txt && rm -rf /tmp/pip-tmp
1815

1916
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
2017
&& apt-get -y install --no-install-recommends tig python2.7 python2.7-dev

.travis.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ matrix:
88
env: TOXENV=py36
99
install:
1010
- pip install --upgrade pip
11-
- pip install .
12-
- pip install -r dev-requirements.txt
11+
- pip install tox
1312
script:
1413
- pip list
1514
- tox

CONTRIBUTING.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ docker run -it -v `echo $PWD`:/root python:2.7.12 bash
1111
```
1212

1313
- `pip install -e .`
14-
- `pip install -r dev-requirements.txt`
15-
- `pip install -r tox-requirements.txt`
14+
- `pip install -r dev-requirements-py3.txt`
1615

1716
To verify that the installation of `databricks-cli` is the one checked out from VCS, you can check by doing `python -c "import databricks_cli; print databricks_cli.__file__"`.
1817

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ WORKDIR /usr/src/databricks-cli
55
COPY . .
66

77
RUN pip install --upgrade pip && \
8-
pip install -r dev-requirements.txt && \
8+
pip install -r dev-requirements-py2.txt && \
99
pip list && \
1010
./lint.sh && \
1111
pip install . && \

dev-requirements-py2.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
-r ./dev-requirements.txt
2+
prospector[with_pyroma]==0.12.7
3+
pylint-django<2.0
4+
pep8-naming==0.5.0
5+
flake8<3.5
6+
pyflakes<1.6.0,>=1.5.0
7+
8+
# For some reason Travis tries to install the yanked version 1.7.0.
9+
# See https://pypi.org/project/lazy-object-proxy/#history.
10+
# See https://github.com/databricks/databricks-cli/pull/462.
11+
# Try to unpin this after moving away from Travis.
12+
lazy-object-proxy==1.6.0

dev-requirements-py3.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
-r ./dev-requirements.txt
2+
prospector[with_pyroma]

dev-requirements.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
1-
tox==2.9.1
1+
pytest
2+
pytest-cov
3+
mock
4+
decorator
5+
requests_mock
6+
rstcheck
7+
codecov

lint.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@ PY_VERSION=${1:-3}
77
FWDIR="$(cd "`dirname $0`"; pwd)"
88
cd "$FWDIR"
99

10+
tools="-t dodgy -t mccabe -t profile-validator -t pyflakes -t pylint"
1011
if [[ "$PY_VERSION" -eq 3 ]]; then
11-
prospector --profile "$FWDIR/prospector.yaml"
12+
prospector --profile "$FWDIR/prospector.yaml" $tools
1213
else
13-
prospector --profile "$FWDIR/prospector-2.yaml"
14+
prospector --profile "$FWDIR/prospector-2.yaml" $tools
1415
fi
1516

1617
rstcheck README.rst

prospector.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,14 @@ pylint:
2424
- consider-using-set-comprehension
2525
- useless-object-inheritance
2626
- unnecessary-pass
27+
- consider-using-f-string
28+
- super-with-arguments
29+
- unspecified-encoding
30+
- global-variable-not-assigned
31+
- useless-suppression
32+
- raise-missing-from
33+
- redundant-u-string-prefix
34+
- consider-using-from-import
2735

2836
mccabe:
2937
disable:

tox-requirements-2.txt

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)