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

Port over cdp_viewer.OutputViewer and remove cdp dependency #773

Merged
merged 2 commits into from
Jan 3, 2024

Conversation

tomvothecoder
Copy link
Collaborator

@tomvothecoder tomvothecoder commented Jan 3, 2024

Description

This PR ports over the cdp_viewer.OutputViewer module that is used by all of the viewer modules in e3sm_diags. It also removes the cdp dependency entirely from e3sm_diags. No other code was changed and the viewer output behaves the same.

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

If applicable:

  • New and existing unit tests pass with my changes (locally and CI/CD build)
  • I have added tests that prove my fix is effective or that my feature works
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have noted that this is a breaking change for a major release (fix or feature that would cause existing functionality to not work as expected)

- Update all references to `core_viewer.py` module
@tomvothecoder tomvothecoder changed the title Port cdp_viewer and remove cdp dependency Port over cdp_viewer.OutputViewer and remove cdp dependency Jan 3, 2024
@@ -300,7 +301,7 @@ def _run_with_dask(parameters: List[CoreParameter]) -> List[CoreParameter]:
https://docs.dask.org/en/stable/generated/dask.bag.map.html
https://docs.dask.org/en/stable/generated/dask.dataframe.DataFrame.compute.html
"""
bag = dask.bag.from_sequence(parameters)
bag = db.from_sequence(parameters)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

For some reason this modules throws AttributeError: module 'dask' has no attribute 'bag' even though the dask version is the same as main (dask=2023.12.1).

I don't know the root cause, but import dask.bag as db fixes the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cdat-migration-fy24 CDAT Migration FY24 Task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CDAT Migration Phase 2 - Port cdp.viewer.OutputViewer from cdp package
1 participant