EY25 Updates#6
Open
dt-woods wants to merge 24 commits into
Open
Conversation
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.
Parameter updates et al.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.