-
Notifications
You must be signed in to change notification settings - Fork 48
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
Support for both Brightway 2 and 2.5 #123
Conversation
There also might be some packaging weirdness, it seems to work for me now but |
Also, I don't know anything about how |
By experience, it's "easier" to produce a different conda package (see the ui package building ) |
import bw_processing | ||
|
||
from .brightway25 import write_brightway_database | ||
except ImportError: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion (non-blocking): It would be useful to warn the user if the import goes OK or (bw2) or wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added to todo
main branch has some fixes for the github actions to work fine now for packaging pypi pkgs and upload them to the registry. |
@cmutel the folowing
should return:
|
|
The dependency `sparse` is broken, it imports `Iterable` from collections which doesn't work.
2.5 Scores look good:
|
Brightway 2 results are also good!
|
@romainsacchi I think this is ready to merge. We can push a release like |
🔨 Work in progress 🔨
Factors out Brightway functionality, and imports the correct function depending on which version is installed.
pip install premise[bw25]
.conda
we might be able to do the same variant, or just create two different packages.To support this, I moved from
setup.py
topyproject.toml
. This also gives us:python -m build
)__init__.py
requirements.txt
pytest.ini
is removed)Note that 2.5 support requires
bw2data 4.0.DEV32
, which isn't yet released (will be in ~1 hour from this comment).We need some testing before this should be released. I have tested the 2.5 functionality, and it builds a matrix and gives a sensible result. However, it would be nice to have a known good result, and test both BW2 and BW2.5 scores. @romainsacchi Could you give a known good result please?
TODO
bw2data
version imported, and bw2/2.5