You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Open the "build" action on almost any recent PR (for example, this one) and notice that the test on the file sage_setup/clean.py fails because it finds stale files in some __pycache__ directories (in particular, the one related to books "Computational Mathematics with Sagemath" and Judson's "Abstract Algebra").
Expected Behavior
No test failures
Actual Behavior
Testing fails with the following ouput (consistent between different PRs)
File "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/computational-mathematics-with-sagemath/__pycache__/float_doctest.cpython-311.pyc
Found stale file: sage/tests/books/computational-mathematics-with-sagemath/__pycache__/integration_doctest.cpython-311.pyc
Found stale file: sage/tests/books/computational-mathematics-with-sagemath/__pycache__/combinat_doctest.cpython-311.pyc
Found stale file: sage/tests/books/computational-mathematics-with-sagemath/__pycache__/programmation_doctest.cpython-311.pyc
Found stale file: sage/tests/books/computational-mathematics-with-sagemath/__pycache__/mpoly_doctest.cpython-311.pyc
Found stale file: sage/tests/books/computational-mathematics-with-sagemath/__pycache__/calculus_doctest.cpython-311.pyc
Found stale file: sage/tests/books/computational-mathematics-with-sagemath/__pycache__/polynomes_doctest.cpython-311.pyc
Found stale file: sage/tests/books/computational-mathematics-with-sagemath/__pycache__/premierspas_doctest.cpython-311.pyc
Found stale file: sage/tests/books/computational-mathematics-with-sagemath/__pycache__/domaines_doctest.cpython-311.pyc
Found stale file: sage/tests/books/computational-mathematics-with-sagemath/__pycache__/lp_doctest.cpython-311.pyc
Found stale file: sage/tests/books/computational-mathematics-with-sagemath/__pycache__/recequadiff_doctest.cpython-311.pyc
Found stale file: sage/tests/books/computational-mathematics-with-sagemath/__pycache__/nonlinear_doctest.cpython-311.pyc
Found stale file: sage/tests/books/computational-mathematics-with-sagemath/__pycache__/numbertheory_doctest.cpython-311.pyc
Found stale file: sage/tests/books/computational-mathematics-with-sagemath/__pycache__/graphtheory_doctest.cpython-311.pyc
Found stale file: sage/tests/books/computational-mathematics-with-sagemath/__pycache__/linsolve_doctest.cpython-311.pyc
Found stale file: sage/tests/books/computational-mathematics-with-sagemath/__pycache__/__init__.cpython-311.pyc
Found stale file: sage/tests/books/computational-mathematics-with-sagemath/__pycache__/linalg_doctest.cpython-311.pyc
Found stale file: sage/tests/books/computational-mathematics-with-sagemath/__pycache__/graphique_doctest.cpython-311.pyc
Found stale file: sage/tests/books/computational-mathematics-with-sagemath/sol/__pycache__/float_doctest.cpython-311.pyc
Found stale file: sage/tests/books/computational-mathematics-with-sagemath/sol/__pycache__/integration_doctest.cpython-311.pyc
Found stale file: sage/tests/books/computational-mathematics-with-sagemath/sol/__pycache__/combinat_doctest.cpython-311.pyc
Found stale file: sage/tests/books/computational-mathematics-with-sagemath/sol/__pycache__/mpoly_doctest.cpython-311.pyc
Found stale file: sage/tests/books/computational-mathematics-with-sagemath/sol/__pycache__/calculus_doctest.cpython-311.pyc
Found stale file: sage/tests/books/computational-mathematics-with-sagemath/sol/__pycache__/polynomes_doctest.cpython-311.pyc
Found stale file: sage/tests/books/computational-mathematics-with-sagemath/sol/__pycache__/domaines_doctest.cpython-311.pyc
Found stale file: sage/tests/books/computational-mathematics-with-sagemath/sol/__pycache__/lp_doctest.cpython-311.pyc
Found stale file: sage/tests/books/computational-mathematics-with-sagemath/sol/__pycache__/recequadiff_doctest.cpython-311.pyc
Found stale file: sage/tests/books/computational-mathematics-with-sagemath/sol/__pycache__/nonlinear_doctest.cpython-311.pyc
Found stale file: sage/tests/books/computational-mathematics-with-sagemath/sol/__pycache__/numbertheory_doctest.cpython-311.pyc
Found stale file: sage/tests/books/computational-mathematics-with-sagemath/sol/__pycache__/graphtheory_doctest.cpython-311.pyc
Found stale file: sage/tests/books/computational-mathematics-with-sagemath/sol/__pycache__/linsolve_doctest.cpython-311.pyc
Found stale file: sage/tests/books/computational-mathematics-with-sagemath/sol/__pycache__/__init__.cpython-311.pyc
Found stale file: sage/tests/books/computational-mathematics-with-sagemath/sol/__pycache__/linalg_doctest.cpython-311.pyc
Found stale file: sage/tests/books/computational-mathematics-with-sagemath/sol/__pycache__/graphique_doctest.cpython-311.pyc
Found stale file: sage/tests/books/judson-abstract-algebra/__pycache__/isomorph-sage.cpython-311.pyc
Found stale file: sage/tests/books/judson-abstract-algebra/__pycache__/actions-sage.cpython-311.pyc
Found stale file: sage/tests/books/judson-abstract-algebra/__pycache__/finite-sage.cpython-311.pyc
Found stale file: sage/tests/books/judson-abstract-algebra/__pycache__/boolean-sage.cpython-311.pyc
Found stale file: sage/tests/books/judson-abstract-algebra/__pycache__/struct-sage.cpython-311.pyc
Found stale file: sage/tests/books/judson-abstract-algebra/__pycache__/fields-sage.cpython-311.pyc
Found stale file: sage/tests/books/judson-abstract-algebra/__pycache__/vect-sage-exercises.cpython-311.pyc
Found stale file: sage/tests/books/judson-abstract-algebra/__pycache__/cosets-sage.cpython-311.pyc
Found stale file: sage/tests/books/judson-abstract-algebra/__pycache__/permute-sage.cpython-311.pyc
Found stale file: sage/tests/books/judson-abstract-algebra/__pycache__/algcodes-sage.cpython-311.pyc
Found stale file: sage/tests/books/judson-abstract-algebra/__pycache__/crypt-sage.cpython-311.pyc
Found stale file: sage/tests/books/judson-abstract-algebra/__pycache__/galois-sage.cpython-311.pyc
Found stale file: sage/tests/books/judson-abstract-algebra/__pycache__/integers-sage.cpython-311.pyc
Found stale file: sage/tests/books/judson-abstract-algebra/__pycache__/homomorph-sage.cpython-311.pyc
Found stale file: sage/tests/books/judson-abstract-algebra/__pycache__/rings-sage.cpython-311.pyc
Found stale file: sage/tests/books/judson-abstract-algebra/__pycache__/homomorph-sage-exercises.cpython-311.pyc
Found stale file: sage/tests/books/judson-abstract-algebra/__pycache__/sets-sage.cpython-311.pyc
Found stale file: sage/tests/books/judson-abstract-algebra/__pycache__/vect-sage.cpython-311.pyc
Found stale file: sage/tests/books/judson-abstract-algebra/__pycache__/sylow-sage.cpython-311.pyc
Found stale file: sage/tests/books/judson-abstract-algebra/__pycache__/groups-sage.cpython-311.pyc
Found stale file: sage/tests/books/judson-abstract-algebra/__pycache__/actions-sage-exercises.cpython-311.pyc
Found stale file: sage/tests/books/judson-abstract-algebra/__pycache__/normal-sage.cpython-311.pyc
Found stale file: sage/tests/books/judson-abstract-algebra/__pycache__/cyclic-sage.cpython-311.pyc
Found stale file: sage/tests/books/judson-abstract-algebra/__pycache__/__init__.cpython-311.pyc
Found stale file: sage/tests/books/judson-abstract-algebra/__pycache__/cosets-sage-exercises.cpython-311.pyc
Found stale file: sage/tests/books/judson-abstract-algebra/__pycache__/poly-sage.cpython-311.pyc
Found stale file: sage/tests/books/judson-abstract-algebra/__pycache__/domains-sage.cpython-311.pyc
Additional Information
If on my local installation I run ./sage -t src/sage/tests/books/computational-mathematics-with-sagemath no __pycache__ folder is created. I do not know what is responsible for this.
Environment
- GitHub Actions runner
Checklist
I have searched the existing issues for a bug report that matches the one I want to file, without success.
I have read the documentation and troubleshoot guide
The text was updated successfully, but these errors were encountered:
sagemathgh-37185: Fix `sage_setup.clean` doctest
<!-- ^^^^^
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 "Fixessagemath#1234" use "Introduce new method to
calculate 1+1"
-->
<!-- Describe your changes here in detail -->
As reported in https://groups.google.com/g/sage-
devel/c/mLtXcaypU3Q/m/jHoVjQ9oAAAJ @kwankyu
This failure was introduced as a side effect of sagemath#36591: The pytest
discovery of modules disagrees with `sage_setup`'s notion of package
directories vs. data directories. We repair it by making
`sage.tests.books` an ordinary package directory (correct because the
whole thing is shipped by **sagemath-repl**).
<!-- Why is this change required? What problem does it solve? -->
<!-- If this PR resolves an open issue, please link to it here. For
example "Fixessagemath#12345". -->
Fixessagemath#37216
<!-- 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.
- [x] 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#37185
Reported by: Matthias Köppe
Reviewer(s): Gonzalo Tornaría
Steps To Reproduce
Open the "build" action on almost any recent PR (for example, this one) and notice that the test on the file
sage_setup/clean.py
fails because it finds stale files in some__pycache__
directories (in particular, the one related to books "Computational Mathematics with Sagemath" and Judson's "Abstract Algebra").Expected Behavior
No test failures
Actual Behavior
Testing fails with the following ouput (consistent between different PRs)
Additional Information
If on my local installation I run
./sage -t src/sage/tests/books/computational-mathematics-with-sagemath
no__pycache__
folder is created. I do not know what is responsible for this.Environment
- GitHub Actions runner
Checklist
The text was updated successfully, but these errors were encountered: