forked from mirrors/bookwyrm
Add pylint to bw-dev
Because pylint requires the app to be fully parseable with all its dependencies, we run it in the web container, and add pylint as a dev dependency.
This commit is contained in:
parent
6d6ab9a531
commit
b3603c04c5
4 changed files with 17 additions and 9 deletions
|
@ -6,6 +6,10 @@ RUN mkdir /app /app/static /app/images
|
|||
|
||||
WORKDIR /app
|
||||
|
||||
RUN apt-get update && apt-get install -y gettext libgettextpo-dev tidy && apt-get clean
|
||||
|
||||
COPY requirements.txt /app/
|
||||
RUN pip install -r requirements.txt --no-cache-dir
|
||||
RUN apt-get update && apt-get install -y gettext libgettextpo-dev tidy && apt-get clean
|
||||
|
||||
COPY requirements.dev.txt /app/
|
||||
RUN pip install -r requirements.dev.txt --no-cache-dir
|
||||
|
|
5
bw-dev
5
bw-dev
|
@ -140,6 +140,10 @@ case "$CMD" in
|
|||
black)
|
||||
docker-compose run --rm dev-tools black celerywyrm bookwyrm
|
||||
;;
|
||||
pylint)
|
||||
# pylint depends on having the app dependencies in place, so we run it in the web container
|
||||
runweb pylint bookwyrm/
|
||||
;;
|
||||
prettier)
|
||||
docker-compose run --rm dev-tools npx prettier --write bookwyrm/static/js/*.js
|
||||
;;
|
||||
|
@ -149,6 +153,7 @@ case "$CMD" in
|
|||
--config dev-tools/.stylelintrc.js
|
||||
;;
|
||||
formatters)
|
||||
runweb pylint bookwyrm/
|
||||
docker-compose run --rm dev-tools black celerywyrm bookwyrm
|
||||
docker-compose run --rm dev-tools npx prettier --write bookwyrm/static/js/*.js
|
||||
docker-compose run --rm dev-tools npx stylelint \
|
||||
|
|
7
requirements.dev.txt
Normal file
7
requirements.dev.txt
Normal file
|
@ -0,0 +1,7 @@
|
|||
pytest-django==4.1.0
|
||||
pytest==6.1.2
|
||||
pytest-cov==2.10.1
|
||||
pytest-env==0.6.2
|
||||
pytest-xdist==2.3.0
|
||||
pytidylib==0.3.2
|
||||
pylint==2.14.0
|
|
@ -26,11 +26,3 @@ opentelemetry-sdk==1.8.0
|
|||
opentelemetry-exporter-otlp-proto-grpc==1.8.0
|
||||
opentelemetry-instrumentation-django==0.27b0
|
||||
opentelemetry-instrumentation-celery==0.27b0
|
||||
|
||||
# Dev
|
||||
pytest-django==4.1.0
|
||||
pytest==6.1.2
|
||||
pytest-cov==2.10.1
|
||||
pytest-env==0.6.2
|
||||
pytest-xdist==2.3.0
|
||||
pytidylib==0.3.2
|
||||
|
|
Loading…
Reference in a new issue