Skip to content

EY25 Updates#6

Open
dt-woods wants to merge 24 commits into
NETL-RIC:mainfrom
KeyLogicLCA:main
Open

EY25 Updates#6
dt-woods wants to merge 24 commits into
NETL-RIC:mainfrom
KeyLogicLCA:main

Conversation

@dt-woods

@dt-woods dt-woods commented Apr 3, 2026

Copy link
Copy Markdown
Collaborator

This PR includes updates to the NetlOlca class along with helper functions to improve the utility of this Python package (e.g., logging and output folder existence checking). Class methods include parameter scanning and a slew of additional metadata extraction methods (e.g., actors, locations, flow properties) and utility functions (e.g., get default providers and find the quantitative reference flow). Additional methods were added in support of creating a derivative database (DD) from the Master LCA database, which may have applications in other openLCA databases.

frankhanna94 and others added 24 commits January 12, 2026 12:18
The additions consist of several functions to
generate a root entities dictionary for a derivative
database given a list of target process uuids.

The added functions are:
1- get_process_actors
2- get_process_dq_system
3- get_process_location
4- get_process_parameters
5- get_process_flows
6- get_process_flow_properties
7- get_default_providers
8- get_full_dd_root_entities_dict
9- OPTIONAL: get_dd_root_entities_dict

The last function doesnt return root entity
objects - but is fast to run and might be useful
in derivative database validation processes.
sped up searches for process parameter lists and processes that reference a given parameter (now searches exchange table formulas). Added amountFormula to exchange table return dictionary in get_flows, which should be parameter names or equations. Hotfix list_parameters to actually return parameters based on scope and type.
Refactor logging and set provider retrieval to True (not tunable).
This commit adds a log message that includes the number
of extra processes add to the produced root entities dictionary
in the get_full_dd_root_entities_dict method.
Replace thousands of query statements with a single get_all statement
Three new methods to support logging for NetlOlca---check_output_dir (creates .netlolca in the user's home directory), get_logger (for streaming and debug-level rotating file handler), rollover_logger (for rotating file handler). Methods are heavily based on ElectricityLCI utils.py
* Updated get_default_providers to accept a list of UUIDs
rather than a single UUID
* Updated the declaration of get_default_providers in
get_full_dd_root_entities_dict
* modified get_full_dd_root_entities_dict - added error
handling for bad requests - if uuid provided does not exist
in source database
Edits and expansions in support of creating derivative databases (DD), including several improvements and documentation additions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants