-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathpyproject.toml
More file actions
118 lines (105 loc) · 3.92 KB
/
pyproject.toml
File metadata and controls
118 lines (105 loc) · 3.92 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
112
113
114
115
116
117
118
[build-system]
requires = ["setuptools>=61.0.0", "wheel"]
build-backend = "setuptools.build_meta"
[tool.setuptools.packages.find]
where = [""]
include = ["xl2times", "xl2times.*"]
[project]
name = "xl2times"
version = "0.3.0"
authors = [
{ name="Sam Webster", email="13457618+samwebster@users.noreply.github.com" },
{ name="Tom Minka", email="8955276+tminka@users.noreply.github.com" },
{ name="Siddharth Krishna", email="siddharth-krishna@users.noreply.github.com" },
{ name="Olexandr Balyk", email="ob@facilitate.energy" },
]
maintainers = [
{ name="Siddharth Krishna", email="siddharth-krishna@users.noreply.github.com" },
{ name="Olexandr Balyk", email="ob@facilitate.energy" },
]
description = 'An open source tool to convert TIMES models specified in Excel to a format ready for processing by GAMS'
readme = "README.md"
requires-python = ">=3.11"
license = { file = "LICENSE" }
keywords = []
classifiers = [
"Development Status :: 4 - Beta",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
]
dependencies = [
"GitPython >= 3.1.31, < 3.2",
"more-itertools",
"openpyxl >= 3.1.3",
"pandas >= 2.1",
"pyarrow",
"tqdm",
"loguru"
]
[project.optional-dependencies]
dev = [
"black",
"gamspy-base",
"pre-commit",
"tabulate",
"pytest",
"pytest-cov",
"poethepoet",
"ruff"
]
[project.urls]
Documentation = "https://xl2times.readthedocs.io"
Issues = "https://github.com/etsap-TIMES/xl2times/issues"
Source = "https://github.com/etsap-TIMES/xl2times"
[project.scripts]
xl2times = "xl2times.__main__:main"
dd_to_csv = "xl2times.dd_to_csv:main"
[tool.pytest.ini_options]
# don't print runtime warnings
filterwarnings = ["ignore::DeprecationWarning", "ignore::UserWarning", "ignore::FutureWarning"]
# show output, print test coverage report
addopts = '-s --durations=0 --durations-min=5.0 --tb=native'
[tool.poe.tasks]
# Automation of common dev tasks etc.
# Run with: `poe <target>`, e,g. `poe lint` or `poe benchmark Ireland`.
# See https://github.com/nat-n/poethepoet for details.
benchmark = { cmd = "python utils/run_benchmarks.py benchmarks.yml --run", help = "Run a single benchmark. Usage: poe benchmark <benchmark_name>" }
benchmark_all = { shell = "python utils/run_benchmarks.py benchmarks.yml --verbose | tee out.txt", help = "Run the project", interpreter = "posix" }
lint = { shell = "git add .pre-commit-config.yaml; pre-commit run", help = "Run pre-commit hooks on staged files", interpreter = "posix" }
lint-all = { shell = "git add .pre-commit-config.yaml; pre-commit run --all-files", help = "Run pre-commit hooks on all files", interpreter = "posix" }
test = { cmd = "pytest --cov-report term --cov-report html --cov=xl2times --cov=utils", help = "Run unit tests with pytest" }
# Config for various pre-commit checks are below
# Ruff linting rules - see https://github.com/charliermarsh/ruff and https://beta.ruff.rs/docs/rules/
[tool.ruff]
target-version = "py311"
line-length = 88
# Option 1: use basic rules only.
lint.select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"UP", # pyupgrade
"N", # pep8 naming
"I", # isort
"TID", # tidy imports
"UP", # pyupgrade
"NPY", # numpy style
"PL", # pylint
"D", # docstring conventions
# "PD", # pandas style # TODO enable later
# "C90", # code complexity # TODO enable later
]
# Add specific rule codes/groups here to ignore them, or add a '#noqa' comment to the line of code to skip all checks.
lint.ignore = [
"PLR", # complexity rules
"PD901", "PD011", # pandas 'df''
"E501", # line too long, handled by black
"D100", "D101", "D102", "D103", "D104", "D105", # Missing docstrings # TODO enable when added
"D205", "D401"
]
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.ruff.lint.mccabe]
# Flag errors (`C901`) whenever the complexity level exceeds 5.
max-complexity = 12