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

sage -t --format github (illustration) #36558

Closed
wants to merge 43 commits into from

Conversation

mkoeppe
Copy link
Member

@mkoeppe mkoeppe commented Oct 28, 2023

This prints doctest failures as github annotations.

The branch on this PR here provokes some errors for illustration purposes and should not be merged. See #36938 for the actual PR.

As seen in the "Files changed" tab (https://github.com/sagemath/sage/pull/36558/files):

  • Doctest failures show as errors next to the doctest in source code
  • Doctest warnings show as "warnings"
  • Doctest failures from files that "failed in baseline" show as "notices"

These messages can also be seen in the Summary page of the workflow (https://github.com/sagemath/sage/actions/runs/7282457873?pr=36558). Clicking on a message leads to the source code location.

📝 Checklist

  • The title is concise, informative, and self-explanatory.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation accordingly.

⌛ Dependencies

@mkoeppe mkoeppe changed the title sage -t --format github sage -t --format github (illustration) Dec 21, 2023
vbraun pushed a commit to vbraun/sage that referenced this pull request Dec 27, 2023
…seline]' earlier

    
<!-- ^^^^^
Please provide a concise, informative and self-explanatory title.
Don't put issue numbers in there, do this in the PR body below.
For example, instead of "Fixes sagemath#1234" use "Introduce new method to
calculate 1+1"
-->
<!-- Describe your changes here in detail -->

The note "[failed in baseline]" already appears in the doctest failure
summary.

Here we add the note also to the `sage -t` line during doctesting:

https://github.com/sagemath/sage/actions/runs/7281940815/job/19843412065
?pr=36936#step:11:2744
```
sage -t --random-seed=256963700569517996050547927079750684585
src/sage/combinat/combinatorial_map.py
    [75 tests, 0.05 s]
sage -t --random-seed=256963700569517996050547927079750684585
src/sage/combinat/cluster_algebra_quiver/quiver.py  # [failed in
baseline]
    [320 tests, 3.73 s]
sage -t --random-seed=256963700569517996050547927079750684585
src/sage/combinat/composition_signed.py
    [20 tests, 0.16 s]
```

https://github.com/sagemath/sage/actions/runs/7281940815/job/19843412065
?pr=36936#step:11:9192
```
sage -t --random-seed=256963700569517996050547927079750684585
src/sage_setup/setenv.py
    [0 tests, 0.00 s]
sage -t --random-seed=256963700569517996050547927079750684585
src/sage_setup/clean.py  # [failed in baseline]
**********************************************************************
File "src/sage_setup/clean.py", line 104, in
sage_setup.clean._find_stale_files
Failed example:
    for f in stale_iter:
        if f.endswith(skip_extensions): continue
        if '/ext_data/' in f: continue
        print('Found stale file: ' + f)
Expected nothing
Got:
    Found stale file: sage/tests/books/judson-abstract-
algebra/homomorph-sage-exercises.py
    Found stale file: sage/tests/books/judson-abstract-algebra/actions-
sage-exercises.py
    Found stale file: sage/tests/books/judson-abstract-
algebra/homomorph-sage.py
```

The changes in the code that implement this are also preparation for:
- sagemath#36558.

<!-- Why is this change required? What problem does it solve? -->
<!-- If this PR resolves an open issue, please link to it here. For
example "Fixes sagemath#12345". -->
<!-- If your change requires a documentation PR, please link it
appropriately. -->

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->
<!-- If your change requires a documentation PR, please link it
appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
<!-- Feel free to remove irrelevant items. -->

- [ ] The title is concise, informative, and self-explanatory.
- [ ] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on
- sagemath#12345: short description why this is a dependency
- sagemath#34567: ...
-->

<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
    
URL: sagemath#36936
Reported by: Matthias Köppe
Reviewer(s): Kwankyu Lee, Matthias Köppe
@JohnCremona
Copy link
Member

This looks extremely useful -- thanks!

vbraun pushed a commit to vbraun/sage that referenced this pull request Jan 2, 2024
…seline]' earlier

    
<!-- ^^^^^
Please provide a concise, informative and self-explanatory title.
Don't put issue numbers in there, do this in the PR body below.
For example, instead of "Fixes sagemath#1234" use "Introduce new method to
calculate 1+1"
-->
<!-- Describe your changes here in detail -->

The note "[failed in baseline]" already appears in the doctest failure
summary.

Here we add the note also to the `sage -t` line during doctesting:

https://github.com/sagemath/sage/actions/runs/7281940815/job/19843412065
?pr=36936#step:11:2744
```
sage -t --random-seed=256963700569517996050547927079750684585
src/sage/combinat/combinatorial_map.py
    [75 tests, 0.05 s]
sage -t --random-seed=256963700569517996050547927079750684585
src/sage/combinat/cluster_algebra_quiver/quiver.py  # [failed in
baseline]
    [320 tests, 3.73 s]
sage -t --random-seed=256963700569517996050547927079750684585
src/sage/combinat/composition_signed.py
    [20 tests, 0.16 s]
```

https://github.com/sagemath/sage/actions/runs/7281940815/job/19843412065
?pr=36936#step:11:9192
```
sage -t --random-seed=256963700569517996050547927079750684585
src/sage_setup/setenv.py
    [0 tests, 0.00 s]
sage -t --random-seed=256963700569517996050547927079750684585
src/sage_setup/clean.py  # [failed in baseline]
**********************************************************************
File "src/sage_setup/clean.py", line 104, in
sage_setup.clean._find_stale_files
Failed example:
    for f in stale_iter:
        if f.endswith(skip_extensions): continue
        if '/ext_data/' in f: continue
        print('Found stale file: ' + f)
Expected nothing
Got:
    Found stale file: sage/tests/books/judson-abstract-
algebra/homomorph-sage-exercises.py
    Found stale file: sage/tests/books/judson-abstract-algebra/actions-
sage-exercises.py
    Found stale file: sage/tests/books/judson-abstract-
algebra/homomorph-sage.py
```

The changes in the code that implement this are also preparation for:
- sagemath#36558.

<!-- Why is this change required? What problem does it solve? -->
<!-- If this PR resolves an open issue, please link to it here. For
example "Fixes sagemath#12345". -->
<!-- If your change requires a documentation PR, please link it
appropriately. -->

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->
<!-- If your change requires a documentation PR, please link it
appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
<!-- Feel free to remove irrelevant items. -->

- [ ] The title is concise, informative, and self-explanatory.
- [ ] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on
- sagemath#12345: short description why this is a dependency
- sagemath#34567: ...
-->

<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
    
URL: sagemath#36936
Reported by: Matthias Köppe
Reviewer(s): Kwankyu Lee, Matthias Köppe
vbraun pushed a commit to vbraun/sage that referenced this pull request Jan 5, 2024
…seline]' earlier

    
<!-- ^^^^^
Please provide a concise, informative and self-explanatory title.
Don't put issue numbers in there, do this in the PR body below.
For example, instead of "Fixes sagemath#1234" use "Introduce new method to
calculate 1+1"
-->
<!-- Describe your changes here in detail -->

The note "[failed in baseline]" already appears in the doctest failure
summary.

Here we add the note also to the `sage -t` line during doctesting:

https://github.com/sagemath/sage/actions/runs/7281940815/job/19843412065
?pr=36936#step:11:2744
```
sage -t --random-seed=256963700569517996050547927079750684585
src/sage/combinat/combinatorial_map.py
    [75 tests, 0.05 s]
sage -t --random-seed=256963700569517996050547927079750684585
src/sage/combinat/cluster_algebra_quiver/quiver.py  # [failed in
baseline]
    [320 tests, 3.73 s]
sage -t --random-seed=256963700569517996050547927079750684585
src/sage/combinat/composition_signed.py
    [20 tests, 0.16 s]
```

https://github.com/sagemath/sage/actions/runs/7281940815/job/19843412065
?pr=36936#step:11:9192
```
sage -t --random-seed=256963700569517996050547927079750684585
src/sage_setup/setenv.py
    [0 tests, 0.00 s]
sage -t --random-seed=256963700569517996050547927079750684585
src/sage_setup/clean.py  # [failed in baseline]
**********************************************************************
File "src/sage_setup/clean.py", line 104, in
sage_setup.clean._find_stale_files
Failed example:
    for f in stale_iter:
        if f.endswith(skip_extensions): continue
        if '/ext_data/' in f: continue
        print('Found stale file: ' + f)
Expected nothing
Got:
    Found stale file: sage/tests/books/judson-abstract-
algebra/homomorph-sage-exercises.py
    Found stale file: sage/tests/books/judson-abstract-algebra/actions-
sage-exercises.py
    Found stale file: sage/tests/books/judson-abstract-
algebra/homomorph-sage.py
```

The changes in the code that implement this are also preparation for:
- sagemath#36558.

<!-- Why is this change required? What problem does it solve? -->
<!-- If this PR resolves an open issue, please link to it here. For
example "Fixes sagemath#12345". -->
<!-- If your change requires a documentation PR, please link it
appropriately. -->

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->
<!-- If your change requires a documentation PR, please link it
appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
<!-- Feel free to remove irrelevant items. -->

- [ ] The title is concise, informative, and self-explanatory.
- [ ] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on
- sagemath#12345: short description why this is a dependency
- sagemath#34567: ...
-->

<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
    
URL: sagemath#36936
Reported by: Matthias Köppe
Reviewer(s): Kwankyu Lee, Matthias Köppe
vbraun pushed a commit to vbraun/sage that referenced this pull request Jan 13, 2024
…seline]' earlier

    
<!-- ^^^^^
Please provide a concise, informative and self-explanatory title.
Don't put issue numbers in there, do this in the PR body below.
For example, instead of "Fixes sagemath#1234" use "Introduce new method to
calculate 1+1"
-->
<!-- Describe your changes here in detail -->

The note "[failed in baseline]" already appears in the doctest failure
summary.

Here we add the note also to the `sage -t` line during doctesting:

https://github.com/sagemath/sage/actions/runs/7281940815/job/19843412065
?pr=36936#step:11:2744
```
sage -t --random-seed=256963700569517996050547927079750684585
src/sage/combinat/combinatorial_map.py
    [75 tests, 0.05 s]
sage -t --random-seed=256963700569517996050547927079750684585
src/sage/combinat/cluster_algebra_quiver/quiver.py  # [failed in
baseline]
    [320 tests, 3.73 s]
sage -t --random-seed=256963700569517996050547927079750684585
src/sage/combinat/composition_signed.py
    [20 tests, 0.16 s]
```

https://github.com/sagemath/sage/actions/runs/7281940815/job/19843412065
?pr=36936#step:11:9192
```
sage -t --random-seed=256963700569517996050547927079750684585
src/sage_setup/setenv.py
    [0 tests, 0.00 s]
sage -t --random-seed=256963700569517996050547927079750684585
src/sage_setup/clean.py  # [failed in baseline]
**********************************************************************
File "src/sage_setup/clean.py", line 104, in
sage_setup.clean._find_stale_files
Failed example:
    for f in stale_iter:
        if f.endswith(skip_extensions): continue
        if '/ext_data/' in f: continue
        print('Found stale file: ' + f)
Expected nothing
Got:
    Found stale file: sage/tests/books/judson-abstract-
algebra/homomorph-sage-exercises.py
    Found stale file: sage/tests/books/judson-abstract-algebra/actions-
sage-exercises.py
    Found stale file: sage/tests/books/judson-abstract-
algebra/homomorph-sage.py
```

The changes in the code that implement this are also preparation for:
- sagemath#36558.

<!-- Why is this change required? What problem does it solve? -->
<!-- If this PR resolves an open issue, please link to it here. For
example "Fixes sagemath#12345". -->
<!-- If your change requires a documentation PR, please link it
appropriately. -->

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->
<!-- If your change requires a documentation PR, please link it
appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
<!-- Feel free to remove irrelevant items. -->

- [ ] The title is concise, informative, and self-explanatory.
- [ ] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on
- sagemath#12345: short description why this is a dependency
- sagemath#34567: ...
-->

<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
    
URL: sagemath#36936
Reported by: Matthias Köppe
Reviewer(s): Kwankyu Lee, Matthias Köppe
Copy link

Documentation preview for this PR (built with commit e8ef307; changes) is ready! 🎉

vbraun pushed a commit to vbraun/sage that referenced this pull request Feb 1, 2024
… annotations in the 'Files changed' tab

    
<!-- ^^^^^
Please provide a concise, informative and self-explanatory title.
Don't put issue numbers in there, do this in the PR body below.
For example, instead of "Fixes sagemath#1234" use "Introduce new method to
calculate 1+1"
-->
<!-- Describe your changes here in detail -->

This prints doctest failures as github annotations.

For illustrating this new feature, the branch on sagemath#36558 provokes some
errors.

As seen in the "Files changed" tab over there
(https://github.com/sagemath/sage/pull/36558/files):
- Doctest failures show as errors next to the doctest in source code
- Doctest warnings show as "warnings"
- Doctest failures from files that "failed in baseline" show as
"notices"

These messages can also be seen in the Summary page of the workflow
(https://github.com/sagemath/sage/actions/runs/7359388426?pr=36558).
Clicking on a message leads to the source code location.

<!-- Why is this change required? What problem does it solve? -->
<!-- If this PR resolves an open issue, please link to it here. For
example "Fixes sagemath#12345". -->
<!-- If your change requires a documentation PR, please link it
appropriately. -->

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->
<!-- If your change requires a documentation PR, please link it
appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
<!-- Feel free to remove irrelevant items. -->

- [x] The title is concise, informative, and self-explanatory.
- [ ] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on
- sagemath#12345: short description why this is a dependency
- sagemath#34567: ...
-->
- Depends on sagemath#36936

<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
    
URL: sagemath#36938
Reported by: Matthias Köppe
Reviewer(s): Alex J Best, Matthias Köppe, Tobias Diez
@mkoeppe
Copy link
Member Author

mkoeppe commented Feb 2, 2024

Closing as #36938 has been merged.

@mkoeppe mkoeppe closed this Feb 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants