@@ -47,7 +47,7 @@ def _asdict(self) -> dict:
4747 from ..__init__ import __version__
4848
4949 dfrct = self .diffractometer # local shortcut
50- config = {
50+ config = { # TODO: move to operator._asdict()
5151 "_header" : {
5252 "datetime" : str (datetime .datetime .now ()),
5353 "energy_units" : dfrct ._wavelength .energy_units ,
@@ -74,7 +74,8 @@ def export(self, file, comment=""):
7474 e4cv.operator.configuration.export("e4cv-config.yml", comment="example")
7575 """
7676 path = pathlib .Path (file )
77- config = self ._asdict ()
77+ config = self ._asdict () # TODO: call operator._asdict() directly
78+ # TODO: could pass additional header content as kwargs
7879 config ["_header" ]["file" ] = str (file )
7980 config ["_header" ]["comment" ] = str (comment )
8081 dump = yaml .dump (
@@ -162,7 +163,7 @@ def compare(incoming, existing, template):
162163 "engine mismatch: incoming=%r existing=%r" ,
163164 )
164165 compare (
165- config .get ("geometry" ),
166+ config .get ("geometry" ), # TODO: geometry belongs in solver section
166167 self .diffractometer .operator .solver .geometry ,
167168 "geometry mismatch: incoming=%r existing=%r" ,
168169 )
0 commit comments