-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix the docker-compose.yml setup for localdev. * Make startup more robust, adding timeouts while the SQL database is not ready. * Add PyMardownlnt Markdown linter * Get faulthandler working early * Rework logging a bit
- Loading branch information
1 parent
9655848
commit 9f0ee79
Showing
13 changed files
with
264 additions
and
150 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 |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
*.pyc | ||
*.tmp | ||
.env* | ||
.gitkeep | ||
.venv* | ||
/*.iml | ||
/build | ||
|
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,18 @@ | ||
--- | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v5.0.0 | ||
hooks: | ||
- id: check-yaml | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- repo: https://github.com/psf/black | ||
rev: 24.10.0 | ||
hooks: | ||
- id: black | ||
- repo: https://github.com/jackdewinter/pymarkdown | ||
rev: v0.9.26 | ||
hooks: | ||
- id: pymarkdown | ||
args: | ||
- "-d MD013 scan ." |
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 |
---|---|---|
|
@@ -6,4 +6,3 @@ echo "*** isort ***" | |
isort freezing | ||
echo "*** djlint ***" | ||
djlint --reformat freezing/web/templates | ||
|
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 |
---|---|---|
|
@@ -9,4 +9,3 @@ flake8 freezing | |
echo "*** mypy ***" | ||
echo "*** djlint ***" | ||
djlint --check freezing/web/templates | ||
|
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 |
---|---|---|
|
@@ -8,19 +8,32 @@ BIND_INTERFACE=127.0.0.1 | |
|
||
DEBUG=true | ||
|
||
# By default this uses the localdev environment for local development, which enables | ||
# several features useful for developers, such as user impersonation. | ||
# See | ||
#ENVIRONMENT=localdev | ||
|
||
# The SECRET_KEY is used by Flask to sign sessions. Set this to something else. | ||
SECRET_KEY=e6c07402-0307-11e8-b087-000000000000 | ||
|
||
# The URL to the database. Note that the pymysql driver must be explicitly specified. | ||
# | ||
# It is important to use the utf8mb4 charset to get full support for Unicode characters, | ||
# including emoji. | ||
# | ||
# This URL is suitable for use with the database running in the freezing-compose setup in this repository. | ||
SQLALCHEMY_URL="mysql+pymysql://freezing:zeer0mfreezing-db-dev/freezing?charset=utf8mb4&binary_prefix=true" | ||
# Use this one if you are running this on your host vs. the database in the | ||
# https://github.com/freezingsaddles/freezing-compose project. | ||
# NOTE: If you are using a MySQL docker via freezing-compose use 127.0.0.1 as the host, NOT localhost | ||
#SQLALCHEMY_URL="mysql+pymysql://freezing:[email protected]/freezing?charset=utf8mb4&binary_prefix=true" | ||
# If you keep your MySQL database somewhere else, fix this up to match. | ||
#SQLALCHEMY_URL="mysql+pymysql://freezing:[email protected]/freezing?charset=utf8mb4&binary_prefix=true"" | ||
|
||
# Configuration for the Strava client. These settings come from your App setup. | ||
# Setting this is only required if you are testing parts of this application that exercise the Strava API, | ||
# such as user registration. That is an advanced topic and not required to make most changes to | ||
# the web site. Most of the action with the Strava API happens in freezing-sync, not here. | ||
STRAVA_CLIENT_ID=? | ||
STRAVA_CLIENT_SECRET=? | ||
|
||
|
@@ -32,7 +45,7 @@ TEAMS=1234,1235 | |
OBSERVER_TEAMS=5678,9013 | ||
|
||
# The competition title | ||
COMPETITION_TITLE='BikeArlington Freezing Saddles 2019' | ||
COMPETITION_TITLE='BikeArlington Freezing Saddles 2018 - localdev' | ||
|
||
# The start date of the competition -- WITH TIME ZONE | ||
START_DATE=2018-01-01T00:00:00-05:00 | ||
|
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import faulthandler | ||
import signal | ||
|
||
# Register this super early so we can get a stack trace if | ||
# there is a problem in initializing the config module | ||
faulthandler.register(signal.SIGUSR1) |
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
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 |
---|---|---|
|
@@ -4,3 +4,4 @@ djlint==1.36.3 | |
flake8==7.1.1 | ||
isort==5.13.2 | ||
pur==7.3.2 | ||
pymarkdownlnt==0.9.26 |