Skip to content

Commit

Permalink
precommit updated
Browse files Browse the repository at this point in the history
  • Loading branch information
atomprobe-tc committed Jan 10, 2025
1 parent 192691a commit cf672b5
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.8.0
rev: v0.9.0
hooks:
# Run the linter.
- id: ruff
Expand Down
6 changes: 3 additions & 3 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ pyzmq==26.2.0
# jupyter-client
# jupyter-console
# jupyter-server
radioactivedecay==0.6.0
radioactivedecay==0.6.1
# via ifes-apt-tc-data-modeling
referencing==0.35.1
# via
Expand All @@ -490,7 +490,7 @@ rpds-py==0.22.3
# via
# jsonschema
# referencing
ruff==0.8.6
ruff==0.9.0
# via pynxtools-apm (pyproject.toml)
scipy==1.15.0
# via
Expand Down Expand Up @@ -600,7 +600,7 @@ wheel==0.45.1
# via pip-tools
widgetsnbextension==4.0.13
# via ipywidgets
xarray==2025.1.0
xarray==2025.1.1
# via pynxtools
xmltodict==0.14.2
# via ifes-apt-tc-data-modeling
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ dependencies = [
[project.optional-dependencies]
dev = [
"mypy",
"ruff>=0.6.0",
"ruff>=0.6",
"pytest",
"pytest-cov",
"pytest-timeout",
Expand Down
4 changes: 2 additions & 2 deletions src/pynxtools_apm/utils/create_nx_default_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ def decorate_path_to_default_plot(template: dict, nxpath: str) -> dict:
symbol_s = path[idx + 1].find("[")
symbol_e = path[idx + 1].find("]")
if 0 <= symbol_s < symbol_e:
template[f"{trg}@default"] = f"{path[idx + 1][symbol_s + 1:symbol_e]}"
trg += f"{path[idx + 1][symbol_s + 1:symbol_e]}/"
template[f"{trg}@default"] = f"{path[idx + 1][symbol_s + 1 : symbol_e]}"
trg += f"{path[idx + 1][symbol_s + 1 : symbol_e]}/"
else:
template[f"{trg}@default"] = f"{path[idx + 1]}"
trg += f"{path[idx + 1]}/"
Expand Down
6 changes: 3 additions & 3 deletions src/pynxtools_apm/utils/generate_synthetic_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,9 @@ def place_atoms_from_periodic_table(self):
for idx in self.nrm_composition:
accept_reject.append(idx[3])
accept_reject = np.cumsum(accept_reject)
assert (
self.xyz != []
), "self.xyz must not be an empty dataset, create a geometry first!"
assert self.xyz != [], (
"self.xyz must not be an empty dataset, create a geometry first!"
)
# print("Accept/reject sampling m/q values for "
# + str(np.shape(self.xyz)[0]) + " ions")

Expand Down
5 changes: 1 addition & 4 deletions src/pynxtools_apm/utils/load_ranging.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,7 @@
def add_unknown_iontype(template: dict, entry_id: int) -> dict:
"""Add default unknown iontype."""
# all unidentifiable ions are mapped on the unknown type
trg = (
f"/ENTRY[entry{entry_id}]/atom_probe/ranging/"
f"peak_identification/ionID[ion0]/"
)
trg = f"/ENTRY[entry{entry_id}]/atom_probe/ranging/peak_identification/ionID[ion0]/"
ivec = create_nuclide_hash([])
template[f"{trg}nuclide_hash"] = np.asarray(ivec, np.uint16)
template[f"{trg}charge_state"] = np.int8(0)
Expand Down

0 comments on commit cf672b5

Please sign in to comment.