Skip to content
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

Resolving new CLI bug #145

Closed
1 task done
quasiben opened this issue Oct 25, 2022 · 3 comments · Fixed by #146
Closed
1 task done

Resolving new CLI bug #145

quasiben opened this issue Oct 25, 2022 · 3 comments · Fixed by #146
Labels

Comments

@quasiben
Copy link
Member

Solution to issue cannot be found in the documentation.

  • I checked the documentation.

Issue

For resolving dask/distributed#7176 I think we want to change the entry point: https://github.com/conda-forge/dask-core-feedstock/blob/main/recipe/meta.yaml#L16-L17

I think it should be

  • dask = dask.cli:main

To test this I manually changed the dask bin as following:

# -*- coding: utf-8 -*-
import re
import sys

from dask.cli import cli
from dask.__main__ import main

if __name__ == '__main__':
    sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
    sys.exit(main())

cc @jrbourbeau @charlesbluca @jakirkham

Installed packages

dask                      2022.10.0          pyhd8ed1ab_2    conda-forge
dask-core                 2022.10.0          pyhd8ed1ab_1    conda-forge
distributed               2022.10.0          pyhd8ed1ab_2    conda-forge

Environment info

(new-dask) quasiben@DirtyHorseZ:~/miniconda3/envs/new-dask/bin$ conda info

     active environment : new-dask
    active env location : /home/quasiben/miniconda3/envs/new-dask
            shell level : 3
       user config file : /home/quasiben/.condarc
 populated config files : /home/quasiben/.condarc
          conda version : 22.9.0
    conda-build version : not installed
         python version : 3.8.13.final.0
       virtual packages : __cuda=11.5=0
                          __linux=5.4.0=0
                          __glibc=2.31=0
                          __unix=0=0
                          __archspec=1=x86_64
       base environment : /home/quasiben/miniconda3  (writable)
      conda av data dir : /home/quasiben/miniconda3/etc/conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/linux-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://repo.anaconda.com/pkgs/main/linux-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/linux-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /home/quasiben/miniconda3/pkgs
                          /home/quasiben/.conda/pkgs
       envs directories : /home/quasiben/miniconda3/envs
                          /home/quasiben/.conda/envs
               platform : linux-64
             user-agent : conda/22.9.0 requests/2.28.1 CPython/3.8.13 Linux/5.4.0-126-generic ubuntu/20.04.1 glibc/2.31
                UID:GID : 1000:1000
             netrc file : None
           offline mode : False
@quasiben quasiben added the bug label Oct 25, 2022
@charlesbluca
Copy link
Member

charlesbluca commented Oct 25, 2022

Haven't been keeping up with some of the larger changes to the CLI, but glancing at cli.py looks like we might want the entrypoint to be dask.cli:run_cli, since that's the function that seems to be discovering and registering entrypoints before running cli().

EDIT:

Tried out the fix locally by modifying the dask bin:

#!/raid/charlesb/mambaforge/envs/test-dask-cli/bin/python3.10
# -*- coding: utf-8 -*-
import re
import sys

from dask.cli import run_cli

if __name__ == '__main__':
    sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
    sys.exit(run_cli())

And opened #146 making the change to the recipe; I can rebuild packages locally to verify if this resolves the bug

@quasiben
Copy link
Member Author

run_cli also works for me cc @douglasdavis

@douglasdavis
Copy link
Member

Thanks for the ping! Looks like we've all been tinkering in the same area. I opened up conda-forge/dask-feedstock#200 almost at the same time 😛

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants