Skip to content

Commit

Permalink
Merge branch 'PowerGridModel:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
sudo-ac authored Oct 4, 2024
2 parents a75d5fc + 2d74e82 commit 293dd8f
Show file tree
Hide file tree
Showing 30 changed files with 1,082 additions and 328 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/check-code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ on:
pull_request:
# run pipeline on merge queue
merge_group:
# run pipeline from another workflow
workflow_call:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-code-quality
Expand Down Expand Up @@ -53,7 +55,7 @@ jobs:
- name: Install and run mypy
run: |
pip install mypy
pip install mypy numpy
mypy .
- name: Install and run pylint
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/citations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ on:
paths:
- CITATION.cff
- .github/workflows/citations.yml

pull_request:
paths:
- CITATION.cff
- .github/workflows/citations.yml

# run pipeline from another workflow
workflow_call:
# run this workflow manually from the Actions tab
workflow_dispatch:

concurrency:
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,16 @@ jobs:
with:
create_release: false

check-code-quality:
uses: "./.github/workflows/check-code-quality.yml"

reuse-compliance:
uses: "./.github/workflows/reuse-compliance.yml"

clang-tidy:
uses: "./.github/workflows/clang-tidy.yml"
with:
target: "all power_grid_model_benchmark_cpp"

citations:
uses: "./.github/workflows/citations.yml"
4 changes: 4 additions & 0 deletions .github/workflows/reuse-compliance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ on:
pull_request:
# run pipeline on merge queue
merge_group:
# run pipeline from another workflow
workflow_call:
# run this workflow manually from the Actions tab
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-reuse-compliance
Expand Down
8 changes: 5 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,23 @@

repos:
- repo: https://github.com/fsfe/reuse-tool
rev: v3.0.2
rev: v4.0.3
hooks:
- id: reuse
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 24.4.2
rev: 24.8.0
hooks:
- id: black-jupyter
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.10.0
rev: v1.11.2
hooks:
- id: mypy
additional_dependencies:
- numpy
- repo: local
hooks:
- id: pylint
Expand Down
8 changes: 0 additions & 8 deletions .reuse/dep5

This file was deleted.

14 changes: 14 additions & 0 deletions REUSE.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# SPDX-FileCopyrightText: Contributors to the Power Grid Model project <[email protected]>
#
# SPDX-License-Identifier: MPL-2.0

version = 1
SPDX-PackageName = "power-grid-model"
SPDX-PackageSupplier = "Power Grid Model project <[email protected]>"
SPDX-PackageDownloadLocation = "https://github.com/PowerGridModel/power-grid-model"

[[annotations]]
path = "./**"
precedence = "aggregate"
SPDX-FileCopyrightText = "Contributors to the Power Grid Model project <[email protected]>"
SPDX-License-Identifier = "MPL-2.0"
2 changes: 2 additions & 0 deletions docs/api_reference/python-api-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ SPDX-License-Identifier: MPL-2.0
.. autoclass:: power_grid_model.data_types.SparseBatchArray
.. autoclass:: power_grid_model.dataset_definitions.DatasetType
.. autoclass:: power_grid_model.dataset_definitions.ComponentType
.. autodata:: power_grid_model.typing.ComponentAttributeMapping
:annotation: ComponentAttributeMapping
```

## error types
Expand Down
2 changes: 1 addition & 1 deletion docs/user_manual/serialization.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ The format consists of a [`PowerGridModelRoot`](#json-schema-root-object) JSON o

- [`PowerGridModelRoot`](#json-schema-root-object): `Object`
- `version`: `string` containing the schema version (required, current version is `"1.0"`)
- `type`: `string` containing the dataset type, e.g. `"input"`, `"update"`, ...
- `type`: `string` containing the dataset type, e.g. `"input"`, `"update"`, etc.
- `is_batch`: `boolean` flag that describes whether the dataset is a batch or not.
- `attributes`: [`Attributes`](#json-schema-attributes-object) containing specified attributes per component type (e.g.: `"node"`).
- `data`: [`Dataset`](#json-schema-dataset-object) containing the actual dataset.
Expand Down
2 changes: 2 additions & 0 deletions src/power_grid_model/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
BranchSide,
CalculationMethod,
CalculationType,
ComponentAttributeFilterOptions,
FaultPhase,
FaultType,
LoadGenType,
Expand All @@ -20,3 +21,4 @@
TapChangingStrategy,
WindingType,
)
from power_grid_model.typing import ComponentAttributeMapping
Loading

0 comments on commit 293dd8f

Please sign in to comment.