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

Fix Dask scheduler Client import error #1063

Merged

Conversation

mattw-nws
Copy link
Contributor

Description

Introduced in #967, f863b48, tethys_compute/models/dask/dask_scheduler.py , the changed code has lowercase client instead of Client, which imports the module instead of the class, resulting in a TypeError: 'module' object is not callable error.

Changes Made to Code:

  • Client = optional_import("client", from_module="dask.distributed") ➡️ Client = optional_import("Client", from_module="dask.distributed")

Related

Additional Notes

  • This bug might not appear on macOS HFS+/APFS because of case-insensitive filesystems? But I'm seeing it on Windows. I'm guessing this is the case everywhere though.

Quality Checks

  • New code is 100% tested
  • Code has been formated
  • Code has been linted
  • Docstrings for new methods have been added

Copy link
Contributor

@shawncrawley shawncrawley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This review couldn't have been simpler. The change looks good to me.

@coveralls
Copy link

Coverage Status

coverage: 100.0%. remained the same
when pulling c3f5349 on mattw-nws:bug-dask-scheduler-module-not-callable
into 8680dcf on tethysplatform:main.

@swainn swainn merged commit 442d38e into tethysplatform:main Jul 5, 2024
25 of 34 checks passed
@sdc50 sdc50 added the bugfix label Nov 27, 2024
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 this pull request may close these issues.

5 participants