Skip to content
Draft
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
22 changes: 22 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- id: check-case-conflict
- id: check-merge-conflict

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.9
hooks:
- id: ruff
name: ruff linter
args: [
--fix,
--show-fixes,
]
- id: ruff-format
name: ruff formatter
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ sorl-thumbnail = "12.10.0"
tabulate = "0.9.0"
uwsgi = "2.0.24"
Pillow = "10.3.0"

pre-commit = "3.7.1"

[tool.poetry.group.dev.dependencies]
cssselect = "1.2.0"
Expand Down
82 changes: 82 additions & 0 deletions src/pycontw2016/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
[tool.poetry]
name = "pycontw-backend"
version = "0.1.0"
description = "The API backend and proposal system of PyCon TW website."
authors = ["PyCon TW Web Team <[email protected]>"]
readme = "README.md"
package-mode = false

[tool.poetry.dependencies]
python = "~3.10.0"

Django = "3.2.25"
crispy-bootstrap3 = "2024.1"
dj-registry = "0.2.2"
django-cors-headers = "4.3.1"
django-compressor = "4.4"
django-compressor-toolkit = "0.6.0"
django-crispy-forms = "2.0"
django-environ = "0.11.2"
django-extensions = "3.2.3"
django-import-export = "3.3.8"
django-modeltranslation = "0.18.11"
django-storages = "1.14.2"
djangorestframework = "3.15.1"
google-cloud-storage = "1.44.0"
ipython = "8.23.0"
lxml = "4.9.4"
psycopg2 = "2.9.9"
pytz = "2024.1"
requests = "2.32.0"
sorl-thumbnail = "12.10.0"
tabulate = "0.9.0"
uwsgi = "2.0.24"
Pillow = "10.3.0"
pre-commit = "3.7.1"

[tool.poetry.group.dev.dependencies]
cssselect = "1.2.0"
django-debug-toolbar = "4.3.0"
pytest = "8.1.1"
pytest-cov = "5.0.0"
pytest-django = "4.8.0"
pytest-mock = "3.14.0"
pytest-xdist = "3.5.0"
ruff = "0.3.5"
Werkzeug = "3.0.3"


[tool.ruff]
exclude = [".git", "__pycache__", "migrations"]
line-length = 120

[tool.ruff.lint]
ignore = ["E251"]
select = [
"E", # pycodestyle error
"W", # pycodestyle warning
"F", # Pyflakes
"I001", # isort
"N", # pep8-naming
"B", # bugbear
"UP", # pyupgrade
]

[tool.ruff.lint.isort]
known-first-party = [
"attendee",
"ccip",
"core",
"events",
"postgres",
"proposals",
"pycontw2016",
"reviews",
"sponsors",
"users",
]


[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"