updated Dockerfile so tests would pass and image would build#167
updated Dockerfile so tests would pass and image would build#167jeffreybreen wants to merge 5 commits intodatabricks:mainfrom
Conversation
…for pylint-django & pyflakes; still get warning about prospector requiring higher version of pylint, but all tests pass
…so tests will pass; added --no-cache-dir flag to all pip installs
Codecov Report
@@ Coverage Diff @@
## master #167 +/- ##
=======================================
Coverage 83.38% 83.38%
=======================================
Files 30 30
Lines 1938 1938
=======================================
Hits 1616 1616
Misses 322 322
Continue to review full report at Codecov.
|
| COPY . . | ||
|
|
||
| RUN pip install --upgrade pip && \ | ||
| pip install -r dev-requirements.txt && \ |
There was a problem hiding this comment.
Is a minimal fix here just to also install tox-requirements?
There was a problem hiding this comment.
That is certainly the heart of the change -- and almost enough to fix the issue,
You also need to bump the versions on some of the packages in tox-requirements.txt or it will fail due to pytest-django and pyflakes dependencies. Also, you need to add the tabulate and click packages to dev-requirements.txt.
My other edits to Dockerfile were an attempt to minimize the resulting image size, but I didn't get a dramatic savings.
There was a problem hiding this comment.
Gotcha. I'm a bit concerned about changing the dev-requirements.txt and tox-requirements.txt to make this docker container build work.
I think a minimal fix is to intall tox-requirements.txt and to move up pip install . above the ./lint.sh
Also it may be useful to add a .dockerignore file containing
**/__pycache__
**/*.pyc
so we don't run into https://stackoverflow.com/questions/44067609/getting-error-importmismatcherror-while-running-py-test
There was a problem hiding this comment.
with @andrewmchen proposals (add tox-requirements to pip install and moving ./lint.sh) works without problem.
thanks
|
Any idea when this will be merged? |
|
@hagridaaron, as it is, this PR isn't ready to merge (merge conflicts and changes to |
|
On this fork I get: |
To follow up on Issue 166, the current Dockerfile fails to build as the tests do not pass.
I have made the following changes and it now builds (and runs the CLI) successfully:
tox-requirements.txtare required for the tests to run (and pass), so the Dockerfile now installs thempytest-djangoandpyflakesclickandtabulatepackages seem to be required by the main codebase, so I added them todev-requirements.txtso they are installed (and stick around)setup.pyTo save space in the image:
pip installcommands now have the--no-cache-diroptiontox-requirements.txtare now removed after the tests have been run