brightway-lca / brightway2-calc

The calculation engine for the Brightway2 life cycle assessment framework.
BSD 3-Clause "New" or "Revised" License
14 stars 16 forks source link

fix #57 test requirements and CI tests pull brightway2 #59

Closed tngTUDOR closed 2 years ago

tngTUDOR commented 2 years ago

merging this might need a version bump (not included in the commit).

tngTUDOR commented 2 years ago

this is in reference to issue #57

tngTUDOR commented 2 years ago

If this pipeline definition with azure succeeds, it could also be tested in relation to bw2calc issue 55

cmutel commented 2 years ago

This is amazing! I have been unable to understand why the pip tests weren't working, and of course it is a dumb, simple error.

However, I removed bw2calc from setup.py and requirements.txt on purpose - bw2calc should be usable without the rest of the ecosystem. Can you update the PR, it will be easier than me having to do it :)

tngTUDOR commented 2 years ago

This is amazing! I have been unable to understand why the pip tests weren't working, and of course it is a dumb, simple error.

However, I removed bw2calc from setup.py and requirements.txt on purpose - bw2calc should be usable without the rest of the ecosystem. Can you update the PR, it will be easier than me having to do it :)

Did you mean bw2data ?

I'll work this out.

tngTUDOR commented 2 years ago

removing bw2data from setup.py breaks the package: with:

...
install_requires=[
"bw_processing",
"matrix_utils",
"numpy",
"pandas",
"scipy",
"stats_arrays",
],
...
>>> import bw2calc as bc
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/code/bw2calc/__init__.py", line 55, in <module>
from .multi_lca import MultiLCA
File "/code/bw2calc/multi_lca.py", line 2, in <module>
from bw2data import calculation_setups
ModuleNotFoundError: No module named 'bw2data'

I'll revert the changes to setup.py and requirements and create a separate issue for this. -> issue #60

tngTUDOR commented 2 years ago

The solution for the pipelines to pass was to use a virtualenv for the ubuntu-20.04-pip based testing env.

tngTUDOR commented 2 years ago

@cmutel , I did not add a version bmp to the PR, and I decided to keep the bw2data dependency because otherwise, the package would be broken (see comment above).

60 has the issue explaining why we cannot remove bw2data from deps (MultiLCA needs it)

I think we can merge this, without releasing, then update MultiLCA to not depend on bw2data [if at all possible] and then do the bump.