2022-05-13 09:44:23 +00:00
|
|
|
|
[build-system]
|
2024-08-30 11:09:24 +00:00
|
|
|
|
requires = ["poetry-core>=1.0.0", "babel", "setuptools; python_version>='3.12'"]
|
|
|
|
|
build-backend = "poetry.core.masonry.api"
|
2022-05-13 09:44:23 +00:00
|
|
|
|
|
|
|
|
|
[tool]
|
|
|
|
|
[tool.poetry]
|
|
|
|
|
name = "Canaille"
|
2024-08-30 11:29:51 +00:00
|
|
|
|
version = "0.0.55"
|
2024-04-22 07:47:56 +00:00
|
|
|
|
description = "Lightweight identity and authorization management software"
|
2022-05-13 09:44:23 +00:00
|
|
|
|
license = "MIT"
|
|
|
|
|
keywords = ["oidc", "oauth", "oauth2", "openid", "identity"]
|
|
|
|
|
classifiers = [
|
|
|
|
|
"Intended Audience :: Developers",
|
2023-08-16 14:18:06 +00:00
|
|
|
|
"Development Status :: 3 - Alpha",
|
2022-05-13 09:44:23 +00:00
|
|
|
|
"Programming Language :: Python :: 3.10",
|
2022-11-01 10:49:26 +00:00
|
|
|
|
"Programming Language :: Python :: 3.11",
|
2023-11-01 19:22:26 +00:00
|
|
|
|
"Programming Language :: Python :: 3.12",
|
2024-10-27 10:21:42 +00:00
|
|
|
|
"Programming Language :: Python :: 3.13",
|
2022-05-13 09:44:23 +00:00
|
|
|
|
"Programming Language :: Python :: Implementation :: CPython",
|
|
|
|
|
"License :: OSI Approved :: MIT License",
|
|
|
|
|
"Environment :: Web Environment",
|
|
|
|
|
"Programming Language :: Python",
|
|
|
|
|
"Operating System :: OS Independent",
|
|
|
|
|
"Topic :: System :: Systems Administration :: Authentication/Directory",
|
|
|
|
|
"Topic :: System :: Systems Administration :: Authentication/Directory :: LDAP",
|
|
|
|
|
|
|
|
|
|
]
|
2023-08-16 15:14:11 +00:00
|
|
|
|
authors = ["Yaal Coop <contact@yaal.coop>"]
|
2022-05-13 09:44:23 +00:00
|
|
|
|
maintainers = [
|
|
|
|
|
"Éloi Rivard <eloi@yaal.coop>",
|
|
|
|
|
]
|
2022-06-21 12:30:31 +00:00
|
|
|
|
homepage = "https://canaille.yaal.coop"
|
2022-05-13 09:44:23 +00:00
|
|
|
|
documentation = "https://canaille.readthedocs.io/en/latest/"
|
|
|
|
|
repository = "https://gitlab.com/yaal/canaille"
|
|
|
|
|
readme = "README.md"
|
2022-11-25 20:39:22 +00:00
|
|
|
|
include = ["canaille/translations/*/LC_MESSAGES/*.mo"]
|
2022-05-13 09:44:23 +00:00
|
|
|
|
|
|
|
|
|
[tool.poetry.dependencies]
|
2024-10-28 21:17:47 +00:00
|
|
|
|
python = "<3.13,>=3.10"
|
2023-12-14 21:04:04 +00:00
|
|
|
|
flask = "^3.0.0"
|
|
|
|
|
flask-wtf = "^1.2.1"
|
2023-12-18 17:06:03 +00:00
|
|
|
|
pydantic-settings = "^2.0.3"
|
2023-11-22 11:21:32 +00:00
|
|
|
|
wtforms = "^3.1.1"
|
2022-05-13 09:44:23 +00:00
|
|
|
|
|
2023-08-16 15:14:11 +00:00
|
|
|
|
# extra : front
|
|
|
|
|
email_validator = {version = "^2.0.0", optional=true}
|
2023-10-23 17:36:21 +00:00
|
|
|
|
flask-babel = {version = "^4.0.0", optional=true}
|
2023-08-16 15:14:11 +00:00
|
|
|
|
flask-themer = {version = "^2.0.0", optional=true}
|
|
|
|
|
pycountry = {version = ">=22.1.10", optional=true}
|
2023-09-01 08:46:56 +00:00
|
|
|
|
pytz = {version = ">=2022.7", optional=true}
|
2024-03-26 12:57:14 +00:00
|
|
|
|
toml = {version = "^0.10.0", optional=true, python = "<3.11"}
|
2024-10-28 21:17:47 +00:00
|
|
|
|
zxcvbn-rs-py = {version = "^0.1.1", optional=true}
|
2023-08-16 15:14:11 +00:00
|
|
|
|
|
|
|
|
|
# extra : oidc
|
|
|
|
|
authlib = {version = "^1.2.1", optional=true}
|
|
|
|
|
|
|
|
|
|
# extra : ldap
|
|
|
|
|
python-ldap = {version = "^3.4.0", optional=true}
|
|
|
|
|
|
|
|
|
|
# extra : sentry
|
2024-05-07 13:46:47 +00:00
|
|
|
|
sentry-sdk = {version = "^2.0.0", optional=true, extras=["flask"]}
|
2022-05-13 09:44:23 +00:00
|
|
|
|
|
2023-11-15 15:37:06 +00:00
|
|
|
|
# extra : sql
|
2023-11-29 08:19:20 +00:00
|
|
|
|
passlib = {version = "^1.7.4", optional=true}
|
2023-11-15 15:37:06 +00:00
|
|
|
|
sqlalchemy = {version = "^2.0.23", optional=true}
|
2023-11-29 08:19:20 +00:00
|
|
|
|
sqlalchemy-json = {version = "^0.7.0", optional=true}
|
|
|
|
|
sqlalchemy-utils = {version = "^0.41.1", optional=true}
|
2023-11-15 15:37:06 +00:00
|
|
|
|
|
2023-03-11 23:13:09 +00:00
|
|
|
|
[tool.poetry.group.doc]
|
|
|
|
|
optional = true
|
2022-07-20 09:16:38 +00:00
|
|
|
|
|
2023-03-11 23:13:09 +00:00
|
|
|
|
[tool.poetry.group.doc.dependencies]
|
2023-12-18 17:06:03 +00:00
|
|
|
|
autodoc-pydantic = "^2.0.1"
|
2024-03-27 13:58:07 +00:00
|
|
|
|
shibuya = "^2024.3.1"
|
2024-10-28 07:55:42 +00:00
|
|
|
|
sphinx = ">=7.0.0"
|
2024-09-20 07:08:45 +00:00
|
|
|
|
sphinx-design = "^0.6.0"
|
2024-10-19 16:35:12 +00:00
|
|
|
|
sphinx-issues = "^5.0.0"
|
2024-05-16 15:48:08 +00:00
|
|
|
|
sphinx-click = "^6.0.0"
|
2022-05-13 09:44:23 +00:00
|
|
|
|
|
2023-03-11 23:13:09 +00:00
|
|
|
|
[tool.poetry.group.dev.dependencies]
|
2023-01-28 15:23:02 +00:00
|
|
|
|
coverage = {version = "*", extras=["toml"]}
|
2023-03-11 23:13:09 +00:00
|
|
|
|
faker = "*"
|
2023-01-28 15:23:02 +00:00
|
|
|
|
flask-webtest = "*"
|
2024-10-27 10:05:18 +00:00
|
|
|
|
# pre-commit version is fixed until docformatted hook is compatible
|
|
|
|
|
# https://github.com/PyCQA/docformatter/issues/293
|
|
|
|
|
pre-commit = "^3.0.0"
|
2023-01-28 15:23:02 +00:00
|
|
|
|
pyquery = "*"
|
2024-04-16 16:34:36 +00:00
|
|
|
|
pytest = "^8.0.0"
|
2023-01-28 15:23:02 +00:00
|
|
|
|
pytest-coverage = "*"
|
2022-12-20 19:18:37 +00:00
|
|
|
|
pytest-httpserver = "*"
|
2024-05-02 08:26:32 +00:00
|
|
|
|
pytest-lazy-fixtures = "^1.0.7"
|
2023-12-14 18:46:30 +00:00
|
|
|
|
pytest-smtpd = "^0.1.0"
|
2023-11-14 17:41:49 +00:00
|
|
|
|
pytest-xdist = "^3.3.1"
|
2023-01-28 15:23:02 +00:00
|
|
|
|
slapd = "*"
|
2024-05-02 08:26:32 +00:00
|
|
|
|
time-machine = "^2.14.1"
|
2024-05-02 11:42:42 +00:00
|
|
|
|
toml = "^0.10.0"
|
2022-05-13 09:44:23 +00:00
|
|
|
|
|
2024-09-12 17:41:31 +00:00
|
|
|
|
# Babel 2.14 does not directly depend on setuptools
|
|
|
|
|
# https://github.com/python-babel/babel/blob/40e60a1f6cf178d9f57fcc14f157ea1b2ab77361/CHANGES.rst?plain=1#L22-L24
|
|
|
|
|
# and neither python 3.12 due to PEP 632
|
|
|
|
|
# https://peps.python.org/pep-0632/
|
2024-09-20 07:08:45 +00:00
|
|
|
|
setuptools = {version = "*", python = ">=3.12"}
|
2024-09-12 17:41:31 +00:00
|
|
|
|
|
2023-03-11 23:13:09 +00:00
|
|
|
|
[tool.poetry.group.demo]
|
|
|
|
|
optional = true
|
|
|
|
|
|
|
|
|
|
[tool.poetry.group.demo.dependencies]
|
|
|
|
|
faker = "*"
|
|
|
|
|
honcho = "*"
|
|
|
|
|
slapd = "*"
|
|
|
|
|
requests = "*"
|
2024-04-15 13:34:50 +00:00
|
|
|
|
watchdog = "^4.0.0"
|
2023-03-11 23:13:09 +00:00
|
|
|
|
|
|
|
|
|
[tool.poetry.extras]
|
2023-08-16 15:14:11 +00:00
|
|
|
|
front = [
|
|
|
|
|
"click",
|
|
|
|
|
"email_validator",
|
2023-09-01 08:46:56 +00:00
|
|
|
|
"flask-babel",
|
2023-08-16 15:14:11 +00:00
|
|
|
|
"flask-themer",
|
|
|
|
|
"pycountry",
|
2023-09-01 08:46:56 +00:00
|
|
|
|
"pytz",
|
2023-08-16 15:14:11 +00:00
|
|
|
|
"toml",
|
2024-10-28 21:17:47 +00:00
|
|
|
|
"zxcvbn-rs-py",
|
2023-08-16 15:14:11 +00:00
|
|
|
|
]
|
|
|
|
|
ldap = [
|
|
|
|
|
"python-ldap",
|
|
|
|
|
]
|
|
|
|
|
oidc = [
|
|
|
|
|
"authlib",
|
|
|
|
|
]
|
|
|
|
|
sentry = [
|
|
|
|
|
"sentry-sdk",
|
|
|
|
|
]
|
2023-11-15 15:37:06 +00:00
|
|
|
|
sql = [
|
2023-11-29 08:19:20 +00:00
|
|
|
|
"passlib",
|
2023-11-15 15:37:06 +00:00
|
|
|
|
"sqlalchemy",
|
|
|
|
|
"sqlalchemy-json",
|
2023-11-29 08:19:20 +00:00
|
|
|
|
"sqlalchemy-utils",
|
2023-11-15 15:37:06 +00:00
|
|
|
|
]
|
2023-08-16 15:14:11 +00:00
|
|
|
|
all = [
|
|
|
|
|
"click",
|
|
|
|
|
"email_validator",
|
2023-09-01 08:46:56 +00:00
|
|
|
|
"flask-babel",
|
2023-08-16 15:14:11 +00:00
|
|
|
|
"flask-themer",
|
2023-11-29 08:19:20 +00:00
|
|
|
|
"passlib",
|
2023-08-16 15:14:11 +00:00
|
|
|
|
"pycountry",
|
2023-09-01 08:46:56 +00:00
|
|
|
|
"pytz",
|
2023-08-16 15:14:11 +00:00
|
|
|
|
"toml",
|
|
|
|
|
"python-ldap",
|
|
|
|
|
"authlib",
|
|
|
|
|
"sentry-sdk",
|
2023-11-15 15:37:06 +00:00
|
|
|
|
"sqlalchemy",
|
|
|
|
|
"sqlalchemy-json",
|
2023-11-29 08:19:20 +00:00
|
|
|
|
"sqlalchemy-utils",
|
2024-10-28 21:17:47 +00:00
|
|
|
|
"zxcvbn-rs-py",
|
2023-08-16 15:14:11 +00:00
|
|
|
|
]
|
2023-03-11 23:13:09 +00:00
|
|
|
|
|
2022-08-09 13:54:01 +00:00
|
|
|
|
[tool.poetry.scripts]
|
|
|
|
|
canaille = "canaille.commands:cli"
|
2022-05-13 09:44:23 +00:00
|
|
|
|
|
|
|
|
|
[options.packages.find]
|
|
|
|
|
exclude = [
|
|
|
|
|
"tests",
|
|
|
|
|
"tests.*",
|
|
|
|
|
"doc",
|
|
|
|
|
"doc.*",
|
|
|
|
|
]
|
|
|
|
|
|
2022-05-14 21:58:26 +00:00
|
|
|
|
[tool.poetry.build]
|
|
|
|
|
generate-setup-file = false
|
|
|
|
|
script = "build.py"
|
|
|
|
|
|
2022-05-13 09:44:23 +00:00
|
|
|
|
[tool.coverage.run]
|
|
|
|
|
source = [
|
|
|
|
|
"canaille",
|
|
|
|
|
"tests",
|
|
|
|
|
]
|
|
|
|
|
omit = [".tox/*"]
|
2022-12-22 16:14:46 +00:00
|
|
|
|
branch = true
|
2022-05-13 09:44:23 +00:00
|
|
|
|
|
2023-09-01 08:46:56 +00:00
|
|
|
|
[tool.coverage.report]
|
|
|
|
|
exclude_lines = [
|
2024-03-29 16:44:42 +00:00
|
|
|
|
"@pytest.mark.skip",
|
2023-09-01 08:46:56 +00:00
|
|
|
|
"pragma: no cover",
|
|
|
|
|
"raise NotImplementedError",
|
|
|
|
|
"except ImportError",
|
|
|
|
|
"if app.debug",
|
|
|
|
|
]
|
|
|
|
|
|
2024-03-15 18:58:06 +00:00
|
|
|
|
[tool.ruff.lint]
|
2024-04-23 20:12:04 +00:00
|
|
|
|
select = [
|
|
|
|
|
"E", # pycodestyle
|
|
|
|
|
"F", # pyflakes
|
|
|
|
|
"I", # isort
|
|
|
|
|
"UP", # pyupgrade
|
|
|
|
|
]
|
|
|
|
|
ignore = [
|
|
|
|
|
"E501", # line-too-long
|
|
|
|
|
"E722", # bare-except
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
[tool.ruff.lint.isort]
|
|
|
|
|
force-single-line = true
|
|
|
|
|
|
2024-09-11 07:25:07 +00:00
|
|
|
|
[tool.ruff.format]
|
2024-04-23 20:12:04 +00:00
|
|
|
|
docstring-code-format = true
|
2023-05-25 11:37:58 +00:00
|
|
|
|
|
2022-05-13 09:44:23 +00:00
|
|
|
|
[tool.tox]
|
|
|
|
|
legacy_tox_ini = """
|
|
|
|
|
[tox]
|
|
|
|
|
isolated_build = true
|
|
|
|
|
skipsdist = true
|
|
|
|
|
envlist =
|
|
|
|
|
style
|
|
|
|
|
py310
|
2022-11-01 10:49:26 +00:00
|
|
|
|
py311
|
2023-11-01 19:22:26 +00:00
|
|
|
|
py312
|
2024-10-27 10:21:42 +00:00
|
|
|
|
py313
|
2022-05-13 09:44:23 +00:00
|
|
|
|
doc
|
|
|
|
|
coverage
|
|
|
|
|
|
|
|
|
|
[testenv]
|
2022-12-09 23:19:04 +00:00
|
|
|
|
allowlist_externals = poetry
|
2022-05-13 09:44:23 +00:00
|
|
|
|
commands =
|
2023-08-16 15:14:11 +00:00
|
|
|
|
poetry install --extras all
|
2023-11-24 11:51:17 +00:00
|
|
|
|
poetry run pytest --showlocals --full-trace {posargs}
|
2022-05-13 09:44:23 +00:00
|
|
|
|
|
|
|
|
|
[testenv:style]
|
|
|
|
|
commands =
|
2024-10-27 10:05:18 +00:00
|
|
|
|
pip install pre-commit<4
|
2023-08-15 11:57:05 +00:00
|
|
|
|
pre-commit run --all-files
|
2022-05-13 09:44:23 +00:00
|
|
|
|
|
|
|
|
|
[testenv:doc]
|
|
|
|
|
commands =
|
2023-08-17 13:55:41 +00:00
|
|
|
|
poetry install --with doc --without dev --extras oidc
|
2022-05-13 09:44:23 +00:00
|
|
|
|
poetry run sphinx-build doc build/sphinx/html
|
|
|
|
|
|
|
|
|
|
[testenv:coverage]
|
|
|
|
|
commands =
|
2023-08-16 15:14:11 +00:00
|
|
|
|
poetry install --extras all
|
2023-07-06 07:07:52 +00:00
|
|
|
|
poetry run pytest --cov --cov-fail-under=100 --cov-report term:skip-covered {posargs:-n auto}
|
2022-05-13 09:44:23 +00:00
|
|
|
|
poetry run coverage html
|
|
|
|
|
"""
|
2024-09-12 17:29:59 +00:00
|
|
|
|
|
|
|
|
|
[[tool.babel.mappings]]
|
|
|
|
|
method = "python"
|
|
|
|
|
pattern = "**.py"
|
|
|
|
|
|
|
|
|
|
[[tool.babel.mappings]]
|
|
|
|
|
method = "jinja2"
|
|
|
|
|
pattern = "**/templates/**.html"
|
|
|
|
|
trimmed = "true"
|
|
|
|
|
|
|
|
|
|
[[tool.babel.mappings]]
|
|
|
|
|
method = "jinja2"
|
|
|
|
|
pattern = "**/themes/**.html"
|
|
|
|
|
trimmed = "true"
|
|
|
|
|
|
|
|
|
|
[[tool.babel.mappings]]
|
|
|
|
|
method = "jinja2"
|
|
|
|
|
pattern = "**/templates/**.txt"
|
|
|
|
|
trimmed = "true"
|