-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8f27839
commit 0a4b2ae
Showing
14 changed files
with
81 additions
and
143 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# App configuration | ||
DEBUG=true | ||
# EXTRA_CONTENT_DIRS="drafts/" | ||
|
||
# Heroku CLI | ||
PYTHONUNBUFFERED=true | ||
PORT=8000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
venv = venv | ||
bin = ${venv}/bin/ | ||
python = ${bin}python | ||
pip = ${bin}pip | ||
pysources = server/ tests/ | ||
|
||
build: | ||
NODE_ENV=production yarn build | ||
|
||
check: | ||
${bin}black --check --diff ${pysources} | ||
${bin}flake8 ${pysources} | ||
${bin}mypy ${pysources} | ||
${bin}isort --check --diff ${pysources} | ||
${python} -m server.tools.mdformat --check | ||
|
||
deploy: | ||
scripts/deploy $(args) | ||
|
||
${venv}: | ||
python3 -m venv ${venv} | ||
|
||
install: | ||
make ${venv} | ||
${pip} install -U pip wheel | ||
${pip} install -r requirements-dev.txt | ||
make messagesc | ||
test ${CI} && yarn install || echo skip | ||
make .env | ||
|
||
.env: | ||
cp .env.example .env | ||
|
||
lint: | ||
${bin}autoflake --in-place --recursive ${pysources} | ||
${bin}isort ${pysources} | ||
${bin}black ${pysources} | ||
${python} -m server.tools.mdformat | ||
|
||
messages: | ||
make locale/.init | ||
${bin}pybabel extract -F babel.cfg -o locale/base.pot ./server/ | ||
${bin}pybabel update -i locale/base.pot -d locale | ||
|
||
locale/.init: | ||
${bin}pybabel init -l fr_FR -i locale/base.pot -d locale | ||
touch locale/.init | ||
|
||
messagesc: | ||
${bin}pybabel compile --domain messages -d locale | ||
|
||
watch: | ||
NODE_ENV=production yarn watch | ||
|
||
serve: | ||
${bin}uvicorn server:app $(args) | ||
|
||
test: | ||
${bin}pytest $(args) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"scripts": { | ||
"dokku": { | ||
"predeploy": "scripts/compilemessages" | ||
"predeploy": "make messagesc" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.