@@ -167,6 +167,7 @@ def __init__(self, working_dir, log_file=None, log_level=0, include_git_info=Fal
167
167
self .meta_history = []
168
168
self .all_xtals = None
169
169
self .rejected_xtals = set ()
170
+ self .all_excludes = set ()
170
171
self .new_or_updated_xtals = None
171
172
self .compound_codes = {}
172
173
self .compound_smiles = {}
@@ -185,7 +186,10 @@ def __init__(self, working_dir, log_file=None, log_level=0, include_git_info=Fal
185
186
for input in inputs :
186
187
# Determine which datasets to exclude
187
188
excluded_datasets = utils .find_property (input , Constants .CONFIG_EXCLUDE )
188
- if not excluded_datasets :
189
+ if excluded_datasets :
190
+ for excl in excluded_datasets :
191
+ self .all_excludes .add (excl )
192
+ else :
189
193
excluded_datasets = []
190
194
191
195
input_path = utils .find_path (input , Constants .CONFIG_DIR )
@@ -386,6 +390,9 @@ def validate_data(self):
386
390
if git_info :
387
391
meta [Constants .META_GIT_INFO ] = git_info
388
392
393
+ if self .all_excludes :
394
+ meta [Constants .META_EXClUDES ] = list (self .all_excludes )
395
+
389
396
tooltips = {}
390
397
for input in self .inputs :
391
398
code_prefix = input .code_prefix
@@ -1242,21 +1249,6 @@ def _munge_history(self, meta):
1242
1249
new_or_updated_xtals [xtal_name ] = xtal_data
1243
1250
all_xtals [xtal_name ] = xtal_data
1244
1251
1245
- # look for any user defined deprecations
1246
- xtal_override = overrides .get (Constants .META_XTALS , {}).get (xtal_name , {})
1247
- if xtal_override :
1248
- status_override = xtal_override .get (Constants .META_STATUS )
1249
- if status_override :
1250
- xtal_data [Constants .META_STATUS ] = status_override
1251
- reason = xtal_override .get (Constants .META_STATUS_REASON )
1252
- self .logger .info (
1253
- "status for xtal {} is overridden by user to be {}" .format (xtal_name , status_override )
1254
- )
1255
- if reason :
1256
- xtal_data [Constants .META_STATUS_REASON ] = reason
1257
- else :
1258
- self .logger .warn ("status is overridden, but no reason was given" )
1259
-
1260
1252
self .logger .info ("metadata {} has {} items" .format (count , total ))
1261
1253
self .logger .info (
1262
1254
"munging resulted in {} total xtals, {} are new or updated" .format (
@@ -1453,6 +1445,7 @@ def main():
1453
1445
+ str (wd )
1454
1446
)
1455
1447
else : # couldn't even create the Collator object so log file will contain nothing useful
1448
+ print (tb )
1456
1449
print (
1457
1450
"Unexpected fatal error occurred, most likely the configuration is wrong or collator was invoked "
1458
1451
+ "incorrectly. Please send the command you ran and your current directory to the developers."
0 commit comments