OldGrumpyViking / hatch-conda

Hatch plugin for conda environments
MIT License
38 stars 8 forks source link

env deps not syncing after env yaml modified #12

Open harelwa opened 1 year ago

harelwa commented 1 year ago

hi hi,

thank you very much for adding support to env yaml!

assuming an env is defined via env yaml, and was already created -

would you not expect syncing to occur after env yaml changes ? ( upon re-entry of course )

( i.e. behave the same as with regular / pypi deps )

From what i can see / experience now, it's not syncing.

Thanks! Harel

OldGrumpyViking commented 1 year ago

Hi, can you give an example to a change in the env yaml that does not sync.

I agree that it would be best if the sync_dependencies call first calls syncs with env yaml before calling pip install when the dependencies_in_sync returns False.

harelwa commented 1 year ago

hi, try any conda added dependency to env.yaml, and you’ll see — it does not update

kunaltyagi commented 11 months ago

I can confirm. Changing the env file doesn't update the env. It doesn't need any complicated setup.

name: test_conda

dependencies:
  - pip
  - pip:
    - pyyaml

Add any item to pip (or elsewhere) and confirm that the env is not updated

kunaltyagi commented 11 months ago

I think the issue is that sync_dependencies doesn't check if the conda file has been updated.

Similarly, dependencies_in_sync doesn't check if conda file is any different