Merge pull request #15 from dod-ccpo/virtual-env-fixup
Virtual env fixup
This commit is contained in:
commit
552022af97
3
.gitignore
vendored
3
.gitignore
vendored
@ -6,3 +6,6 @@ scss/assets
|
||||
.pytest_cache/
|
||||
.venv/
|
||||
__pycache__
|
||||
|
||||
# Ignore static/fonts for now, since it is just symlink
|
||||
static/fonts
|
||||
|
@ -7,11 +7,17 @@
|
||||
|
||||
./script/setup
|
||||
|
||||
The setup script will create a new Python virtual environment for the application to use. All of the scripts will activate this virutal envirnment automatically, but you can also manually activate it like this:
|
||||
|
||||
source .venv/bin/activate
|
||||
|
||||
If you want to automatically load the virtual environment whenever you enter the project directory, take a look at [direnv](https://direnv.net/)
|
||||
|
||||
## Running (development)
|
||||
|
||||
To start the app and watch for changes:
|
||||
|
||||
DEBUG=1 ./app.py
|
||||
DEBUG=1 ./script/server
|
||||
|
||||
## Testing
|
||||
|
||||
|
@ -4,7 +4,10 @@
|
||||
set -e
|
||||
|
||||
# Ensure we are in the app root directory (not the /script directory)
|
||||
cd "$(dirname "$0")/.."
|
||||
cd "$(dirname "${0}")/.."
|
||||
|
||||
# Activate virtual environment
|
||||
source .venv/bin/activate
|
||||
|
||||
# Install Python dependencies
|
||||
pip install -r requirements.txt
|
||||
|
@ -4,7 +4,10 @@
|
||||
set -e
|
||||
|
||||
# Ensure we are in the app root directory (not the /script directory)
|
||||
cd "$(dirname "$0")/.."
|
||||
cd "$(dirname "${0}")/.."
|
||||
|
||||
# Activate virtual environment
|
||||
source .venv/bin/activate
|
||||
|
||||
# Launch the app
|
||||
python3 app.py
|
||||
python3 app.py ${@}
|
||||
|
@ -4,7 +4,7 @@
|
||||
set -e
|
||||
|
||||
# Ensure we are in the app root directory (not the /script directory)
|
||||
cd "$(dirname "$0")/.."
|
||||
cd "$(dirname "${0}")/.."
|
||||
|
||||
# Install virtualenv
|
||||
pip install virtualenv
|
||||
|
@ -4,7 +4,10 @@
|
||||
set -e
|
||||
|
||||
# Ensure we are in the app root directory (not the /script directory)
|
||||
cd "$(dirname "$0")/.."
|
||||
cd "$(dirname "${0}")/.."
|
||||
|
||||
# Activate virtual environment
|
||||
source .venv/bin/activate
|
||||
|
||||
# Run unit tests
|
||||
python3 -m pytest
|
||||
|
@ -4,7 +4,10 @@
|
||||
set -e
|
||||
|
||||
# Ensure we are in the app root directory (not the /script directory)
|
||||
cd "$(dirname "$0")/.."
|
||||
cd "$(dirname "${0}")/.."
|
||||
|
||||
# Activate virtual environment
|
||||
source .venv/bin/activate
|
||||
|
||||
# Update dependencies
|
||||
script/bootstrap
|
||||
|
Loading…
x
Reference in New Issue
Block a user