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

Deprecate lead, trail, lm, lt, lc, valence and coeffs. #805

Merged
merged 3 commits into from
Mar 19, 2021

Conversation

wbhart
Copy link
Contributor

@wbhart wbhart commented Mar 17, 2021

I have made PRs against all the other repos.

@wbhart
Copy link
Contributor Author

wbhart commented Mar 17, 2021

Fixes #802
Fixes #779
Fixes #508

@codecov
Copy link

codecov bot commented Mar 17, 2021

Codecov Report

Merging #805 (d2a5d43) into master (cbb00e1) will increase coverage by 0.02%.
The diff coverage is 79.80%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #805      +/-   ##
==========================================
+ Coverage   81.05%   81.08%   +0.02%     
==========================================
  Files          52       52              
  Lines       17797    17792       -5     
==========================================
  Hits        14426    14426              
+ Misses       3371     3366       -5     
Impacted Files Coverage Δ
src/AbstractAlgebra.jl 47.92% <ø> (ø)
src/Deprecations.jl 0.00% <ø> (ø)
src/Generic.jl 100.00% <ø> (ø)
src/algorithms/MPolyFactor.jl 33.86% <0.00%> (ø)
src/generic/Misc/Poly.jl 0.00% <0.00%> (ø)
src/generic/SparsePoly.jl 26.84% <81.25%> (-0.18%) ⬇️
src/generic/Poly.jl 91.87% <82.25%> (+<0.01%) ⬆️
src/generic/MPoly.jl 91.19% <83.33%> (ø)
src/algorithms/LaurentPoly.jl 96.59% <100.00%> (ø)
src/generic/Matrix.jl 91.42% <100.00%> (+0.15%) ⬆️
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cbb00e1...d2a5d43. Read the comment docs.

@wbhart
Copy link
Contributor Author

wbhart commented Mar 17, 2021

The OscarCI tests are exiting with signal 11 with no stack trace. Any idea what that is about?

@thofma
Copy link
Member

thofma commented Mar 17, 2021

Very weird, looking at the timestamps does not help either:

Wed, 17 Mar 2021 10:19:17 GMT SLPoly        |  414    414
Wed, 17 Mar 2021 10:19:17 GMT┌ Warning: `lead(f)` is deprecated, use `leading_coefficient(f)` instead.
Wed, 17 Mar 2021 10:19:17 GMT│   caller = leading_coefficient(f::fmpq_poly) at Poly.jl:127
Wed, 17 Mar 2021 10:19:17 GMT└ @ Hecke ~/work/AbstractAlgebra.jl/AbstractAlgebra.jl/oscar-dev/Hecke/src/Misc/Poly.jl:127
Wed, 17 Mar 2021 13:13:07 GMT ERROR: Package Oscar errored during testing (received signal: 11)
Wed, 17 Mar 2021 13:13:07 GMT Stacktrace:

Let's restart.

@wbhart
Copy link
Contributor Author

wbhart commented Mar 17, 2021

There's a lot of "unsatisfiable requirements" (dependencies) as well. I don't know if that caused it somehow.

@wbhart
Copy link
Contributor Author

wbhart commented Mar 17, 2021

I have decided to do map_coeffs in a separate series of PR's if we decide to rename that. This is getting too messy otherwise. Thus, I will finish this off as soon as 801 is merged.

@thofma
Copy link
Member

thofma commented Mar 19, 2021

#801 is merged.

How do we want to move forward? We can merge all the breaking things (+ the to be created PR for map_coeff) today or beginning of next week and immediately tag a new release.

@fieker
Copy link
Contributor

fieker commented Mar 19, 2021 via email

@wbhart
Copy link
Contributor Author

wbhart commented Mar 19, 2021

Please do not merge anything else until I have reviewed it. The order of merging here is potentially going to create some massive headaches.

I am on it now and will let you know when everything is ok to go.

@wbhart
Copy link
Contributor Author

wbhart commented Mar 19, 2021

@thofma I believe this is right to go, independently of everything else. But I have not tested that the deprecations in AA are sufficient for Hecke/Oscar, etc. I'll test Nemo and Hecke now, and if so will call it good. Just give me 30 mins or so to run the tests.

@wbhart
Copy link
Contributor Author

wbhart commented Mar 19, 2021

Current failure is just #788

@wbhart
Copy link
Contributor Author

wbhart commented Mar 19, 2021

Nemo is fine, lots of yellow warnings, which is what I wanted to see. But tests pass.

Waiting for Hecke tests now.

@wbhart
Copy link
Contributor Author

wbhart commented Mar 19, 2021

Hmm, the Hecke tests just seem to have hung without running a single test. 10 mins and counting. Does it do that sometimes?

@wbhart
Copy link
Contributor Author

wbhart commented Mar 19, 2021

It seemed to be hung in deprecated.jl

@thofma
Copy link
Member

thofma commented Mar 19, 2021

Weird. Let me also try it locally.

@wbhart
Copy link
Contributor Author

wbhart commented Mar 19, 2021

Looks like the same problem on restart of the tests. It displays:

[ Info: long_test: false
[ Info: short_test: false
┌ Warning: `lead(f)` is deprecated, use `leading_coefficient(f)` instead.
│   caller = leading_coefficient(::AbstractAlgebra.Generic.Poly{nf_elem}) at Poly.jl:127
└ @ Hecke ~/.julia/dev/Hecke/src/Misc/Poly.jl:127

Then it just hangs. Any idea what is happening here? It seems like the deprecations don't work with Hecke.

@wbhart
Copy link
Contributor Author

wbhart commented Mar 19, 2021

Here's the trace when I hit CTRL-C:

^CERROR: InterruptException:
Stacktrace:
 [1] poptask(::Number fields: Error During Test at Base.InvasiveLinkedListSynchronized{Task}) at ./task.jl:704
 [2] wait at ./task.jl:712 [inlined]
 [3] wait(::Base.GenericCondition{Base.Threads.SpinLock}) at ./condition.jl:106
 [4] wait(::Base.Process) at ./process.jl:621
 [5] success at ./process.jl:483 [inlined]
 [6] /home/wbhart/.julia/dev/Hecke/test/NumField.jl:1
  Got exception outside of a @test
  LoadError: InterruptException:
  Stacktrace:run
(   [1] backtrace() at ./error.jl:112::
Cmd   [2] macro expansion at ./deprecated.jl:89 [inlined];
   [3] macro expansion at ./logging.jl:321 [inlined]
   [4] depwarn(::String, ::Symbol; force::Bool) at ./deprecated.jl:85
   [5] depwarn(::String, ::Symbol) at ./deprecated.jl:80
   [6] lead(::AbstractAlgebra.Generic.Poly{nf_elem}) at ./deprecated.jl:71
   [7] leading_coefficient(::AbstractAlgebra.Generic.Poly{nf_elem}) at /home/wbhart/.julia/dev/Hecke/src/Misc/Poly.jl:127
   [8] lead(::AbstractAlgebra.Generic.Poly{nf_elem}) at ./deprecated.jl:72
   ... (the last 2 lines are repeated 9389 more times)
   [18787] leading_coefficient(::AbstractAlgebra.Generic.Poly{nf_elem}) at /home/wbhart/.julia/dev/Hecke/src/Misc/Poly.jl:127
   [18788] _preproc_pol(::AbstractAlgebra.Generic.Poly{nf_elem}, ::AbstractAlgebra.Generic.Poly{nf_elem}) at /home/wbhart/.julia/dev/Hecke/src/NumField/NfAbs/Poly.jl:142
   [18789] gcd_modular_kronnecker(::AbstractAlgebra.Generic.Poly{nf_elem}, ::AbstractAlgebra.Generic.Poly{nf_elem}, ::Bool) at /home/wbhart/.julia/dev/Hecke/src/NumField/NfAbs/Poly.jl:179
   [18790] gcd at /home/wbhart/.julia/dev/Hecke/src/NumField/NfAbs/Poly.jl:74 [inlined]
   [18791] issquarefree at /home/wbhart/.julia/dev/Hecke/src/NumField/NfAbs/Poly.jl:432 [inlined]
   [18792] isirreducible_easy(::AbstractAlgebra.Generic.Poly{nf_elem}) at /home/wbhart/.julia/dev/Hecke/src/NumField/NfAbs/Elem.jl:547
   [18793] isirreducible at /home/wbhart/.julia/dev/Hecke/src/NumField/NfAbs/Elem.jl:532 [inlined]
   [18794] #NumberField#1340 at /home/wbhart/.julia/dev/Hecke/src/NumField/NfRel/NfRel.jl:177 [inlined]
   [18795] #NumberField#1341 at /home/wbhart/.julia/dev/Hecke/src/NumField/NfRel/NfRel.jl:183 [inlined]
   [18796] NumberField(::AbstractAlgebra.Generic.Poly{nf_elem}) at /home/wbhart/.julia/dev/Hecke/src/NumField/NfRel/NfRel.jl:183
   [18797] top-level scope at /home/wbhart/.julia/dev/Hecke/test/NumField/Elem.jl:7
   [18798] top-level scope at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/Test/src/Test.jl:1115
   [18799] top-level scope at /home/wbhart/.julia/dev/Hecke/test/NumField/Elem.jl:2
   [18800] include(::String) at ./client.jl:457
   [18801] top-level scope at /home/wbhart/.julia/dev/Hecke/test/NumField.jl:2
   [18802] top-level scope at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/Test/src/Test.jl:1115
   [18803] top-level scope at /home/wbhart/.julia/dev/Hecke/test/NumField.jl:2
   [18804] include(::String) at ./client.jl:457
   [18805] top-level scope at timing.jl:174
   [18806] top-level scope at /home/wbhart/.julia/dev/Hecke/test/runtests.jl:78
   [18807] include(::String) at ./client.jl:457
   [18808] top-level scope at none:6
   [18809] eval(::Module, ::Any) at ./boot.jl:331
   [18810] exec_options(::Base.JLOptions) at ./client.jl:272
  in expression starting at /home/wbhart/.julia/dev/Hecke/test/NumField/Elem.jl:1

@thofma
Copy link
Member

thofma commented Mar 19, 2021

Yeah, I just saw it locally. There is a recursion:

       [6] lead(f::AbstractAlgebra.Generic.Poly{nf_elem})
         @ AbstractAlgebra ./deprecated.jl:71
       [7] leading_coefficient(f::AbstractAlgebra.Generic.Poly{nf_elem})
         @ Hecke ~/.julia/packages/Hecke/qJVuE/src/Misc/Poly.jl:127
       [8] lead(f::AbstractAlgebra.Generic.Poly{nf_elem})
         @ AbstractAlgebra ./deprecated.jl:72

I think we can merge as is.

@wbhart
Copy link
Contributor Author

wbhart commented Mar 19, 2021

Maybe. I'm trying the Hecke tests with this, the Nemo and Hecke patches all dev'd (so there are no deprecations activated).

Let me check that works first.

@wbhart
Copy link
Contributor Author

wbhart commented Mar 19, 2021

The issue is likely that Hecke currently defines leading_coefficient to be lead.

@thofma
Copy link
Member

thofma commented Mar 19, 2021

I removed the method in Hecke locally and I am now running the tests.

@wbhart
Copy link
Contributor Author

wbhart commented Mar 19, 2021

Naturally my Hecke PR already removes this method that is causing the recursion.

@wbhart
Copy link
Contributor Author

wbhart commented Mar 19, 2021

Remarkably Hecke passes without any issues with this, the Nemo and Hecke PRs that I made.

I'm surprised about that, but you can't help good luck!

@thofma
Copy link
Member

thofma commented Mar 19, 2021

Yes, very nice. Feel free to merge #803, #805, #806 in whatever order is the easiest.

@wbhart
Copy link
Contributor Author

wbhart commented Mar 19, 2021

Nemo also. We should buy a lottery ticket!

So if you want to go ahead and review and merge this PR, you are welcome to.

Then I will rebase my multivariates on it while you review and merge #806
assuming it doesn't also need a rebase.

@wbhart wbhart changed the title [WIP] Deprecate lead, trail, lm, lt, lc, valence and coeffs. Deprecate lead, trail, lm, lt, lc, valence and coeffs. Mar 19, 2021
@wbhart wbhart mentioned this pull request Mar 19, 2021
src/AbstractAlgebra.jl Show resolved Hide resolved
src/AbstractAlgebra.jl Show resolved Hide resolved
src/AbstractAlgebra.jl Show resolved Hide resolved
src/AbstractAlgebra.jl Show resolved Hide resolved
@wbhart
Copy link
Contributor Author

wbhart commented Mar 19, 2021

Thanks. I haven't set my VS Code editor up correctly yet. So it still uses tabs equal to 4 spaces and uses actual tabs not spaces. I just didn't find time for that yet. Still so many other problems with my new laptop. :-(

@wbhart
Copy link
Contributor Author

wbhart commented Mar 19, 2021

Are all the Oscar CI runs strictly necessary? It looks like there's still about 3 hours of CI before we get an answer on this one!

Can't we cut the Oscar CI runs down to a bare minimum?

@thofma
Copy link
Member

thofma commented Mar 19, 2021

At the moment the backlog is for the normal "Run tests", which are just the usual AA tests, see https://github.com/Nemocas/AbstractAlgebra.jl/actions. The problem is that it runs the tests on every commit, but does not cancel the old runs. Do you know if one can make it cancel the old runs with GitHub Actions @benlorenz?

@thofma
Copy link
Member

thofma commented Mar 19, 2021

Oh boy, it created a lot of combinations to check. We have to tweak this a bit I think.

@wbhart
Copy link
Contributor Author

wbhart commented Mar 19, 2021

Ja

@thofma
Copy link
Member

thofma commented Mar 19, 2021

I can't tweak it right now. You have tested it locally. Should we just merge?

@wbhart
Copy link
Contributor Author

wbhart commented Mar 19, 2021

I'd say so. I've only tested it as far as Nemo and Hecke. I can't test it further in any easy manner right now. In particular I do not guarantee that the patches against Singular and Oscar are correct. They should be carefully reviewed before merging them.

@wbhart
Copy link
Contributor Author

wbhart commented Mar 19, 2021

Technically I didn't test against the changes you made that I merged. But if you are confident of no typos...

@wbhart
Copy link
Contributor Author

wbhart commented Mar 19, 2021

They were just whitespace anyhow, assuming you didn't delete a comma by accident

@wbhart
Copy link
Contributor Author

wbhart commented Mar 19, 2021

I think it is not currently as useful as it could be. For example, it might be useful to know if Singular#deprecate_coeffs, Nemo#deprecate_coeffs, AA#deprecate_coeffs passes, but not with Oscar#master,Hecke#master if there are also deprecate_coeffs PRs for those packages.

Somehow I really want to know where in the chain things broke.

@wbhart
Copy link
Contributor Author

wbhart commented Mar 19, 2021

Also I guess now that we are maintaining master against master it is not likely that master against releases is going to pass due to package manager things.

@thofma
Copy link
Member

thofma commented Mar 19, 2021

Yeah, it should probably disable the other tests if it finds a branch in a downstream package. I don't know how easy this is. I will mention it to Benjamin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants