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

Updated "Use __dict__ and ignore __slots__ on classes #169 #181

Merged
merged 8 commits into from Jan 27, 2024

Conversation

kylefawcett
Copy link
Contributor

Fixes #168 and adds test case to prevent regression

Copy link

codecov bot commented Dec 19, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (7c57ce1) 89.87% compared to head (5904a17) 90.24%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #181      +/-   ##
==========================================
+ Coverage   89.87%   90.24%   +0.36%     
==========================================
  Files          27       28       +1     
  Lines        1146     1179      +33     
==========================================
+ Hits         1030     1064      +34     
+ Misses        116      115       -1     

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

CHANGES.rst Outdated Show resolved Hide resolved
Co-authored-by: P. L. Lim <2090236+pllim@users.noreply.github.com>
@kylefawcett kylefawcett marked this pull request as ready for review December 19, 2023 18:56
@bsipocz bsipocz added this to the 0.17.0 milestone Dec 19, 2023
@pllim pllim requested a review from bsipocz December 19, 2023 19:21
@pllim
Copy link
Member

pllim commented Dec 19, 2023

@Nodd , do you want to have a look at the added tests?

Thanks, all!

@kylefawcett
Copy link
Contributor Author

@pllim Circling back around on this. I just cleaned up the slots example module to be more precisely consistent with python nomenclature and added a basic test for the example to meet the coverage thresholds. The other existing examples don't have tests so I'm not sure if you want to set a precedent. I can just pop off the last commit if you don't want tests for the slot example module.

@pllim
Copy link
Member

pllim commented Dec 21, 2023

More tests is good, so no need to undo it. Thanks!

I tag some people for review because I am not familiar with slots or automodapi. But if no one responds, I can take a stab at reviewing after the holidays.

Happy holidays!

@kylefawcett
Copy link
Contributor Author

Happy New Year! Anyone available to review this?

@pllim
Copy link
Member

pllim commented Jan 3, 2024

Hi, as people are just returning from their holiday breaks, I would give it another week or two. Thanks for your patience!

@pllim
Copy link
Member

pllim commented Jan 23, 2024

There are 2 jobs that failed. Can you please rebase and see if they go away? Thanks!

@pllim
Copy link
Member

pllim commented Jan 23, 2024

If rebase has nothing to do, please let me know, then I can restart those jobs directly. Thanks!

Copy link
Member

@bsipocz bsipocz left a comment

Choose a reason for hiding this comment

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

I'm not familiar with slots either, but dug up the history of this part of the code. It was added many years ago in #53, along with test cases, which still pass after this PR.

So I would say go ahead and merge this if CI is full green.

@bsipocz bsipocz merged commit 57e934e into astropy:main Jan 27, 2024
17 checks passed
@bsipocz
Copy link
Member

bsipocz commented Jan 27, 2024

Thank you @kylefawcett!

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

Successfully merging this pull request may close these issues.

Using __slots__ hides class variables
4 participants