Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
alexdlaird committed Oct 25, 2024
2 parents 8b83492 + ee7879f commit 00358c6
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[run]
omit =
devserver.py
.venv/**
venv/**
*/tests/**
*/lib/**

Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
.idea/
*.iml
*.zip
.venv
venv
.env
.env.dev
lib
Expand Down
24 changes: 12 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
.PHONY: all env virtualenv install nopyc clean test run-devserver
.PHONY: all env install nopyc clean test run-devserver

SHELL := /usr/bin/env bash
PYTHON_BIN ?= python
PROJECT_VENV ?= venv

all: env virtualenv install
all: test

env:
cp -n .env.example .env | true
cp -n .env.dev.example .env.dev | true

virtualenv:
@if [ ! -d ".venv" ]; then \
python3 -m pip install virtualenv --user; \
python3 -m virtualenv .venv; \
fi
venv:
python -m pip install virtualenv --user
python -m virtualenv $(PROJECT_VENV)

install: env virtualenv
install: env venv
@( \
source .venv/bin/activate; \
source $(PROJECT_VENV)/bin/activate; \
python -m pip install -r requirements.txt -t ./lib; \
python -m pip install -r requirements.txt -r requirements-dev.txt; \
)
Expand All @@ -26,16 +26,16 @@ nopyc:
find . -name __pycache__ | xargs rm -rf || true

clean: nopyc
rm -rf build .venv
rm -rf build $(PROJECT_VENV)

test: install
@( \
source .venv/bin/activate; \
source $(PROJECT_VENV)/bin/activate; \
coverage run -m unittest discover -v -b && coverage report && coverage xml && coverage html; \
)

run-devserver: install
@( \
source .venv/bin/activate; \
source $(PROJECT_VENV)/bin/activate; \
FLASK_SKIP_DOTENV=1 FLASK_ENV=development FLASK_APP=devserver.py flask run; \
)

0 comments on commit 00358c6

Please sign in to comment.