Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Migration data and utilities for Brightway IO and LCA in general
Most databases use their own nomenclature for classification systems, units, etc. These systems need to be matched when linking from one database to another. Often, a simple mapping is suitable, and tools like correspondentia are a good fit. However, sometimes one needs more complexity, e.g. change field X to Y, but only if field A has value B. When ecoinvent released version 3, they changed their unit of mesaure for water from kilograms to cubic meters. bw_migrations
provides tools for this more complicated transformations, and is built around the following data format:
{
# The fields on which to filter
'fields': ['name', 'category', 'unit'],
'data': [
(
# First element is input data in the order of `fields` above
('Water', 'air', 'kilogram'),
# Second element is new values to substitute when all fields match
{
'unit': 'cubic meter',
'__multiplier__': 0.001
}
)
]
}
And is implemented with the following pseudo-code:
for element in input_data:
for original, new in migration['data']:
if all(element[field] == original[field] for field in migration['fields']):
element.update(dict(zip(migration['fields'], new)))
The actual code is a bit more complex, as bw_migrations
can also do rescaling of probability distributions and disaggregation migrations (splitting one object into several outputs).
FAQs
Migration data and utilities for Brightway IO and LCA in general
We found that bw-migrations demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.