Skip to content

Commit 033e2db

Browse files
authored
Merge branch 'main' into felipenarv/refactored_unchained_labs_to_use_datacube
2 parents 991b31f + 185e540 commit 033e2db

6 files changed

Lines changed: 24 additions & 8 deletions

File tree

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ All notable changes to this packages will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.1.104] - 2025-08-29
9+
10+
### Added
11+
12+
- Luminex xPONENT - get unread data (#1059)
13+
- Unchained Labs Lunatic & Stunner - Add support for Stunner files (#1054)
14+
815
## [0.1.103] - 2025-08-18
916

1017
### Added

src/allotropy/__about__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.1.103"
1+
__version__ = "0.1.104"

src/allotropy/allotrope/allotrope.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from __future__ import annotations
22

3+
import copy
34
from typing import Any
45

56
import jsonschema
@@ -11,6 +12,12 @@
1112
AllotropeValidationError,
1213
)
1314

15+
# Override format checker to remove "uri-reference" check, which ASM schemas fail against.
16+
FORMAT_CHECKER = copy.deepcopy(
17+
jsonschema.validators.Draft202012Validator.FORMAT_CHECKER
18+
)
19+
FORMAT_CHECKER.checkers.pop("uri-reference", None)
20+
1421

1522
def serialize_and_validate_allotrope(model: Any) -> dict[str, Any]:
1623
try:
@@ -26,11 +33,11 @@ def serialize_and_validate_allotrope(model: Any) -> dict[str, Any]:
2633
raise AllotropeSerializationError(msg) from e
2734

2835
try:
29-
jsonschema.validate(
30-
allotrope_dict,
31-
allotrope_schema,
32-
cls=jsonschema.validators.Draft202012Validator,
36+
jsonschema.validators.Draft202012Validator.check_schema(
37+
allotrope_schema, format_checker=FORMAT_CHECKER
3338
)
39+
validator = jsonschema.validators.Draft202012Validator(allotrope_schema)
40+
validator.validate(allotrope_dict)
3441
except Exception as e:
3542
msg = f"Failed to validate allotrope model against schema: {e}"
3643
raise AllotropeValidationError(msg) from e

src/allotropy/allotrope/converter.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@
106106
"^": "_CARET_",
107107
"=": "_EQUALS_",
108108
"@": "_AT_",
109+
"'": "_QUOTE_",
109110
# NOTE: this MUST be at the end, or it will break other key replacements.
110111
" ": "_",
111112
}

src/allotropy/testing/utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ def _replace_asm_converter_version(allotrope_dict: DictType) -> DictType:
4545
"batch identifier",
4646
"data source identifier",
4747
"device identifier",
48+
"device method identifier",
4849
"experimental data identifier",
4950
"flow cell identifier",
5051
"group identifier",

tests/allotrope/converter_test.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,11 +135,11 @@ def test_custom_information_document() -> None:
135135
cycle_threshold_value_setting=TQuantityValueUnitless(value=1.0),
136136
),
137137
),
138-
{"extra key": "Value", "weird-key/(value)°": "Other value"},
138+
{"extra key": "Value", "$w.e\\ir:[d]-k'e~y/(v^a=l@ue)°#": "Other value"},
139139
)
140140

141141
assert item.custom_information_document.extra_key == "Value" # type: ignore
142-
assert item.custom_information_document.weird_DASH_key_SLASH__OPAREN_value_CPAREN__DEG_ == "Other value" # type: ignore
142+
assert item.custom_information_document._DOLLAR_w_POINT_e_BSLASH_ir_COLON__OBRACKET_d_CBRACKET__DASH_k_QUOTE_e_TILDE_y_SLASH__OPAREN_v_CARET_a_EQUALS_l_AT_ue_CPAREN__DEG__NUMBER_ == "Other value" # type: ignore
143143
asm_dict = unstructure(item)
144144
assert asm_dict == {
145145
"cycle threshold result": {"value": None, "unit": "(unitless)"},
@@ -148,7 +148,7 @@ def test_custom_information_document() -> None:
148148
},
149149
"custom information document": {
150150
"extra key": "Value",
151-
"weird-key/(value)°": "Other value",
151+
"$w.e\\ir:[d]-k'e~y/(v^a=l@ue)°#": "Other value",
152152
},
153153
}
154154
assert structure(asm_dict, ProcessedDataDocumentItem) == item

0 commit comments

Comments
 (0)