Skip to content
Snippets Groups Projects
Commit 7bb77bb1 authored by David Smadja's avatar David Smadja
Browse files

Migrate to uv

parent 7e27ff15
No related branches found
No related tags found
No related merge requests found
Pipeline #18478 canceled
3.12
......@@ -84,7 +84,9 @@ reform_class_by_name = {
reform_name: reform_class
for reform_name, reform_class in (
(reform_entry_point.name, reform_entry_point.load())
for reform_entry_point in metadata.entry_points().get("openfisca.reforms", [])
for reform_entry_point in metadata.entry_points().select(
group="openfisca.reforms"
)
)
if reform_class.tax_benefit_system_name == settings.country_package
}
......@@ -119,8 +121,12 @@ def apply_parametric_reform(parameters, parameter_change_by_name):
changeType = change.get("type")
if changeType == "parameter":
parameter.update(
start=instant(change["start"]) if change.get("start") != None else None,
stop=instant(change["stop"]) if change.get("stop") != None else None,
start=instant(change["start"])
if change.get("start") != None
else None,
stop=instant(change["stop"])
if change.get("stop") != None
else None,
value=change.get("value"),
)
elif changeType == "scale":
......
This diff is collapsed.
[tool.poetry]
[project]
name = "leximpact-socio-fiscal-api"
version = "0.1.347"
description = "_HTTP + WebSocket API for OpenFisca"
license = "AGPL-3.0"
authors = ["Emmanuel Raviart <emmanuel@raviart.com>"]
authors = [{ name = "Emmanuel Raviart", email = "emmanuel@raviart.com" }]
requires-python = "~=3.9"
readme = "README.md"
homepage = "https://simulateur-socio-fisca.leximpact.dev/"
repository = "https://git.leximpact.dev/leximpact/simulateur-socio-fiscal/leximpact-socio-fiscal-api"
[tool.poetry.dependencies]
python = "^3.9"
fastapi = "^0.115.0"
uvicorn = "^0.30.6"
python-dotenv = "^1.0.0"
# openfisca-france = ">= 116.13.2"
openfisca-france-reforms = { git = "https://git.leximpact.dev/leximpact/simulateur-socio-fiscal/openfisca/openfisca-france-reforms.git" }
# openfisca-france-with-indirect-taxation = { git = "https://git.leximpact.dev/leximpact/simulateur-socio-fiscal/openfisca/openfisca-france-with-indirect-taxation.git" }
gunicorn = "^21.0.0"
pydantic-settings = "^2.1.0"
license = "AGPL-3.0"
dependencies = [
"fastapi>=0.115.0,<0.116",
"uvicorn>=0.30.6,<0.31",
"python-dotenv>=1.0.0,<2",
"openfisca-france-reforms",
"gunicorn>=21.0.0,<22",
"pydantic-settings>=2.1.0,<3",
]
[tool.poetry.dev-dependencies]
black = { version = "*", allow-prereleases = true }
flake8-black = "^0.3.2"
[project.urls]
Homepage = "https://simulateur-socio-fisca.leximpact.dev/"
Repository = "https://git.leximpact.dev/leximpact/simulateur-socio-fiscal/leximpact-socio-fiscal-api"
[tool.poetry.scripts]
[project.scripts]
leximpact_socio-fiscal_api = "leximpact_socio_fiscal_api.scripts.serve:main"
[tool.uv.sources]
openfisca-france-reforms = { git = "https://git.leximpact.dev/leximpact/simulateur-socio-fiscal/openfisca/openfisca-france-reforms.git" }
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
requires = ["hatchling"]
build-backend = "hatchling.build"
[dependency-groups]
dev = [
"ruff>=0.8.6",
]
uv.lock 0 → 100644
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment