Replies: 3 comments 3 replies
-
|
For the Orphaned Process Test, here's an example: jsonld_path = input("Enter JSON-LD file path: ")
json_d = _init_root_entities(jsonld_path)
providers = []
# Go through processes and get all providers
for p in json_d['Process']['objs']:
for e in p.exchanges:
if e.default_provider:
providers.append(e.default_provider.id)
# Go through each product system and add its reference process
for p in json_d['ProductSystem']['objs']:
providers.append(p.ref_process.id)
# Remove duplicates and sort
providers = sorted(list(set(providers)))
# Orphans are processes that are not in the providers list.
orphans = [x for x in json_d['Process']['ids'] if x not in providers]
num_orphan = len(orphans)Note that running this on the output from #298 returned 68 orphaned processes.
|
Beta Was this translation helpful? Give feedback.
-
|
A check on the generation processes for duplicate exchange elementary flows? I don't believe as it stands there is any reason to have an elementary flow listed twice (though we might expect duplicate technosphere flows, e.g., natural gas from multiple basins) |
Beta Was this translation helpful? Give feedback.
-
|
I put together these tests into a single script. There are nine checks. The output looks like: The four tests that failed include the orphan processes that I posted above and the BA process counts. BA Process CountsIn at grid; generation mixes only:
in consumption mixes, but not generation mixes
Non-unique FEDEFL flows or missing emissionsLooks like 7 of the 185 processes have no emissions; the rest have some sort of duplicated elementary flow.
No Power Plant Construction
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
As I review the code over and over, I thought it might be wise to consider developing unit tests for the eLCI.
Here are some quick thoughts on what could be tested:
Any other ideas?
Beta Was this translation helpful? Give feedback.
All reactions