Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Pre-commit Hooks

on:
pull_request: {}

jobs:
pre-commit:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pre-commit

- name: Run pre-commit
run: pre-commit run --all-files
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
repos:
- repo: https://github.com/pre-commit/mirrors-pylint
rev: v3.0.0a5
hooks:
- id: pylint
language: system
5 changes: 5 additions & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[MAIN]
errors-only=true

# disable not callable (https://github.com/pylint-dev/pylint/issues/8138)
disable=E1102
1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: gunicorn run:app
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ flask run
This will start the development server with debug mode enabled and auto-reload on code changes.

### Production use
The recommended way is running with gunicorn (uncomment `gunicorn` in `requirements.txt`):
The recommended way is running with gunicorn

```
gunicorn run:app
Expand Down
6 changes: 4 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
Flask ~= 3.0
Flask-SQLAlchemy ~= 3.1
folium ~= 0.17
# gunicorn ~= 23.0
gunicorn ~= 23.0
ipaddress ~= 1.0
pre-commit ~= 3.8
psycopg2-binary ~= 2.9
requests ~= 2.32
pylint ~= 3.3
requests ~= 2.32