Skip to content

Conversation

@ahmadtourei
Copy link
Collaborator

Description

This PR implements a detailed AttributeError when Spool.viz is used, directing users to use Patch.viz instead for data visualization.

Checklist

I have (if applicable):

  • referenced the GitHub issue this PR closes.
  • documented the new feature with docstrings or appropriate doc page.
  • included a test. See testing guidelines.
  • your name has been added to the contributors page (docs/contributors.md).
  • added the "ready_for_review" tag once the PR is ready to be reviewed.

@d-chambers
Copy link
Contributor

Thanks for opening a new PR @ahmadtourei.

Ok, so I didn't understand why raising a custom AttributeError when a spool.viz is accessed is not sufficient here?

eg

@property
def viz(self):
    raise AttributeError("spool has no viz namespace, perhaps you meant Patch.viz?")

Maybe you are envisioning adding spool visualization methods? In that case we might need to support the spool.viz namespace and just raise when .waterfall is accessed to address the mistake in the dascore diagram?

@ahmadtourei
Copy link
Collaborator Author

Thanks for opening a new PR @ahmadtourei.

Ok, so I didn't understand why raising a custom AttributeError when a spool.viz is accessed is not sufficient here?

eg

@property
def viz(self):
    raise AttributeError("spool has no viz namespace, perhaps you meant Patch.viz?")

Maybe you are envisioning adding spool visualization methods? In that case we might need to support the spool.viz namespace and just raise when .waterfall is accessed to address the mistake in the dascore diagram?

Agreed. The problem was the test I implemented. Please have a look at the new test and let me know if it looks good.

@ahmadtourei ahmadtourei marked this pull request as ready for review August 21, 2024 23:23
Copy link
Contributor

@d-chambers d-chambers left a comment

Choose a reason for hiding this comment

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

Looks good.

If we want to make spool viz method later we can always modify this.

@d-chambers
Copy link
Contributor

The test failures are a problem with the macos scipy build and nothing related to your changes. I will try to take a look tomorrow

@ahmadtourei ahmadtourei added the spool related to Spool class label Aug 23, 2024
@codecov
Copy link

codecov bot commented Aug 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.84%. Comparing base (cfce558) to head (5b9c56e).
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #425      +/-   ##
==========================================
+ Coverage   99.28%   99.84%   +0.56%     
==========================================
  Files         112      112              
  Lines        9028     9032       +4     
==========================================
+ Hits         8963     9018      +55     
+ Misses         65       14      -51     
Flag Coverage Δ
unittests 99.84% <100.00%> (+0.56%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ahmadtourei
Copy link
Collaborator Author

The test failures are a problem with the macos scipy build and nothing related to your changes. I will try to take a look tomorrow

Thanks for the discussion on debugging test failures today! All tests pass.

@ahmadtourei ahmadtourei merged commit f4f6947 into master Aug 23, 2024
@ahmadtourei ahmadtourei deleted the raise_spool.viz branch August 23, 2024 00:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

spool related to Spool class

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants