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
DEPR: deprecate astropy.utils.console.terminal_size and stop using it internally #16045
DEPR: deprecate astropy.utils.console.terminal_size and stop using it internally #16045
Conversation
Thank you for your contribution to Astropy! 🌌 This checklist is meant to remind the package maintainers who will review this pull request of some common things to look for.
|
👋 Thank you for your draft pull request! Do you know that you can use |
9779fd7
to
50faa93
Compare
failures are real. Let me check if I can fix that easily. |
50faa93
to
7d2afe1
Compare
I fixed the worst ones but there are still a lot and I'm not sure they're actually fixable. Maybe the solution is simply not to deprecate this function. |
7d2afe1
to
81ba536
Compare
whoops, I missed that |
aa3811d
to
2284446
Compare
2 remaining failures in |
I think it is OK to adjust the doctests. To be honest, showing 1 line before the ... and 2 after seems better than 1 and 3 (2 and 2 would perhaps be more logical, but, really, no big deal... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks all good to me! I don't know if you'd want further feedback (maybe @taldcroft, since it is used in table?), but it looks all good to me.
@@ -69,7 +69,6 @@ Time series are specialized kinds of |Table| objects:: | |||
2009-05-02T00:48:32.291 6.632337e-04 ... 1.5272264e-03 -1.4998110e-03 | |||
2009-05-02T00:49:31.149 6.632584e-04 ... 1.5193661e-03 -1.5074468e-03 | |||
... ... ... ... ... | |||
2009-05-11T17:58:22.526 1.014493e-03 ... 3.6121816e-03 3.1950327e-03 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the usual annoyance that, sadly, doctests just stop when an error is encountered, so you don't necessarily get all of them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah that's why I needed two iterations ! thanks for clarifying this !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cannot merge this until the diff from #16040 is taken back out.
#16040 is merged. Please rebase. Thanks! |
7dcb336
to
abbe530
Compare
rebased ! |
Also they disagree by 1:
It seems |
0eca5c9
to
2bb54bc
Compare
yes this is what I hinted to in #16045 (comment) (I could have been more explicit). I think this is also why some doctests adjustments are required. |
2bb54bc
to
ceb5c31
Compare
@@ -270,31 +268,29 @@ time — this returns a |BinnedTimeSeries|:: | |||
>>> ts_binned = aggregate_downsample(ts_folded, time_bin_size=0.03 * u.day) # doctest: +REMOTE_DATA +IGNORE_WARNINGS | |||
>>> ts_binned # doctest: +FLOAT_CMP +REMOTE_DATA | |||
<BinnedTimeSeries length=74> | |||
time_bin_start time_bin_size ... pos_corr2 sap_flux_norm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you're seeing this in split diff, you might be wondering what the actual difference is (it certainly wasn't obvious to me).
What's changed is that some horizontal whitespace was removed on the "pix" column because the row that got removed happened to be have most demanding value in terms of horizontal space (namely, -2.2798192730988376e-05
). This is slightly easier to see in unified diff view.
ready at last ! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine to me.
@mhvk - just curious why you labeled this as a bug? |
Oops, my mistake - I saw a |
@pllim - I think this one is ready (it was rebased following your request); could you check? (And go ahead and merge if it is all OK!) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM now. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ehem... US English spells as "favor" but I'll let this slide. 😉
(This is not a serious comment. We traditionally have unresolved debates on US vs UK English.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm sure I mix US and UK flavours all the time, so I'm neutral ! (or maybe just inconsistent ?)
Description
Since this doesn't seem controversial
Fixes #16042
Currently based onto #16040 to avoid an implicit merge conflict.