Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/pre-commit hook and dependency management integration #13

Closed
wants to merge 2 commits into from
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
23 changes: 23 additions & 0 deletions backend/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
repos:

# Versioning: Commit messages & changelog
- repo: https://github.com/commitizen-tools/commitizen
rev: v3.27.0
hooks:
- id: commitizen
stages: [commit-msg]

# Lint / autoformat: Python code
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.4.8"
hooks:
- id: ruff
- id: ruff-format

# Trailing whitespace
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
56 changes: 56 additions & 0 deletions backend/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
[project]
name = "fAIr"
version = "1.0.1"
description = "AI Assisted Mapping"
authors = [
{name = "HOTOSM", email = "[email protected]"},
]
dependencies = [
"django==4.1.4",
"psycopg2",
"djangorestframework==3.14.0",
"djangorestframework-gis==1.0",
"dj-database-url==1.2.0",
"django-leaflet==0.28.3",
"drf-yasg==1.21.4",
"django-environ==0.9.0",
"django-filter==22.1",
"django-cors-headers==3.13.0",
"osm-login-python==0.0.2",
"celery==5.2.7",
"redis==4.4.0",
"django-celery-results==2.4.0",
"flower==1.2.0",
"validators==0.20.0",
"gpxpy==1.5.0",
"geojson2osm==0.0.1",
"osmconflator==0.0.9",
"orthogonalizer==0.0.4",
"fairpredictor==0.0.26",
"tflite-runtime==2.14.0",
"hot-fair-utilities==1.2.3",
]
requires-python = ">=3.10"
readme = "README.md"
license = {text = "AGPL-3.0 license"}

[build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend"


[tool.pdm]
distribution = true

[tool.pdm.dev-dependencies]
dev = [
"commitizen>=3.27.0",
"ruff>=0.4.9",
]

[tool.commitizen]
name = "cz_conventional_commits"
tag_format = "\"v$version\""
version_scheme = "semver2"
version = "1.0.1"
update_changelog_on_bump = true