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

fix iterator over exchanges #163

Merged
merged 2 commits into from
Mar 15, 2024

Conversation

mfastudillo
Copy link
Contributor

otherwise it gives an error when trying to loop over the exchanges e.g. list(act.exchanges()). I can create a test if needed.

@BenPortner
Copy link
Member

BenPortner commented Mar 13, 2024

Hi @mfastudillo, thank you very much for your contribution! A test in addition to the code change would be formidable :)

@BenPortner
Copy link
Member

BenPortner commented Mar 15, 2024

@mfastudillo Unless I made a mistake, I believe this test also works before the fix. Could you implement a test that fails pre-fix and succeeds post-fix?

Edit: I implemented a test and will push it.

@BenPortner BenPortner merged commit 1be482d into brightway-lca:main Mar 15, 2024
1 check passed
@mfastudillo
Copy link
Contributor Author

mfastudillo commented Mar 16, 2024

Thanks @BenPortner , indeed the test I created was working also without the change. I am not entirely sure what was causing the resource not to have the matrix. I thought maybe defining the "extra biosphere db" (mouse) and forgetting to set the type as emission but I tried this morning and it didn't seem to be the problem

@BenPortner
Copy link
Member

@mfastudillo I was wondering the same thing. Calling the write_exchanges method without any biosphere exchanges reproduces the error but this shouldn't happen with a real IOTable. Perhaps this hints at another error?

@mfastudillo mfastudillo deleted the fix_iotable_backend branch March 18, 2024 10:21
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.

None yet

2 participants