You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix/v0.2.0 bugs testing and error path detection (#10)
* fix: normalize vendor-specific JSON keys to canonical schema names
Adds tests on the resolution provided to #5 which was causing report generation to fail.
* test: scaffold pytest harness with synthetic pattern fixtures
* fix(parser): guard calculate_top_3db_point against missing -3dB crossing
* fix(parser): reject unknown source coordinate systems instead of silent no-op
* fix(parser): use equality not substring check for internal coord system
* fix(report): use relative imports to break circular dependency
* fix(parser): guard beam efficiency against zero overall power
* fix(parser): validate Data_Set is non-empty on init
* fix: replace deprecated importlib.resources APIs (removed in 3.14)
* fix(report): use module logger instead of root logger
* fix(parser): reject out-of-range theta after coordinate transform
* test(parser): pin phi-boundary consistency across coord transforms (bug 42 non-repro)
* fix(parser): use theta grid step instead of hardcoded 1deg in 3dB search
* fix(parser): reject out-of-range phi after coordinate transform
* fix(parser): raise when validation requested but schema unavailable
* fix(report): guard empty subband list before pd.concat
* fix(report): surface skipped files and fail clearly when all skipped
* fix(parser): show zero values in __str__ using is-not-None check
* refactor(parser): collapse coordinate-transform dispatch into lookup table
* style: keep string literals on single lines for greppability
* test(parser): add _normalize_json vendor-key tests (issue #5)
full_error_message=f"Antenna data validation FAILED for '{self.data_filepath}'.\nSchema source: '{NGMNSchema.source_message}'.\nError at data path: '{error_path_str}'.\nValidation Message: {e.message} (Validator: '{e.validator}')"
f"AntennaPattern: Coordinate system {self.coordinate_system} not used for calculations. Transforming 'Pattern_3D' attribute to {DEFAULT_INTERNAL_COORD_SYSTEM}."
f"AntennaPattern: Transformed theta out of range [0, 180] ([{new_theta.min()}, {new_theta.max()}]) converting from '{from_system}'. Input data is likely out of spec for that system."
542
+
)
543
+
raiseValueError(
544
+
f"AntennaPattern: Transformed theta out of range [0, 180] ([{new_theta.min()}, {new_theta.max()}]) converting from '{from_system}'. Input data is likely out of spec for that system."
545
+
)
546
+
new_phi=Pattern_3D.coords["Phi"].values
547
+
ifnew_phi.min() <-180ornew_phi.max() >179:
548
+
logger.error(
549
+
f"AntennaPattern: Transformed phi out of range [-180, 179] ([{new_phi.min()}, {new_phi.max()}]) converting from '{from_system}'. Input data is likely out of spec for that system."
550
+
)
551
+
raiseValueError(
552
+
f"AntennaPattern: Transformed phi out of range [-180, 179] ([{new_phi.min()}, {new_phi.max()}]) converting from '{from_system}'. Input data is likely out of spec for that system."
f"Path for sample '{item_name}' in '{__package__}' "
26
-
f" ('{resolved_path}') was not a file after context. Skipping."
23
+
f"Path for sample '{resource.name}' in '{__package__}' ('{resolved_path}') was not a file after context. Skipping."
27
24
)
28
25
exceptFileNotFoundError:
29
26
logger.warning(
30
-
f"Sample file '{item_name}' listed but not found by "
31
-
f"importlib.resources.path in '{__package__}'. Skipping."
27
+
f"Sample file '{resource.name}' listed but not found by importlib.resources in '{__package__}'. Skipping."
32
28
)
33
29
exceptExceptionase_path:
34
30
logger.error(
35
-
f"Error resolving path for sample '{item_name}' in '{__package__}': {e_path}"
31
+
f"Error resolving path for sample '{resource.name}' in '{__package__}': {e_path}"
36
32
)
37
33
38
34
ifSAMPLE_JSON:
@@ -41,9 +37,7 @@
41
37
)
42
38
else:
43
39
logger.debug(
44
-
f"No .json sample files found or resolved in '{__package__}'. "
45
-
"Ensure files exist, have .json extension, and 'include' "
46
-
"in pyproject.toml is correct for 'sample_data/*.json'."
40
+
f"No .json sample files found or resolved in '{__package__}'. Ensure files exist, have .json extension, and 'include' in pyproject.toml is correct for 'sample_data/*.json'."
0 commit comments