Closed janssenhenning closed 1 year ago
@janssenhenning are you still planning to complete this PR?
@ltalirz Yes I think this would be useful to finish up, since we already use it with a lot of success for veryfying that our plugins work with aiida 1.0 and 2.0
I cleaned the formatting up a bit and added some explanations to the now quite convoluted mokeypatching code What I'm not quite sure on is how and whether I could write more fine-grained tests for these fixtures
As with #57 I have no idea what to do about the test failures
Cheers! I'll try to find the time to have a look at this over the weekend
Superseded by #67
Based on #29
These are improvements on top of the initial
export_cache
fixtures that were written by me and @PhilippRue to be able to runaiida-fleur
andaiida-kkr
workflow tests with both aiida v1 and v2.Notable changes from #29
load_cache
,export_cache
andhash_code_by_entrypoint
are cross-compatible between AiiDA versions 1.X and 2.Xwith_export_cache
etc. is relative, it is either interpreted relative to the default cache dir (see below) or if not specified toPath(request.fspath.dirname) / 'caches'
, i.e. in the same directory as the test file--export-cache-allow-migration
flag, which attempts to migrate archives if they are not compatibledefault_data_dir
: if specified caches with relative paths are placed herecalcjob_ignored_inputs/calcjob_ignored_attributes
: Additional things to exclude from calcjob hashes. Between v1 and v2 for example the metadata optionenvironment_variables_double_quotes
has to be ignorednode_ignored_attributes
: dict, where data nodes (specified by entry point) can ignore additional attributesThe ignoring of things like
environment_variables_double_quotes
is not ideal, but I think being explicit with this is better for now.