Introduce os-dependent doctest tags # known bug: macos, # known bug: linux#36960
Introduce os-dependent doctest tags # known bug: macos, # known bug: linux#36960tobiasdiez wants to merge 29 commits intosagemath:developfrom
# known bug: macos, # known bug: linux#36960Conversation
|
Please adjust the scope of this PR. There is no need to back out |
src/sage/calculus/transforms/dft.py
Outdated
| sage: s = IndexedSequence(A,J) | ||
| sage: t = s.dwt() | ||
| sage: t # random arch dependent output | ||
| sage: t # known bug, arch dependent output |
There was a problem hiding this comment.
I don't think this is a "bug"
There was a problem hiding this comment.
See PR description.
There was a problem hiding this comment.
Yes, this is not a case that the PR description covers.
|
I have edited the title and PR description to use the terminology that we use in the doctest framework. |
|
I would suggest to simplify and generalize the code as follows:
|
| and tag not in available_software)} | ||
| if extra: | ||
| extra = { | ||
| tag |
There was a problem hiding this comment.
this reformatting seems excessive
|
Overall I'm still skeptical that introducing platform-specific "known bug" semantics is a good idea, but I don't object to creating this mechanism. As I wrote in #36372 (comment): "Introducing platform-specific skip flags in the source code is a departure from our long-standing practice. Our doctests are enabled by the presence of features, not disabled by an excuse. Where necessary, our downstream distribution developers have been externally maintaining their patches for tests that cannot pass on their platforms; and have been helping rewrite doctests so that they are suitable both within the Sage distribution and in downstream deployments." |
|
Hopefully this PR should produce something that makes everyone happy. One principle for this is to build based on what is already in sage and change things little by little as everyone agrees. Though this is a PR, we may start with discussing things from ground up. We want to renew existing tag Currently a doctest annotated with We want the tag What should happen if a doctest is annotated with For a doctest with The renewed |
|
Note that The explanations in parentheses should never be parsed - they are for humans to read. |
|
That is okay with me too. |
What does a patch do with the tests? Does it remove them? |
Maybe @kiwifb can comment |
As you know, we rather intend to run (previously skipped) doctests with "# known bug" empowered with platform check. Adding platform check means that we understand the nature of the bug more. So it is not so bad as "platform-specific tag that skips tests". |
|
I have had a policy of mostly try to deal with broken doctest through issue ticket or enforcement of dependencies when appropriate. I sometimes adopt patches for a dependency update early on but they rarely last more than one release these days. But really I only patch or remove stuff if I think it is completely broken otherwise. I do remove some doctest for stuff that I removed from sage. Stuff related to package management. Recently there has been some instance where I would have liked a tag to cover for stuff that is not always shipped when you use properly split sage. The tags we have may be sufficient provided we use them properly. I am thinking about test about |
|
This Issue has links to other downstream packaging: |
In this PR, we may focus on implementing the "# known bug" mechanism. Adding it to doctests may be done elsewhere with the "backing out" if necessary. |
In this PR, I didn't change the semantics of "known bug". I also don't see any real advantage of running the tests and then just hiding its output (people are even ignoring red ci checks, I doubt they will study the log for 'known bug' annotations). But changing the semantics would be fine with me. That can be done in a follow-up PR. |
Note that there is only one bug left that apparently is specific to conda. Hence, I didn't included any conda-specific exclusion mechanism here. |
|
About syntax, as Matthias said, better to use hyphen |
OK. Good to hear that. |
|
By the way, does colon |
|
Just deleting The proper way is to prepare a PR just for that as a sequel to this PR. Please don't rush. |
Yes, colon is also supported - it is actually the first example: sage/src/sage/doctest/parsing.py Lines 137 to 139 in e249bef I think its better to be consistent with other standard tools than with sage's own custom conventions. Also |
c42b124 to
81b439f
Compare
Actually I don't care too much about this. Note that we have standardized on Also we need to make sure that |
OK.
I don't think so. Consistency across sage library is important, if there is already consistency. If we want to follow other standard tools in python, we should do it across sage library. If this is a big change, then we should discuss on sage-devel.
In my opinion too. |
…known bug annotations
|
I went through the conda logs of the past month with the following result:
Based on this analysis, I've now opened a couple of issues that track the new failures I've observed (if there were at least two instances of that failure on two different PRs), and added these via Since this PR now includes quite a few annotations of known bugs that are not conda specific and are also not in |
|
@tobiasdiez Thanks for looking through the logs, and I'm glad that this PR helped find a few bugs (perhaps it would be good to link to the issue numbers). But please don't unilaterally change tickets to blockers, especially if there is disagreement about the approach you've taken. Doing so further may lead to your removal from Triage again. |
|
In addition, you can't unilaterally decide that a ticket is no longer disputed. Removing that tag is not appropriate. |
I "discovered" these issues by going through the logs and not via this PR (see the last 10 or 15 of https://github.com/sagemath/sage/issues/created_by/tobiasdiez). The point of this PR, and why it should be a "blocker", is that these issues show up randomly as test failures for both the Build & Test and the conda workflow (as well as various portability runs) and thus impacting everyone. So far nobody mentioned any concrete negative consequences of this PR being a blocker (except of course of my rebase mistake) - on the other hand, there are clear benefits.
I've reacted to the reviewer's concerns, so there shouldn't be any disagreement anymore. |
Even if that's the case, it's better to give the reviewer a chance to weigh in themselves. |
|
Documentation preview for this PR (built with commit 518b577; changes) is ready! 🎉 |
|
The description of this PR seems to be outdated. At least I cannot find any functional change to how doctests are parsed in the changeset. Generally, the changes here look fine to me though. So, maybe you could clarify what this PR is supposed to do exactly and then I am happy to cast a vote here. Or maybe, this PR has diverged so much from the original plan that it's worth to create a new PR and close this one. |
|
@roed314 @saraedum @jhpalmieri I'm removing the "disputed" label, as the PR no longer sabotages the known-test-failures.json mechanism |
|
Setting to "needs work" -- indeed the ticket description is outdated, as the implementation of the platform-dependent doctest tag mechanism was split out from here and merged long ago. |
|
My general concern, as discussed previously in #36372, is that marking doctests |
|
So before deploying more |
|
If someone else gets annoyed by the randomly failing tests: please feel free to use this PR as a starting point. |
Extend the
known bugdoctest tag by the possibility to hide these doctest errors only a certain platform. Use this to hide a few known (mostly randomly occurring) bugs. Also convert a few 'random' tags to 'known bug' if random was used in the sense "on a certain architecture, or with a certain dependency, this fails"`.Considered alternatives:
skiptag. In most cases, known bug is however better name since these failures point to actual bugs. But some output is merely architecture dependent and in this case a genericskiptag would be better.CIenv variable, or by explicitly specifying a baseline as in CI conda: Ignore baseline test failures #36678). This has the disadvantage that these known bugs may randomly popup on developers machines without adding any value in this case.random failureorknown failuretag with essentially the same meaning asknown bugbut limiting it to random occurrence. This idea didn't got much support in Fix/ignore all remaining test failures when run under conda #36372, and the randomness can easily be specified by an additional comment.Setting to blocker to hide #35715 and #36992 which annoyed devs before #36769 (comment). Also hides another unreported test failure in
sage_setup/clean.py.📝 Checklist
⌛ Dependencies