Skip to content

Commit

Permalink
Remove the requirements/requirements_common dictinction
Browse files Browse the repository at this point in the history
Given there are so few Heroku-only dependencies its not worth maintain separate files.
  • Loading branch information
philipbelesky committed Aug 13, 2018
1 parent 9112218 commit 94ba568
Show file tree
Hide file tree
Showing 9 changed files with 57 additions and 59 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ install:
- python --version
- pip --version
- pip install --upgrade pip
- pip install -r requirements_common.txt
- pip install -r requirements.txt
- pip install -r requirements_development.txt # Needed for flake8
- node --version
- npm --version
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ ADD . /tcd/
RUN git config --global url."https://".insteadOf git://

# Install our node/python requirements
RUN pip install -r ./requirements_common.txt
RUN pip install -r ./requirements.txt
RUN npm install

# Compile all the static files
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ install:
- python --version
- cd c:\projects\tabbycat
- python -m pip install -U pip
- pip install -r requirements_common.txt
- pip install -r requirements.txt
- pip install pypiwin32 # Extra dependency for channels/twisted on Windows
- npm install
- npm -g install gulp-cli # Needs to be available to then use 'gulp' command later
Expand Down
4 changes: 2 additions & 2 deletions docs/install/linux.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Then create local_settings.py as described :ref:`below <local-settings-linux>`,
python3 -m venv venv
source venv/bin/activate
pip install --upgrade pip
pip install -r requirements_common.txt
pip install -r requirements.txt
npm install
cd tabbycat
dj migrate
Expand Down Expand Up @@ -178,7 +178,7 @@ c. Run the ``activate`` script. This puts you "into" the virtual environment::
d. Install Tabbycat's requirements into your virtual environment::

$ pip install --upgrade pip
$ pip install -r requirements_common.txt
$ pip install -r requirements.txt
$ npm install

e. Navigate to the **tabbycat** sub folder and copy **local_settings.example** to **local_settings.py**. Find this part in your new local_settings.py, and fill in the blanks as indicated:
Expand Down
2 changes: 1 addition & 1 deletion docs/install/osx.rst
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ d. Run the ``activate`` script. This puts you "into" the virtual environment::
e. Install Tabbycat's requirements into your virtual environment::

$ pip install --upgrade pip
$ pip install -r requirements_common.txt
$ pip install -r requirements.txt
$ npm install

f. Navigate to the **tabbycat** sub folder, initialize the database, compile the assets, and create a user account for yourself::
Expand Down
6 changes: 3 additions & 3 deletions docs/install/windows.rst
Original file line number Diff line number Diff line change
Expand Up @@ -191,21 +191,21 @@ e. Install Tabbycat's requirements.

> python -m pip install --upgrade pip
> easy_install http://www.stickpeople.com/projects/python/win-psycopg/2.6.1/psycopg2-2.6.1.win32-py3.5.exe
> pip install -r requirements_common.txt
> pip install -r requirements.txt
> npm install

If you installed **64-bit Python**::

> python -m pip install --upgrade pip
> easy_install http://www.stickpeople.com/projects/python/win-psycopg/2.6.1/psycopg2-2.6.1.win-amd64-py3.5.exe
> pip install -r requirements_common.txt
> pip install -r requirements.txt
> npm install

If you're using a version of **Python other than 3.5**, replace the URL in the
second line with the appropriate link from the
`win-psycopg page <http://www.stickpeople.com/projects/python/win-psycopg/>`_.

.. note:: The second line above is an extra step just for Windows. It installs the Windows version of ``psycopg2``, `win-psycopg <http://www.stickpeople.com/projects/python/win-psycopg/>`_, and must be done before ``pip install -r requirements_common.txt`` so that the latter doesn't try to install the Unix version.
.. note:: The second line above is an extra step just for Windows. It installs the Windows version of ``psycopg2``, `win-psycopg <http://www.stickpeople.com/projects/python/win-psycopg/>`_, and must be done before ``pip install -r requirements.txt`` so that the latter doesn't try to install the Unix version.

.. hint:: You might be wondering: I thought I already installed the requirements. Why am I installing more? And the answer is: Before, you were installing the requirements to create a Python virtual environment for Tabbycat to live in. Now, you're *in* the virtual environment, and you're installing everything required for *Tabbycat* to operate.

Expand Down
44 changes: 36 additions & 8 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,41 @@
# The necessary dependencies for just heroku installs
# The necessary dependencies to run Tabbycat
# Some dependencies are technically Heroku-only but useful to replicate environment

# Importing the base requirements
-r requirements_common.txt
# Mental note (cmd to check for updates): pip list --outdated --format=columns
# Mental note (npm equivalent command): npm outdated

# Run multiple processes in a Procfile
honcho==1.0.1
# Core
Django==2.0.8 # pyup: >=2.0,<2.1
django-appconf==1.0.2 # Helper for handling app configs
django-dynamic-preferences==1.6 # Settings management
django-extensions==2.1.0 # For the generate secret command
django-formtools==2.1 # Form wizards
django-ipware==2.1.0 # IP Address logging
django-jet==1.0.7 # Admin Backend
django-gfklookupwidget==1.0.6 # Replaces object_id field with a search link
django-statici18n==1.8.2 # Compile translations files as static file
django-summernote==0.8.8.7 # WYSIWYG editor
munkres==1.0.12 # Algorithm for adjudicator allocation
dj-cmd==1.0 # Provides the dj command alias
raven==6.9.0 # Client for Sentry error tracking

# Base Heroku Requirements
dj-database-url==0.5.0 # From the heroku toolbelt
# Database
psycopg2==2.7.5 # For Django to talk to postgres
sqlparse==0.2.4 # Parsing SQL statements
dj-database-url==0.5.0 # To obtain the Heroku service's database URL

# Serving
honcho==1.0.1 # Allows a Procfile to run multiple processes
waitress==1.1.0 # Primary server for wsgi

# Cache
django_redis==4.9.0 # Use redis for cache (on heroku; local optional)

# Channels
channels==2.1.2 # Channels; also includes the Daphne server
channels_redis==2.2.1 # Channels Layer

# Misc
sendgrid==5.4.1 # Emailing
sendgrid==5.4.1 # Email service of choice on Heroku
scout-apm==1.2.2 # Performance monitoring
ipython==6.3.1
38 changes: 0 additions & 38 deletions requirements_common.txt

This file was deleted.

16 changes: 12 additions & 4 deletions requirements_development.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
# Importing the base requirements
# Development Dependencies

# Importing the base requirements (for convenience)
-r requirements.txt

# Development Dependencies
six==1.11.* # Python 2/3 compatibility library
flake8==3.5.* # For testing/linting
# Linting
flake8==3.5.*
flake8-import-order==0.17 # Flake plugin for import order
flake8-quotes==1.0.* # Flake plugin for quotes
pep8-naming==0.7.* # Flake plugin for naming conventions

# Tests
selenium==3.13.* # Functional testing (in here for CI tests)
chromedriver_installer==0.0.6 # Functional testing Chrome interface

# Translation
transifex-client==0.13.* # Translations

# Debug
django-debug-toolbar==1.9.1
django-debug-toolbar-request-history==0.0.7 # Debug POSTs/AJAX

# Documentation Dependencies
Expand Down

0 comments on commit 94ba568

Please sign in to comment.