Skip to content

Commit a461e79

Browse files
authored
Merge pull request #25 from BAMresearch/modifying_databundle_and_associates
cleanup of databundle and adding pipelinedata
2 parents ef41f5a + 2015907 commit a461e79

File tree

2 files changed

+19
-14
lines changed

2 files changed

+19
-14
lines changed

src/modacor/dataclasses/databundle.py

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,6 @@
88
__status__ = "Production" # "Development", "Production"
99

1010

11-
# add a validator that checks if the keys in the axes list are in the data dictionary
12-
def validate_axes(instance, attribute, value):
13-
"""
14-
Custom validator to check if the keys in the axes list are in the data dictionary.
15-
"""
16-
if not all(key in instance.data for key in value):
17-
raise ValueError(
18-
f"""Missing axes must be present in data dictionary
19-
: {set(value) - set(instance.data.keys())}"""
20-
)
21-
return True
22-
23-
2411
class DataBundle(dict):
2512
"""
2613
DataBundle is a specialized data class for storing related data.
@@ -31,5 +18,5 @@ class DataBundle(dict):
3118
"""
3219

3320
description: str | None = None
34-
# as per NXcanSAS, matches the data dimensions to axes
21+
# as per NXcanSAS, tells which basedata to plot
3522
default_plot: str | None = None
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# src/modacor/dataclasses/pipelinedata.py
2+
# -*- coding: utf-8 -*-
3+
__author__ = "Brian R. Pauw"
4+
__copyright__ = "MoDaCor team"
5+
__license__ = "BSD3"
6+
__date__ = "22/05/2025"
7+
__version__ = "20250522.1"
8+
__status__ = "Production" # "Development", "Production"
9+
10+
11+
class PipelineData(dict):
12+
"""
13+
Contains a collection of DataBundles used in a given pipeline
14+
"""
15+
16+
description: str | None = None
17+
# as per NXcanSAS, tells which basedata to plot
18+
default_plot: str | None = None

0 commit comments

Comments
 (0)