|
1 |
| -# Example configuration for Black. |
2 |
| - |
3 |
| -# see https://raw.githubusercontent.com/ambv/black/master/pyproject.toml |
4 |
| - |
5 |
| -[tool.black] |
6 |
| -line-length = 88 |
7 |
| -include = '\.pyi?$' |
8 |
| -exclude = ''' |
9 |
| -/( |
10 |
| - \.git |
11 |
| - | \.hg |
12 |
| - | \.mypy_cache |
13 |
| - | \.tox |
14 |
| - | \.venv |
15 |
| - | \.ve |
16 |
| - | _build |
17 |
| - | buck-out |
18 |
| - | build |
19 |
| - | dist |
20 |
| - | migrations |
21 |
| - | env |
22 |
| - | ve |
23 |
| -)/ |
24 |
| -''' |
| 1 | +[project] |
| 2 | +name = "rp-sidekick" |
| 3 | +version = "1.13.2" |
| 4 | +description = "" |
| 5 | +authors = [ |
| 6 | + { name = "Praekelt Foundation", email = "[email protected]"}, |
| 7 | +] |
| 8 | +license = {text = "BSD"} |
| 9 | +readme = "README.rst" |
| 10 | +requires-python = "<4.0,>=3.10" |
| 11 | +dependencies = [ |
| 12 | + "celery<6.0.0,>=5.2.3", |
| 13 | + "django<5.0.0,>=4.2.15", |
| 14 | + "django-environ<1.0.0,>=0.4.5", |
| 15 | + "django-extensions<4.0.0,>=3.1.5", |
| 16 | + "django-phonenumber-field<4.0.0,>=3.0.1", |
| 17 | + "django-prometheus<3.0.0,>=2.2.0", |
| 18 | + "djangorestframework<4.0.0,>=3.15.2", |
| 19 | + "json2html<2.0.0,>=1.3.0", |
| 20 | + "phonenumbers<9.0.0,>=8.13.45", |
| 21 | + "psycopg2-binary<3.0.0,>=2.9.9", |
| 22 | + "rapidpro-python==2.6.1", |
| 23 | + "redis<5.0.0,>=4.5.4", |
| 24 | + "whitenoise<5.0.0,>=4.1.4", |
| 25 | + "raven<7.0.0,>=6.10.0", |
| 26 | + "hashids<2.0.0,>=1.3.1", |
| 27 | + "django-filter<3.0.0,>=2.4.0", |
| 28 | + "sentry-sdk<3.0.0,>=2.8.0", |
| 29 | + "dj-database-url<1.0.0,>=0.5.0", |
| 30 | + "jsonschema<5.0.0,>=4.21.1", |
| 31 | + "boto3<2.0.0,>=1.35.35", |
| 32 | +] |
| 33 | + |
| 34 | +[project.urls] |
| 35 | +repository = "http://github.com/praekeltfoundation/rp-sidekick" |
| 36 | + |
| 37 | +[build-system] |
| 38 | +requires = ["hatchling"] |
| 39 | +build-backend = "hatchling.build" |
| 40 | + |
| 41 | +[tool.hatch.build.targets.wheel] |
| 42 | +packages = [ |
| 43 | + "config", |
| 44 | + "msisdn_utils", |
| 45 | + "randomisation", |
| 46 | + "rp_dtone", |
| 47 | + "rp_interceptors", |
| 48 | + "rp_transferto", |
| 49 | + "rp_yal", |
| 50 | + "sidekick", |
| 51 | +] |
| 52 | + |
| 53 | +[dependency-groups] |
| 54 | +dev = [ |
| 55 | + "ruff<1.0.0,>=0.6.9", |
| 56 | + "pytest-django<5.0.0,>=4.9.0", |
| 57 | + "pytest-cov<6.0.0,>=5.0.0", |
| 58 | + "responses<1.0.0,>=0.25.3", |
| 59 | + "freezegun<2.0.0,>=1.5.1", |
| 60 | + "recommonmark<1.0.0,>=0.7.1", |
| 61 | + "sphinx<8.0.0", |
| 62 | + "sphinx-rtd-theme<4.0.0,>=3.0.0", |
| 63 | + "moto<6.0.0,>=5.0.16", |
| 64 | +] |
| 65 | + |
| 66 | +[tool.ruff] |
| 67 | +extend-exclude = [ |
| 68 | + "*/migrations/*.py", |
| 69 | + "docs/conf.py", |
| 70 | +] |
| 71 | + |
| 72 | +[tool.ruff.lint] |
| 73 | +select = [ |
| 74 | + "E", "F", "W", # pycodestyle + pyflakes == flake8 - mccabe |
| 75 | + "I", # isort |
| 76 | + "UP", # pyupgrade |
| 77 | + "S", # flake8-bandit |
| 78 | + "B", # flake8-bugbear |
| 79 | + "C4", # flake8-comprehensions |
| 80 | + # "DJ", # flake8-django |
| 81 | + "PIE", # flake8-pie |
| 82 | + # "PT", # flake8-pytest-style |
| 83 | + "SIM", # flake8-simplify |
| 84 | + "PTH", # flake8-use-pathlib |
| 85 | + "RUF", # ruff-specific rules |
| 86 | +] |
| 87 | + |
| 88 | +ignore = [ |
| 89 | + "E501", # TODO: Something about these long lines. |
| 90 | + "S113", # TODO: Add request timeouts. |
| 91 | + "PTH118", # TODO: Switch to pathlib |
| 92 | + "RUF012", # We usually want immutable instance attributes |
| 93 | +] |
| 94 | + |
| 95 | +[tool.ruff.lint.per-file-ignores] |
| 96 | +"**/tests/**" = [ |
| 97 | + "S101", # It's okay to use `assert` in tests. |
| 98 | +] |
| 99 | + |
| 100 | +# TODO: Move this somewhere sensible? |
| 101 | +"**/tests.py" = [ |
| 102 | + "S101", # It's okay to use `assert` in tests. |
| 103 | +] |
| 104 | + |
| 105 | +"**/config/settings/{test,dev}.py" = [ |
| 106 | + "S104", # It's okay to bind to all interfaces in tests |
| 107 | + "F405", # Its okay to import * in settings |
| 108 | + "S105", # Its okay to have hardcoded secrets in test config |
| 109 | +] |
0 commit comments