Prettify generated project requirements (#1557)

* Prettify base.txt

* Prettify local.txt

* Get rid of test.txt

Rationale: it effectively a duplicate of what's in local.txt

* Prettify production.txt
This commit is contained in:
Nikita Shupeyko 2018-03-09 12:57:32 +03:00 committed by GitHub
parent e1bce92ad9
commit b2a6b9a511
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 64 additions and 118 deletions

View File

@ -1,54 +1,31 @@
# Conservative Django pytz==2018.3 # https://github.com/stub42/pytz
django==2.0.3 # pyup: < 2.1 awesome-slugify==1.6.5 # https://github.com/dimka665/awesome-slugify
Pillow==5.0.0 # https://github.com/python-pillow/Pillow
# Configuration {%- if cookiecutter.use_compressor == "y" %}
django-environ==0.4.4 rcssmin==1.0.6{% if cookiecutter.windows == 'y' %} --install-option="--without-c-extensions"{% endif %} # https://github.com/ndparker/rcssmin
{% if cookiecutter.use_whitenoise == 'y' -%} {%- endif %}
whitenoise==3.3.1 argon2-cffi==18.1.0 # https://github.com/hynek/argon2_cffi
{%- if cookiecutter.use_whitenoise == 'y' %}
whitenoise==3.3.1 # https://github.com/evansd/whitenoise
{%- endif %}
{%- if cookiecutter.windows == 'y' %}
# TODO: On Windows, install psycopg2 manually from http://www.lfd.uci.edu/~gohlke/pythonlibs/#psycopg
{%- else %}
psycopg2==2.7.4 --no-binary psycopg2 # https://github.com/psycopg/psycopg2
{%- endif %}
redis>=2.10.5 # https://github.com/antirez/redis
{%- if cookiecutter.use_celery == "y" %}
celery==3.1.25 # pyup: <4.0 # https://github.com/celery/celery
{%- endif %} {%- endif %}
# Django
# Forms # ------------------------------------------------------------------------------
django-crispy-forms==1.7.1 django==2.0.3 # pyup: < 2.1 # https://www.djangoproject.com/
django-environ==0.4.4 # https://github.com/joke2k/django-environ
# Models django-model-utils==3.1.1 # https://github.com/jazzband/django-model-utils
django-model-utils==3.1.1 django-allauth==0.35.0 # https://github.com/pennersr/django-allauth
django-crispy-forms==1.7.1 # https://github.com/django-crispy-forms/django-crispy-forms
# Images {%- if cookiecutter.use_compressor == "y" %}
Pillow==5.0.0 django-compressor==2.2 # https://github.com/django-compressor/django-compressor
# Password storage
argon2-cffi==18.1.0
# For user registration, either via email or social
# Well-built with regular release cycles!
django-allauth==0.35.0
{% if cookiecutter.windows == 'y' -%}
# On Windows, you must download/install psycopg2 manually
# from http://www.lfd.uci.edu/~gohlke/pythonlibs/#psycopg
{% else %}
# Python-PostgreSQL Database Adapter
psycopg2==2.7.4 --no-binary psycopg2
{%- endif %} {%- endif %}
django-redis==4.9.0 # https://github.com/niwinz/django-redis
# Unicode slugification
awesome-slugify==1.6.5
# Time zones support
pytz==2018.3
# Redis support
django-redis==4.9.0
redis>=2.10.5
{% if cookiecutter.use_celery == "y" %}
celery==3.1.25 # pyup: <4.0
{% endif %}
{% if cookiecutter.use_compressor == "y" %}
rcssmin==1.0.6 {% if cookiecutter.windows == 'y' %}--install-option="--without-c-extensions"{% endif %}
django-compressor==2.2
{% endif %}
# Your custom requirements go here

View File

@ -1,19 +1,25 @@
# Local development dependencies go here -r ./base.txt
-r base.txt
coverage==4.5.1 Werkzeug==0.14.1 # https://github.com/pallets/werkzeug
django-coverage-plugin==1.5.0 ipdb==0.11 # https://github.com/gotcha/ipdb
Sphinx==1.7.1 # https://github.com/sphinx-doc/sphinx
Sphinx==1.7.1 # Testing
django-extensions==2.0.3 # ------------------------------------------------------------------------------
Werkzeug==0.14.1 pytest==3.4.2 # https://github.com/pytest-dev/pytest
django-test-plus==1.0.22 pytest-sugar==0.9.1 # https://github.com/Frozenball/pytest-sugar
factory-boy==2.10.0
django-debug-toolbar==1.9.1 # Code quality
# ------------------------------------------------------------------------------
flake8==3.5.0 # https://github.com/PyCQA/flake8
coverage==4.5.1 # https://github.com/nedbat/coveragepy
# improved REPL # Django
ipdb==0.11 # ------------------------------------------------------------------------------
factory-boy==2.10.0 # https://github.com/FactoryBoy/factory_boy
django-test-plus==1.0.22 # https://github.com/revsys/django-test-plus
pytest-django==3.1.2 django-debug-toolbar==1.9.1 # https://github.com/jazzband/django-debug-toolbar
pytest-sugar==0.9.1 django-extensions==2.0.3 # https://github.com/django-extensions/django-extensions
django-coverage-plugin==1.5.0 # https://github.com/nedbat/django_coverage_plugin
pytest-django==3.1.2 # https://github.com/pytest-dev/pytest-django

View File

@ -1,39 +1,21 @@
# Pro-tip: Try not to put anything here. Avoid dependencies in # PRECAUTION: avoid production dependencies that aren't in development
# production that aren't in development.
-r base.txt -r base.txt
{% if cookiecutter.windows == 'y' -%}
# Python-PostgreSQL Database Adapter
# Assuming Windows is used locally, and *nix -- in production.
# ------------------------------------------------------------
psycopg2==2.7.4 --no-binary psycopg2
{%- endif %}
# WSGI Handler
# ------------------------------------------------
gevent==1.2.2 gevent==1.2.2
gunicorn==19.7.1 gunicorn==19.7.1 # https://github.com/benoitc/gunicorn
boto3==1.6.2 # pyup: update minor # https://github.com/boto/boto3
# Static and Media Storage {%- if cookiecutter.use_whitenoise == 'n' %}
# ------------------------------------------------ Collectfast==0.6.0 # https://github.com/antonagestam/collectfast
boto3==1.6.2 # pyup: update minor {%- endif %}
django-storages==1.6.5 {%- if cookiecutter.use_sentry_for_error_reporting == "y" %}
{% if cookiecutter.use_whitenoise != 'y' -%} raven==6.6.0 # https://github.com/getsentry/raven-python
Collectfast==0.6.0 {%- endif %}
{%- if cookiecutter.use_opbeat == "y" %}
opbeat==3.6.1 # https://github.com/opbeat/opbeat_python
{%- endif %} {%- endif %}
# Email backends for Mailgun, Postmark, SendGrid and more # Django
# ------------------------------------------------------- # ------------------------------------------------------------------------------
django-anymail==2.0 django-storages==1.6.5 # https://github.com/jschneier/django-storages
django-anymail==2.0 # https://github.com/anymail/django-anymail
{% if cookiecutter.use_sentry_for_error_reporting == "y" -%}
# Raven is the Sentry client
# --------------------------
raven==6.6.0
{%- endif %}
{% if cookiecutter.use_opbeat == "y" -%}
# Opbeat agent for performance monitoring
# -----------------------------------------
opbeat==3.6.1
{%- endif %}

View File

@ -1,18 +0,0 @@
# Test dependencies go here.
-r base.txt
{% if cookiecutter.windows == 'y' -%}
# Python-PostgreSQL Database Adapter
# If using Win for dev, this assumes Unix in test/prod
psycopg2==2.7.4
{%- endif %}
coverage==4.5.1
flake8==3.5.0 # pyup: != 2.6.0
django-test-plus==1.0.22
factory-boy==2.10.0
django-coverage-plugin==1.5.0
# pytest
pytest-django==3.1.2
pytest-sugar==0.9.1

View File

@ -35,7 +35,6 @@ if [ -z "$VIRTUAL_ENV" ]; then
else else
pip install -r $PROJECT_DIR/requirements/local.txt pip install -r $PROJECT_DIR/requirements/local.txt
pip install -r $PROJECT_DIR/requirements/test.txt
{% if cookiecutter.use_heroku == "y" -%} {% if cookiecutter.use_heroku == "y" -%}
pip install -r $PROJECT_DIR/requirements.txt pip install -r $PROJECT_DIR/requirements.txt
{%- endif %} {%- endif %}