Skip to content

Turn some doctests in ell_rational_field.py into long tests #38824

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

Merged
merged 2 commits into from
Feb 21, 2025

Conversation

S17A05
Copy link
Member

@S17A05 S17A05 commented Oct 17, 2024

Fixes #38813

Some of the doctests in ell_rational_field.py ran into RuntimeErrors and couldn't compute generators in time, causing tests to fail. Turning them into long tests (which is necessary since they have to run longer in some cases) fixes that problem.

Also added some missing spaces.

Copy link

github-actions bot commented Oct 17, 2024

Documentation preview for this PR (built with commit aeb512f; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

@fchapoton
Copy link
Contributor

probably a side-effect of #38461

@S17A05
Copy link
Member Author

S17A05 commented Oct 18, 2024

I can't reproduce the timeout of matrix_integer_dense.pyx in the CI test, but it seems unrelated

Copy link
Contributor

@fchapoton fchapoton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, thanks

@fchapoton fchapoton added s: positive review sd128 tickets of Sage Days 128 Le Teich and removed s: needs review labels Feb 12, 2025
vbraun pushed a commit to vbraun/sage that referenced this pull request Feb 18, 2025
sagemathgh-38824: Turn some doctests in `ell_rational_field.py` into long tests
    
Fixes sagemath#38813

Some of the doctests in `ell_rational_field.py` ran into RuntimeErrors
and couldn't compute generators in time, causing tests to fail. Turning
them into long tests (which is necessary since they have to run longer
in some cases) fixes that problem.

Also added some missing spaces.
    
URL: sagemath#38824
Reported by: Sebastian A. Spindler
Reviewer(s): Frédéric Chapoton, Sebastian A. Spindler
@vbraun vbraun merged commit 0a278fc into sagemath:develop Feb 21, 2025
20 of 24 checks passed
vbraun pushed a commit to vbraun/sage that referenced this pull request Feb 22, 2025
sagemathgh-39567: Make test deterministic to fix CI
    
Apparently the test is introduced in
sagemath#38824 and  it's basically copied
from another test below that is marked `random`

```
            sage: E = EllipticCurve([-127^2,0])
            sage: E.gens(use_database=False, algorithm='pari',
pari_effort=4)   # long time, random
            [(611429153205013185025/9492121848205441 :
15118836457596902442737698070880/924793900700594415341761 : 1)]
```

I don't know why this one isn't marked `# random` but I choose to keep
checking the output but does it more carefully. Basically it has rank 1
so the generator is determined up to `± 1` and modulo torsion, so we
just need to check `l[0] - a` or `l[0] + a` is in torsion.

It's not clear why the test starts failing now. Maybe it's just random
after all.

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [ ] The title is concise and informative.
- [ ] 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 and checked the documentation
preview.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#39567
Reported by: user202729
Reviewer(s): Frédéric Chapoton
@S17A05 S17A05 deleted the rational_long_tests branch February 23, 2025 01:41
vbraun pushed a commit to vbraun/sage that referenced this pull request Feb 24, 2025
sagemathgh-39567: Make test deterministic to fix CI
    
Apparently the test is introduced in
sagemath#38824 and  it's basically copied
from another test below that is marked `random`

```
            sage: E = EllipticCurve([-127^2,0])
            sage: E.gens(use_database=False, algorithm='pari',
pari_effort=4)   # long time, random
            [(611429153205013185025/9492121848205441 :
15118836457596902442737698070880/924793900700594415341761 : 1)]
```

I don't know why this one isn't marked `# random` but I choose to keep
checking the output but does it more carefully. Basically it has rank 1
so the generator is determined up to `± 1` and modulo torsion, so we
just need to check `l[0] - a` or `l[0] + a` is in torsion.

It's not clear why the test starts failing now. Maybe it's just random
after all.

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [ ] The title is concise and informative.
- [ ] 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 and checked the documentation
preview.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#39567
Reported by: user202729
Reviewer(s): Frédéric Chapoton
vbraun pushed a commit to vbraun/sage that referenced this pull request Feb 27, 2025
sagemathgh-39567: Make test deterministic to fix CI
    
Apparently the test is introduced in
sagemath#38824 and  it's basically copied
from another test below that is marked `random`

```
            sage: E = EllipticCurve([-127^2,0])
            sage: E.gens(use_database=False, algorithm='pari',
pari_effort=4)   # long time, random
            [(611429153205013185025/9492121848205441 :
15118836457596902442737698070880/924793900700594415341761 : 1)]
```

I don't know why this one isn't marked `# random` but I choose to keep
checking the output but does it more carefully. Basically it has rank 1
so the generator is determined up to `± 1` and modulo torsion, so we
just need to check `l[0] - a` or `l[0] + a` is in torsion.

It's not clear why the test starts failing now. Maybe it's just random
after all.

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [ ] The title is concise and informative.
- [ ] 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 and checked the documentation
preview.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#39567
Reported by: user202729
Reviewer(s): Frédéric Chapoton
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: elliptic curves sd128 tickets of Sage Days 128 Le Teich t: bug t: tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

doctest failure in schemes/elliptic_curves/ell_rational_field.py
3 participants