Skip to content

rsyring/pypicalc2

Repository files navigation

PyPI Calc 2

image

image

Created as a companion application for Testing Application Boundaries presentation at Code PaLOUsa 2016.

Environment Assumptions

  • Python 3.4.x
  • You have a PostgreSQL server available, preferably with user/password/db setup according to bookorders.conf:TestProfile
  • You have a recent version of Tox installed at the system or user level.

Running Tests

  • Make sure your DB settings match what is in config.py:TestProfile OR see next section.
  • Run tox in the source directory.

Local Configuration Changes

In order to set configuration for your local environment, create <project root>/bookorders-config.py as below, changing db creds as needed:

DEFAULT_PROFILE = 'DevProfile'


class DevProfile(object):
    # secret key for Flask (fill it in with something random)
    SECRET_KEY = ''

    KEG_KEYRING_ENABLE = False

    SQLALCHEMY_DATABASE_URI = 'postgresql://pypicalc2:pypicalc2@localhost/pypicalc2'


class TestProfile(object):
    SQLALCHEMY_DATABASE_URI = 'postgresql://test:test@localhost/test'

Python 3 Gotchas

Since this is a Python 3 project, take note of the following:

  • The wheelhouse uses the "pip" executable. You will likely have to be in a virtualenv for this to work since "pip" will usually point to the python 2 system version of pip.

Virtualenv Setup

This project uses a wheelhouse. Therefore, you should consider virtualenvs temporary. In order to easily get a virtualenv setup when you are ready to work on the project, run:

source scripts/make-env-vex.sh

About

Created as a companion application for Testing Application Boundaries presentation at Code PaLOUsa 2016.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published