conda-incubator / conda-store

Data science environments, for collaboration. ✨
https://conda.store
BSD 3-Clause "New" or "Revised" License
143 stars 46 forks source link

[BUG] - Python docker should be a conditional import #627

Closed trallard closed 11 months ago

trallard commented 11 months ago

Describe the bug

Right now we cannot create the feedstock for non-linux OSs (see https://github.com/conda-forge/conda-store-feedstock/pull/30)

We'd need turn the from python_docker.registry import Image, Registry import into a conditional one in https://github.com/conda-incubator/conda-store/blob/ccbb2980b66c87d2e57e3bf6bb23edd0039804dc/conda-store-server/conda_store_server/app.py#L82C1-L87C6

Expected behavior

Calling conda-store --help should work for Linux and OSX

How to Reproduce the problem?

  1. Install conda-store locally in OSX
  2. Run conda-store --help

Output

No response

Versions and dependencies used.

v 2023.9.2

Anything else?

No response

asmeurer commented 11 months ago

The reason I had not fixed this is that python-docker (unlike conda-docker) can be installed on Mac and Windows. So even if it doesn't do anything, having it there doesn't cause any issues.

nkaretnikov commented 11 months ago

Related: https://github.com/conda-incubator/conda-store/issues/630, https://github.com/conda-incubator/conda-store/issues/631

nkaretnikov commented 11 months ago

@trallard I'm having trouble reproducing this.

The instructions mentioning code deal with conda-store-server, but the repro mentions conda-store. How are these related? Where does it cause issues?

Also, I've tried from python_docker.registry import Image, Registry in a Python interpreter on x86_64 mac. It worked fine. I was testing inside conda-store-server-dev. Tested on 01ef8962f48bbfa21197301619511aa0857c8e76.

Finally, see the other two issues mentioned in the comment above.

jaimergp commented 11 months ago

Yep, maybe this is just a matter of adding it as a dependency in pyproject.toml too to inform the conda-forge bots about this dep (comes from https://github.com/conda-incubator/conda-store/pull/524#issuecomment-1768207834).