Skip to content

Commit bae4470

Browse files
added formatting linting
1 parent e08a2c3 commit bae4470

File tree

6 files changed

+382
-5
lines changed

6 files changed

+382
-5
lines changed

.pre-commit-config.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
repos:
2+
- repo: https://github.com/psf/black
3+
rev: 25.1.0
4+
hooks:
5+
- id: black
6+
language_version: python3.13
7+
8+
- repo: https://github.com/PyCQA/isort
9+
rev: 6.0.1
10+
hooks:
11+
- id: isort
12+
language_version: python3.13
13+
14+
- repo: https://github.com/astral-sh/ruff-pre-commit
15+
rev: v0.11.7
16+
hooks:
17+
- id: ruff
18+
args: [--fix]
19+
language_version: python3.13

poetry.lock

Lines changed: 319 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[project]
2-
name = "simona-markov-load"
2+
name = "simonamarkovload"
33
version = "0.1.0"
44
description = "Synthetic household load profiles for Simona"
55
authors = [
@@ -20,3 +20,25 @@ dependencies = [
2020
[build-system]
2121
requires = ["poetry-core>=2.0.0,<3.0.0"]
2222
build-backend = "poetry.core.masonry.api"
23+
24+
packages = [
25+
{ include = "simonaMarkovLoad" },
26+
{ include = "scripts" }
27+
]
28+
29+
[tool.poetry.group.dev.dependencies]
30+
black = "^25.1.0"
31+
isort = "^6.0.1"
32+
ruff = "^0.11.7"
33+
pre-commit = "^4.2.0"
34+
35+
[tool.poetry.scripts]
36+
setup = "scripts.setup_env:main"
37+
38+
[tool.black]
39+
line-length = 88
40+
target-version = ["py313"]
41+
include = '\.pyi?$'
42+
43+
[tool.isort]
44+
profile = "black"

scripts/setup_env.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import subprocess
2+
import sys
3+
from pathlib import Path
4+
5+
6+
def run(cmd: list[str]):
7+
print("›", " ".join(cmd))
8+
subprocess.check_call(cmd)
9+
10+
11+
def main():
12+
project_root = Path(__file__).parent.parent
13+
sys.path.insert(0, str(project_root))
14+
run(["poetry", "install"])
15+
run(["poetry", "run", "pre-commit", "install"])
16+
17+
18+
if __name__ == "__main__":
19+
main()

src/markov/model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
print("K2")
1+
print("K2")

src/preprocessing/loader.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

0 commit comments

Comments
 (0)