-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
111 lines (105 loc) · 2.32 KB
/
Copy pathpyproject.toml
File metadata and controls
111 lines (105 loc) · 2.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
[project]
name = "cofy-api"
authors = [
{ name="EnergyID", email = "info@energieid.be" },
{ name="Jorg" }
]
version = "0.0.0"
description = "An open-source modular framework for ingesting, standardising, storing, and computing energy-related data."
license = "MIT"
readme = "README.md"
requires-python = ">=3.11"
dependencies = [
"fastapi[standard]>=0.128.0",
"pydantic>=2.0.0",
"starlette>=0.41.0",
]
[project.optional-dependencies]
# Module extras
timeseries = [
"isodate>=0.7.2",
"narwhals>=2.15.0"
]
tariff = [
"cofy-api[timeseries]",
"energy-cost>=0.7.0",
"entsoe-py>=0.7.10",
"pandas>=3.0.0"
]
billing = [
"cofy-api[timeseries]",
"energy-cost>=0.7.0",
"pandas>=3.0.0"
]
production = [
"cofy-api[timeseries]",
"polars>=1.38.1",
"requests>=2.32.0",
]
members = [
"energy-cost>=0.7.0",
]
directive = [
"cofy-api[timeseries]",
"narwhals>=2.15.0"
]
debug = [
"yappi>=1.7.6",
]
# Convenience extras
all = ["cofy-api[timeseries,tariff,members,production,directive,billing,debug]"]
[project.urls]
Source = "https://github.com/EnergieID/cofy-api"
Changelog = "https://github.com/EnergieID/cofy-api/releases"
[build-system]
requires = ["setuptools>=75.0", "wheel"]
build-backend = "setuptools.build_meta"
[tool.setuptools.packages.find]
where = ["src"]
namespaces = true
[tool.setuptools.package-data]
"cofy.db" = ["alembic/*", "alembic/**/*"]
[dependency-groups]
dev = [
"cofy-api[all,debug]",
"pyinstrument>=5.1.2",
"pytest-asyncio>=1.3.0",
"pytest-cov>=7.0.0",
"pytest>=9.0.2",
"ruff>=0.14.13",
"ty>=0.0.12",
]
[tool.poe.env]
PYTHONPYCACHEPREFIX = ".pycache"
[tool.poe.tasks]
lint = "ruff check --fix"
format = "ruff format"
check = "ty check"
[tool.poe.tasks.demo]
cmd = "fastapi dev demo/main.py"
envfile = ".env.local"
[tool.poe.tasks.prod]
shell = """
docker build -t cofy-api .
docker run -p 8080:8080 --env-file .env.local cofy-api
"""
[tool.poe.tasks.test]
cmd = "pytest --cov=cofy --cov-report=term-missing --import-mode=importlib"
[tool.coverage.report]
skip_covered = true
[tool.coverage.run]
source = ["cofy"]
[tool.ruff]
line-length = 120
[tool.ruff.lint]
select = [
"E", # pycodestyle
"F", # Pyflakes
"UP", # pyupgrade
"B", # flake8-bugbear
"SIM", # flake8-simplify
"I", # isort
]
ignore = [
"E501", #Line too long
]