Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manage exchange names between activities #1243

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

marc-vdm
Copy link
Member

@marc-vdm marc-vdm commented Feb 21, 2024

Additional TODO:

  • Write all fields:
    • 'name': 'market for water, completely softened',
    • 'product': 'water, completely softened',
    • 'unit': 'kilogram',
    • 'location': 'RoW',
    • 'categories': None,
    • 'type': 'technosphere',
    • 'amount': 0.0,
    • 'input': ('ei39-remind-SSP2', '4c816450-1179-48fa-a590-ad295d60451c'),
    • 'output': ('ei39-remind-SSP2', '48591ed0-5887-4bcc-b1d4-af14dde5aa47')
  • Make sure all database imports in AB write exchanges properly

As discussed in #1242, AB give names to exchanges when they are created. Storing names in exchanges would be beneficial for:

  • Interoperability with lca_algebraic
  • Multifunctionality when implemented in the future, as exchanges will have the name of their product, which will help identify which MF product is used in an exchange

Storing these names costs us virtually nothing in code complexity or time when in use.

This PR does:

Additional notes:

  • I tested this with an activity that has downstream consumers (so is the source of an exchange)
    • I then edited the source product name, and the name is added to the exchange, even though it did not exist. This will not be a source of potential errors. I added this info into the docstring.

Checklist

  • Keep pull requests small so they can be easily reviewed.
  • Update the documentation, please follow the numpy style guide.
  • Update tests.
  • Categorize the PR by setting a good title and adding one of the labels:
    bug, feature, ui, change, documentation, breaking, ci
    as they show up in the changelog.
  • Link this PR to related issues by using closing keywords.
  • Add a milestone to the PR for the intended release.
  • Request a review from another developer.

…on creation and updates name when source product name is edited.
@marc-vdm marc-vdm added the change PRs related to minor changes to AB label Feb 21, 2024
@marc-vdm marc-vdm added this to the 2.9.7 milestone Feb 21, 2024
@coveralls
Copy link

coveralls commented Feb 21, 2024

Coverage Status

coverage: 50.568% (-0.08%) from 50.652%
when pulling eed37b0 on marc-vdm:store_exchange_name
into ffa5ad8 on LCA-ActivityBrowser:master.

@mrvisscher mrvisscher changed the title Manage exchange names between activities. Manage exchange names between activities Feb 22, 2024
@marc-vdm marc-vdm removed this from the 2.9.7 milestone Feb 22, 2024
@marc-vdm marc-vdm marked this pull request as draft February 22, 2024 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
change PRs related to minor changes to AB
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing "name" attribute in exchanges created with Activity Browser
2 participants