Skip to content

Commit eb11503

Browse files
Merge pull request #6 from Grid-FM/test/pre-commits
Solved pre-commit checks
2 parents a931d82 + 99f7bdf commit eb11503

55 files changed

Lines changed: 447 additions & 274 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.pre-commit-config.yaml

Lines changed: 4 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -6,47 +6,21 @@ repos:
66
- id: end-of-file-fixer
77
- id: check-yaml
88
- id: debug-statements
9-
- id: double-quote-string-fixer
10-
- id: name-tests-test
11-
- id: requirements-txt-fixer
129
- repo: https://github.com/astral-sh/ruff-pre-commit
1310
rev: v0.12.0
1411
hooks:
1512
- id: ruff-check
1613
- id: ruff-format
17-
- repo: https://github.com/asottile/setup-cfg-fmt
18-
rev: v2.8.0
19-
hooks:
20-
- id: setup-cfg-fmt
21-
- repo: https://github.com/asottile/reorder-python-imports
22-
rev: v3.15.0
23-
hooks:
24-
- id: reorder-python-imports
25-
args: [--py39-plus, --add-import, 'from __future__ import annotations']
26-
- repo: https://github.com/asottile/add-trailing-comma
27-
rev: v3.2.0
28-
hooks:
29-
- id: add-trailing-comma
30-
- repo: https://github.com/asottile/pyupgrade
31-
rev: v3.20.0
32-
hooks:
33-
- id: pyupgrade
34-
args: [--py39-plus]
35-
- repo: https://github.com/hhatto/autopep8
36-
rev: v2.3.2
37-
hooks:
38-
- id: autopep8
3914
- repo: https://github.com/PyCQA/flake8
4015
rev: 7.2.0
4116
hooks:
4217
- id: flake8
43-
- repo: https://github.com/pre-commit/mirrors-mypy
44-
rev: v1.16.0
18+
args: ["--ignore=E501,W503,E203"]
19+
- repo: https://github.com/asottile/add-trailing-comma
20+
rev: v3.2.0
4521
hooks:
46-
- id: mypy
47-
22+
- id: add-trailing-comma
4823
- repo: https://github.com/ibm/detect-secrets
49-
5024
rev: 0.13.1+ibm.62.dss
5125
hooks:
5226
- id: detect-secrets # pragma: whitelist secret

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,5 +110,3 @@ python eval.py --config config/case300_ieee_base.yaml --eval_name eval_case300 -
110110
- **Outputs:**
111111
- Evaluation results are saved in MLflow.
112112
- Optional plots are stored as **HTML** files
113-
114-

docs/datasets/data_normalization.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33

44

5-
Normalization improves neural network training by ensuring features are well-scaled, preventing issues like exploding gradients and slow convergence. In power grids, where variables like voltage and power span wide ranges, normalization is essential.
5+
Normalization improves neural network training by ensuring features are well-scaled, preventing issues like exploding gradients and slow convergence. In power grids, where variables like voltage and power span wide ranges, normalization is essential.
66
The `gridFM` package offers four methods:
77

8-
- [`Min-Max Normalization`](#minmaxnormalizer)
9-
- [`Standardization (Z-score)`](#standardizer)
10-
- [`Identity (no normalization)`](#identitynormalizer)
8+
- [`Min-Max Normalization`](#minmaxnormalizer)
9+
- [`Standardization (Z-score)`](#standardizer)
10+
- [`Identity (no normalization)`](#identitynormalizer)
1111
- [`BaseMVA Normalization`](#basemvanormalizer)
1212

1313
Each of these strategies implements a unified interface and can be used interchangeably depending on the learning task and data characteristics.
@@ -27,7 +27,7 @@ Each of these strategies implements a unified interface and can be used intercha
2727

2828
### `MinMaxNormalizer`
2929

30-
::: gridFM.datasets.data_normalization.MinMaxNormalizer
30+
::: gridFM.datasets.data_normalization.MinMaxNormalizer
3131

3232
---
3333

@@ -63,4 +63,4 @@ normalizer = MinMaxNormalizer()
6363
params = normalizer.fit(data)
6464
normalized = normalizer.transform(data)
6565
restored = normalizer.inverse_transform(normalized)
66-
```
66+
```

docs/datasets/powergrid.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ from gridFM.datasets.powergrid import GridDatasetMem
1111
dataset = GridDatasetMem(
1212
root="./data",
1313
norm_method="identity",
14-
node_normalizer=IdentityNormalizer(),
14+
node_normalizer=IdentityNormalizer(),
1515
edge_normalizer=IdentityNormalizer(),
1616
pe_dim=10,
1717
mask_dim=6,

docs/datasets/transforms.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
::: gridFM.datasets.transforms.AddNormalizedRandomWalkPE
88

9-
### `AddEdgeWeights`
9+
### `AddEdgeWeights`
1010

1111
::: gridFM.datasets.transforms.AddEdgeWeights
1212

@@ -23,5 +23,5 @@
2323
::: gridFM.datasets.transforms.AddPFMask
2424

2525
### `AddOPFMask`
26-
27-
::: gridFM.datasets.transforms.AddOPFMask
26+
27+
::: gridFM.datasets.transforms.AddOPFMask

docs/examples/fine_tuning.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
# GridFM Fine-Tuning workflow
1+
# GridFM Fine-Tuning workflow

docs/examples/inference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
# GridFM Inference workflow
1+
# GridFM Inference workflow

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
<p align="center">
66
<img src="figs/pre_training.png" alt="GridFM logo"/>
77
<br/>
8-
</p>
8+
</p>

docs/install/installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ Install the package in editable mode during development phase:
1010

1111
```bash
1212
pip install -e .
13-
```
13+
```

docs/javascripts/katex.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ document$.subscribe(({ body }) => {
77
{ left: "\\[", right: "\\]", display: true }
88
],
99
})
10-
})
10+
})

0 commit comments

Comments
 (0)