Skip to content

Commit

Permalink
fix(io.plugins.merlin): fix match signature
Browse files Browse the repository at this point in the history
  • Loading branch information
kmnhan committed Nov 22, 2024
1 parent 9e38b2c commit 5586cce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/erlab/io/plugins/merlin.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def identify(self, num: int, data_dir: str | os.PathLike):
with motor_file.open(encoding="utf-8") as f:
header = f.readline().strip().split("\t") # motor coordinate names

if coord_arr.ndim < 1:
if coord_arr.ndim <= 1:
coord_arr = coord_arr.reshape(-1, 1) # ensure 2D

if len(files) > coord_arr.shape[0]:
Expand Down Expand Up @@ -181,7 +181,7 @@ def identify(self, num: int, data_dir: str | os.PathLike):

def infer_index(self, name: str) -> tuple[int | None, dict[str, Any]]:
try:
match_scan = re.match(r".*?(\d{3})(?:_S\d{3})?", name)
match_scan = re.match(r".*?(\d{3})(?:_S\d{3})", name)
if match_scan is None:
return None, {}

Expand Down
4 changes: 2 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@

from erlab.io.exampledata import generate_data_angles, generate_gold_edge

DATA_COMMIT_HASH = "2a3cce968084aabaaf7a9f7b5c79b366bfca7ae8"
DATA_COMMIT_HASH = "bd2c597a49dfbcb91961bef3dcf988179dbe1151"
"""The commit hash of the commit to retrieve from `kmnhan/erlabpy-data`."""

DATA_KNOWN_HASH = "a2d2d89b8c33ff04b2f9eec7d1e3cb11fee02242c37a21180623611f2d45cdb7"
DATA_KNOWN_HASH = "434534c4e4d595aac073860289e2fcee09b31ca7655cb9b68a6143e34eecbae4"
"""The hash of the `.tar.gz` file."""


Expand Down

0 comments on commit 5586cce

Please sign in to comment.