Skip to content

Commit bd94920

Browse files
TEAM4-0dependabot[bot]CasperWA
authored
[Auto-generated] Update dependencies (#204)
Update dependencies in `pyproject.toml` (#200, #203) Update GH Actions: * Bump SINTEF/ci-cd from 2.7.1 to 2.7.2 (#201) Update `pre-commit` hooks. Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Casper Welzel Andersen <casper.w.andersen@sintef.no> Co-authored-by: Casper Welzel Andersen <43357585+CasperWA@users.noreply.github.com>
1 parent 9a39edf commit bd94920

26 files changed

Lines changed: 69 additions & 35 deletions

.github/workflows/cd_release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
jobs:
99
publish-package-and-docs:
1010
name: External
11-
uses: SINTEF/ci-cd/.github/workflows/cd_release.yml@v2.7.1
11+
uses: SINTEF/ci-cd/.github/workflows/cd_release.yml@v2.7.2
1212
if: github.repository == 'SINTEF/oteapi-optimade' && startsWith(github.ref, 'refs/tags/v')
1313
with:
1414
# General

.github/workflows/ci_automerge_dependency_prs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
jobs:
88
update-dependencies-branch:
99
name: External
10-
uses: SINTEF/ci-cd/.github/workflows/ci_automerge_prs.yml@v2.7.1
10+
uses: SINTEF/ci-cd/.github/workflows/ci_automerge_prs.yml@v2.7.2
1111
if: github.repository_owner == 'SINTEF' && ( ( startsWith(github.event.pull_request.head.ref, 'dependabot/') && github.actor == 'dependabot[bot]' ) || ( github.event.pull_request.head.ref == 'ci/update-pyproject' && github.actor == 'TEAM4-0' ) )
1212
secrets:
1313
PAT: ${{ secrets.RELEASE_PAT }}

.github/workflows/ci_cd_updated_main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
jobs:
88
update-deps-branch-and-docs:
99
name: External
10-
uses: SINTEF/ci-cd/.github/workflows/ci_cd_updated_default_branch.yml@v2.7.1
10+
uses: SINTEF/ci-cd/.github/workflows/ci_cd_updated_default_branch.yml@v2.7.2
1111
if: github.repository_owner == 'SINTEF'
1212
with:
1313
# General

.github/workflows/ci_check_dependencies.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
jobs:
1010
check-dependencies:
1111
name: External
12-
uses: SINTEF/ci-cd/.github/workflows/ci_check_pyproject_dependencies.yml@v2.7.1
12+
uses: SINTEF/ci-cd/.github/workflows/ci_check_pyproject_dependencies.yml@v2.7.2
1313
if: github.repository_owner == 'SINTEF'
1414
with:
1515
git_username: "TEAM 4.0[bot]"

.github/workflows/ci_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
jobs:
1111
basic-tests:
1212
name: External
13-
uses: SINTEF/ci-cd/.github/workflows/ci_tests.yml@v2.7.1
13+
uses: SINTEF/ci-cd/.github/workflows/ci_tests.yml@v2.7.2
1414
with:
1515
# General setup
1616
install_extras: "[dev]"

.github/workflows/ci_update_dependencies.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
jobs:
1010
create-collected-pr:
1111
name: External
12-
uses: SINTEF/ci-cd/.github/workflows/ci_update_dependencies.yml@v2.7.1
12+
uses: SINTEF/ci-cd/.github/workflows/ci_update_dependencies.yml@v2.7.2
1313
if: github.repository_owner == 'SINTEF'
1414
with:
1515
# General

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ repos:
2424
args: [--py39-plus, --keep-runtime-typing]
2525

2626
- repo: https://github.com/ambv/black
27-
rev: 23.12.1
27+
rev: 24.1.1
2828
hooks:
2929
- id: black
3030

@@ -35,13 +35,13 @@ repos:
3535
additional_dependencies: [black]
3636

3737
- repo: https://github.com/astral-sh/ruff-pre-commit
38-
rev: v0.1.11
38+
rev: v0.1.15
3939
hooks:
4040
- id: ruff
4141
args: ["--fix", "--exit-non-zero-on-fix", "--show-fixes"]
4242

4343
- repo: https://github.com/PyCQA/bandit
44-
rev: 1.7.6
44+
rev: 1.7.7
4545
hooks:
4646
- id: bandit
4747
args: ["-r"]
@@ -57,7 +57,7 @@ repos:
5757
- "pydantic<2"
5858

5959
- repo: https://github.com/SINTEF/ci-cd
60-
rev: v2.7.1
60+
rev: v2.7.2
6161
hooks:
6262
- id: docs-api-reference
6363
args:

oteapi_optimade/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
Authored by Casper Welzel Andersen, SINTEF, 2022
66
Created from cookiecutter-oteapi-plugin, SINTEF, 2022
77
"""
8+
89
from __future__ import annotations
910

1011
__version__ = "0.4.2"

oteapi_optimade/dlite/parse.py

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""OTEAPI strategy for parsing OPTIMADE structure resources to DLite instances."""
2+
23
from __future__ import annotations
34

45
import logging
@@ -127,16 +128,20 @@ def get(
127128
# Currently, only "structures" entries are supported and handled
128129
if isinstance(session.optimade_response_object, StructureResponseMany):
129130
structures = [
130-
Structure(entry)
131-
if isinstance(entry, dict)
132-
else Structure(entry.dict())
131+
(
132+
Structure(entry)
133+
if isinstance(entry, dict)
134+
else Structure(entry.dict())
135+
)
133136
for entry in session.optimade_response_object.data
134137
]
135138
elif isinstance(session.optimade_response_object, StructureResponseOne):
136139
structures = [
137-
Structure(session.optimade_response_object.data)
138-
if isinstance(session.optimade_response_object.data, dict)
139-
else Structure(session.optimade_response_object.data.dict())
140+
(
141+
Structure(session.optimade_response_object.data)
142+
if isinstance(session.optimade_response_object.data, dict)
143+
else Structure(session.optimade_response_object.data.dict())
144+
)
140145
]
141146
elif isinstance(session.optimade_response_object, Success):
142147
if isinstance(session.optimade_response_object.data, dict):
@@ -147,9 +152,11 @@ def get(
147152
]
148153
elif isinstance(session.optimade_response_object.data, list):
149154
structures = [
150-
Structure(entry)
151-
if isinstance(entry, dict)
152-
else Structure(entry.dict())
155+
(
156+
Structure(entry)
157+
if isinstance(entry, dict)
158+
else Structure(entry.dict())
159+
)
153160
for entry in session.optimade_response_object.data
154161
]
155162
else:
@@ -289,9 +296,11 @@ def get(
289296
"nelements": structure.attributes.nelements or 0,
290297
"dimensionality": 3,
291298
"nsites": structure.attributes.nsites or 0,
292-
"nspecies": len(structure.attributes.species)
293-
if structure.attributes.species
294-
else 0,
299+
"nspecies": (
300+
len(structure.attributes.species)
301+
if structure.attributes.species
302+
else 0
303+
),
295304
"nstructure_features": len(
296305
structure.attributes.structure_features
297306
),

oteapi_optimade/exceptions.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""OTE-API OPTIMADE-specific Python exceptions."""
2+
23
from __future__ import annotations
34

45

0 commit comments

Comments
 (0)