-
-
Notifications
You must be signed in to change notification settings - Fork 654
Document, lint, and fix placement of magic comments in multiline doctests #35181
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
Conversation
Codecov ReportBase: 88.60% // Head: 88.58% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## develop #35181 +/- ##
===========================================
- Coverage 88.60% 88.58% -0.02%
===========================================
Files 2140 2140
Lines 397273 397272 -1
===========================================
- Hits 352004 351937 -67
- Misses 45269 45335 +66
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
do you have 3a1a03a in the branch? Cause I don't get why you get a test failure. Do you misdetect GAP3 as present? |
err, still not enough
|
To reduce these missing optional directives, maybe block level directives would be a handy solution? https://xdoctest.readthedocs.io/en/latest/xdoctest.directive.html |
looks interesting |
I don't know what's up with |
The new linting rule complains because there are too many of these tags, not too few! |
Thanks for the pointer. More expressive/powerful doctest annotations would of course be helpful. Not really for this ticket, which is about getting rid of too many (and badly placed) directives on multi-line doctests. But definitely for the work in #34998 for the modularization effort. However, block- and function-scope |
more tags were needed due to them missing in new develop branch - fixed that
…On Fri, 24 Feb 2023, 17:55 Matthias Köppe, ***@***.***> wrote:
still not enough # optional - gap3 tags.
The new linting rule complains because there are *too many* of these
tags, not too few!
—
Reply to this email directly, view it on GitHub
<#35181 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJXYHDWUU5PWG7GV6IP6XTWZDYY5ANCNFSM6AAAAAAVF6EJAY>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Fixed what where? |
pushed straight to develop |
These tags that you added in c017a6a are wrong. |
And CI did not fail with 10.0.beta2 -- https://github.com/sagemath/sage/actions/runs/4258115923 |
what do you mean? there were errors there
…On Fri, 24 Feb 2023, 18:22 Matthias Köppe, ***@***.***> wrote:
These tags that you added in c017a6a
<c017a6a>
are wrong.
—
Reply to this email directly, view it on GitHub
<#35181 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJXYHEX76OGOB7P5URLJ7DWZD37JANCNFSM6AAAAAAVF6EJAY>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
On Fri, 24 Feb 2023, 18:23 Matthias Köppe, ***@***.***> wrote:
And CI did not fail with 10.0.beta2 --
https://github.com/sagemath/sage/actions/runs/4258115923
yes it did fail, you are probably looking at a different run
… —
Reply to this email directly, view it on GitHub
<#35181 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJXYHEWIKJEMEOG2ZRV3O3WZD4BJANCNFSM6AAAAAAVF6EJAY>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Dude, of course the build was OK, it's build+test that failed. |
I've pushed the correct fix. |
Could you please undo the vandalism on the |
no idea what you are talking about. tags were missing there |
Read the documentation added here on the branch: https://github.com/sagemath/sage/pull/35181/files#diff-9a1298cd02d22076148519df77cb7b7a99cce074fe4a07c3f4aade37e821705aR1225 |
Have a look at my commit: diff --git a/src/sage/combinat/root_system/reflection_group_element.pyx b/src/sage/combinat/root_system/reflection_group_element.pyx
index 02761726799..54553d6f748 100644
--- a/src/sage/combinat/root_system/reflection_group_element.pyx
+++ b/src/sage/combinat/root_system/reflection_group_element.pyx
@@ -201,8 +201,8 @@ cdef class ComplexReflectionGroupElement(PermutationGroupElement):
sage: for w in W.iteration_tracking_words(): # optional - gap3
....: w.reduced_word() # optional - gap3
....: mats = [w.to_matrix(), w.to_matrix(on_space="dual")] # optional - gap3
- ....: mats
- ....: assert data[w] == mats
+ ....: mats # optional - gap3
+ ....: assert data[w] == mats # optional - gap3
[]
[
[1 0] [1 0] |
Yes, I've seen it and it is wrong. |
after my change, build+test passed. before, it was falling. |
Read it. |
the develop branch was wrong. If I undo this change, as you insist, it will break again. Feel free to change it as you prefer, though. |
Yes, you added them, which is wrong. Read https://github.com/sagemath/sage/pull/35181/files#diff-9a1298cd02d22076148519df77cb7b7a99cce074fe4a07c3f4aade37e821705aR1225, and you'll understand. |
the offending
were added on #34912 - positively reviewed by @stumpc5 (still on trac) who probably didn't notice failing doctests on systems without GAP3 (GAP3 is a good topic for a separate rant...). |
You still haven't read it. |
When did I add the tags on the first 2 continuation lines?! They are in @tscrim 's commits! |
Putting extra Here on the branch I am adding a linter rule that complains about such undisciplined, ineffective decorations, in order to reduce confusion about where tags should be placed. |
I am not talking about linter failures. |
here is the test run I am talking about: https://github.com/sagemath/sage/actions/runs/4259014013/jobs/7410872930
This is the thing I was fixing in |
Yes, there was a mistake here on the branch on these lines, which caused a test failure. I have fixed it in 1913358 There was no test failure on |
Yes, this is a run for this branch, not for There was nothing to fix on |
OK, sorry for confusion. I fixed the develop branch, as you might have noticed. |
Documentation preview for this PR is ready! 🎉 |
Thanks! I've merged it already. |
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
Thank you! |
Merge conflict, wait for the next beta |
There are a few tests in the sage library that span multiple lines and that were intended to be marked as "long time", but were not due to an implementation detail. As it stands, it is the FIRST line of a doctest that needs to be marked "long time", and not the last. This commit fixes a few doctests whose last (but not first) lines were tagged, updating them instead to bear the "# long time" tag on each line. This is overkill, but will save us time in the event that the parser is ever changed.
… go in multiline tests
…][.].*#/s/ *# *(arb216|arb218|py2|py3|long time|not implemented|not tested|known bug|optional|indirect doctest).*//'
Trivial rebase, back to positive |
📚 Description
Fixes #33091
tldr:
# optional
tags go on thesage:
lines.....:
lines.📝 Checklist
⌛ Dependencies