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

Add fit! for all MPolyRingElem subtypes #1823

Merged
merged 1 commit into from
Sep 24, 2024
Merged

Conversation

lgoettgens
Copy link
Collaborator

The MPoly interface (https://nemocas.github.io/AbstractAlgebra.jl/dev/mpoly_interface/#Unsafe-functions) states that these must exist. When trying to run the UnivPoly testsuite from AA with Nemo rings to verify the correctness of my changes for Nemocas/AbstractAlgebra.jl#1746, there were a lot of MethodErrors due to these missing.
One could potentially look in FLINT if there are corresponding functions there that can be hooked up, but that is not needed currently.

Copy link

codecov bot commented Jul 12, 2024

Codecov Report

Attention: Patch coverage is 0% with 12 lines in your changes missing coverage. Please review.

Project coverage is 87.08%. Comparing base (4e6ffb0) to head (7a2306f).
Report is 39 commits behind head on master.

Files with missing lines Patch % Lines
src/flint/fmpq_mpoly.jl 0.00% 2 Missing ⚠️
src/flint/fmpz_mod_mpoly.jl 0.00% 2 Missing ⚠️
src/flint/fmpz_mpoly.jl 0.00% 2 Missing ⚠️
src/flint/fq_default_mpoly.jl 0.00% 2 Missing ⚠️
src/flint/fq_nmod_mpoly.jl 0.00% 2 Missing ⚠️
src/flint/nmod_mpoly.jl 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1823      +/-   ##
==========================================
+ Coverage   86.08%   87.08%   +0.99%     
==========================================
  Files          98       99       +1     
  Lines       36398    44517    +8119     
==========================================
+ Hits        31334    38768    +7434     
- Misses       5064     5749     +685     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -145,6 +145,11 @@ for (etype, rtype, ftype, ctype) in (
a, parent(a)))
end

function fit!(a::($etype), n::Int)
# needs to exist for the MPoly interface
return nothing
Copy link
Member

Choose a reason for hiding this comment

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

If an empty method is a valid default implementation, then why don't we just add fit!(::MPolyRing) = nothing to AbstractAlgebra instead of this PR here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

from the way that the MPoly interface is formulated in the AA docs, it seemed to me that this function should not have a default implementation. Here, it is fine to do it like this, since Flint does not have the need of this getting called.

@fingolfin fingolfin closed this Sep 24, 2024
@fingolfin fingolfin reopened this Sep 24, 2024
@fingolfin fingolfin enabled auto-merge (squash) September 24, 2024 19:37
@fingolfin fingolfin merged commit be1cf81 into Nemocas:master Sep 24, 2024
48 of 51 checks passed
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.

2 participants