dask-contrib / dask-ctl

Tools to provide a control plane for managing the lifecycle of Dask clusters.
https://dask-ctl.readthedocs.io
BSD 3-Clause "New" or "Revised" License
24 stars 14 forks source link

2022.2.0 won't import due to missing config file #25

Closed alisterburt closed 2 years ago

alisterburt commented 2 years ago

Me again, seems like some files didn't make it into the released package for 2022.2.0

I also noticed that the release action ran despite failing tests - will PR a dependency so that this can't happen in future

Python 3.9.10 | packaged by conda-forge | (main, Feb  1 2022, 21:24:37)
Type 'copyright', 'credits' or 'license' for more information
IPython 8.0.1 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import dask_ctl
---------------------------------------------------------------------------
FileNotFoundError                         Traceback (most recent call last)
Input In [1], in <module>
----> 1 import dask_ctl

File ~/mambaforge/envs/dask-ctl/lib/python3.9/site-packages/dask_ctl/__init__.py:6, in <module>
      3 __version__ = get_versions()["version"]
      4 del get_versions
----> 6 from . import config
      8 from .discovery import (
      9     discover_cluster_names,
     10     discover_clusters,
     11     list_discovery_methods,
     12 )
     13 from .lifecycle import (
     14     get_cluster,
     15     create_cluster,
   (...)
     19     get_snippet,
     20 )

File ~/mambaforge/envs/dask-ctl/lib/python3.9/site-packages/dask_ctl/config.py:9, in <module>
      6 fn = os.path.join(os.path.dirname(__file__), "ctl.yaml")
      7 dask.config.ensure_file(source=fn)
----> 9 with open(fn) as f:
     10     defaults = yaml.safe_load(f)
     12 dask.config.update_defaults(defaults)

FileNotFoundError: [Errno 2] No such file or directory: '/lmb/home/aburt/mambaforge/envs/dask-ctl/lib/python3.9/site-packages/dask_ctl/ctl.yaml'
jacobtomlinson commented 2 years ago

The test failures appear to be issues with the tests themselves, so I have no issues with the release going out.

It's weird that it is complaining about ctl.yaml not being included, we include all YAML in the MANIFEST.in.

https://github.com/dask-contrib/dask-ctl/blob/c618df40f29ec06fd8268bdfd5f87acbb4e3496b/MANIFEST.in#L3

@jakirkham would you mind taking a quick look here, I'm not sure why the YAML files are not being included in the distribution. I'm probably missing something obvious.

alisterburt commented 2 years ago

had a quick look at the docs, it seems like MANIFEST controls what is included in with sdist files but not what is included with the package itself

This stackoverflow question indicates that we need to reference the yaml files in the package_data entry - I'll test and put together a PR

jacobtomlinson commented 2 years ago

Hopefully 2022.2.1 will have this fixed.