LCA-ActivityBrowser / activity-browser

GUI for brightway2
GNU Lesser General Public License v3.0
142 stars 54 forks source link

Conda package resolution, broken AB conda installs #128

Closed haasad closed 6 years ago

haasad commented 6 years ago

Peewee recently released a new version, which has breaking changes for brightway2. This breaks conda installs for the AB. See detailed description here: https://github.com/cmutel/conda-recipes/issues/3

Currently all installs for all version of the AB are broken, ie it's not possible to install the activity browser without manually specifying the correct version numbers for brightway2 and/or peewee.

haasad commented 6 years ago

@bsteubing, is it okay for you if I "fix" this and also bump the AB version? Ie do you think we're at a point where we can release a new stable version? Otherwise I need to rebuild the the current version with a new conda recipe which could be a mess.

bsteubing commented 6 years ago

Hi Adrian, I am not sure I understand you 100%. Are you suggesting to also pin peewee to < 3? Or to pin brightway to < 2.1.2?

haasad commented 6 years ago

In theory we could also pin peewee, but this would break again if brightway2 were to be updated to work with peewee 3. I already pinned brightway to >= 2.1.2 in #129.

I can't really show you the direct effect of the pinning because there was a second unrelated problem with pytest that broke the CI tests. But see eg this build for failure due to peewee 3.1.5 and the recent master build where brightway is pinned and therefore peewee is kept below 3.

The problem that now remains is the "official" version of the AB on the conda channel. The pinning will only take effect for new builds, which means conda install activity-browser is currently still broken until it's rebuilt with the new recipe. But the recipe is also part of the repo and version 2.2.2 is tagged as a specific state of the repo at that time. Therefore I feel it would be cleaner to fix this with a new version, ie 2.2.3 right away. The other option is that I rebuild the repo state at 2.2.2 with an updated recipe, without putting it on github. But I'd prefer the first option.

bsteubing commented 6 years ago

Fine for me to move one version ahead to 2.2.3! Thanks for having looked into this!

cmutel commented 6 years ago

I wouldn't call this dependency hell, as it is easily resolved. Pinning against specific versions is not all that controversial, and is even recommended as best practice by some. I have started the process of adapting to the changes in peewee 3.0, but it is a bit harder than I thought, so it will take a few days.

haasad commented 6 years ago

What really bothered me is this:

conda install activity-browser
Solving environment: \ 
Warning: 2 possible package resolutions (only showing differing packages):
  - cmutel::brightway2-2.1.2-py_0, conda-forge::peewee-2.10.2-py36_0
  - cmutel::brightway2-2.1.1-py_1, conda-forge::peewee-3.1.5-py36done
cmutel commented 6 years ago

Fair enough. I removed Brightway < 2.1.2 from conda.org, so at least that problem should go away...

haasad commented 6 years ago

Ok, that's great! I think removing Brightway < 2.1.2 is the only option that you have to completely solve this on your end. And just so we don't have a misunderstanding here: I didn't want to imply in any way that this was your fault or a problem of brightway (bad issue title). I think this is unexpected behavior of conda, ie. the package resolution should respect when you pin the version of a dependency further down in the dependency tree.

cmutel commented 6 years ago

On 3 April 2018 at 13:48, haasad notifications@github.com wrote:

And just so we don't have a misunderstanding here: I didn't want to imply in any way that this was your fault or a problem of brightway (bad issue title).

No worries! I think you were right - I didn't realize it would give you a choice and default to the older version. So this was at least a mini-hell :)