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

Resolve unbound type parameters #4363

Merged
merged 10 commits into from
Jan 15, 2025
Merged

Resolve unbound type parameters #4363

merged 10 commits into from
Jan 15, 2025

Conversation

fingolfin
Copy link
Member

This also removes some of the ambiguities for direct_product,
direct_sum, tensor_product with empty argument list.

Re-enable Aqua test for unbound type parameters.

Copy link
Member

@lgoettgens lgoettgens left a comment

Choose a reason for hiding this comment

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

Missing docstring for direct_sum(M::ModuleFP{T}...; task::Symbol = :sum) where T. Check Documenter's build log for details.' in @docs block in src/CommutativeAlgebra/ModulesOverMultivariateRings/module_operations.md:29-31

I think you need to update the docstring signature at this place as well

fingolfin and others added 10 commits January 15, 2025 15:52
This also removes some of the ambiguities for direct_product,
direct_sum, tensor_product with empty argument list.

Re-enable Aqua test for unbound type parameters.
@fingolfin fingolfin force-pushed the mh/Aqua-unbound_args branch from 5372ad2 to 9b802ac Compare January 15, 2025 14:54
1: direct sum of (Multivariate polynomial ring in 1 variable over GF(7)^1, Multivariate polynomial ring in 1 variable over GF(7)^1)
2: direct sum of (Multivariate polynomial ring in 1 variable over GF(7)^1, Multivariate polynomial ring in 1 variable over GF(7)^1)
1: direct sum of FreeMod{FqMPolyRingElem}[Multivariate polynomial ring in 1 variable over GF(7)^1, Multivariate polynomial ring in 1 variable over GF(7)^1]
2: direct sum of FreeMod{FqMPolyRingElem}[Multivariate polynomial ring in 1 variable over GF(7)^1, Multivariate polynomial ring in 1 variable over GF(7)^1]
Copy link
Member Author

Choose a reason for hiding this comment

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

The changed docstring is caused by the attribute direct_product changing from a Tuple to a Vector, and it gets printed raw by this function:

function Hecke.show_direct_sum(io::IO, G)
  D = get_attribute(G, :direct_product)
  D === nothing && error("only for direct sums")
  print(io, "direct sum of ")
  show(IOContext(io, :compact => true), D)
end

For nicer printing, that function (and its siblings around it) should be improved.

That leave the question whether the change from tuple to vector is fine. I had a quick look at the code using this attribute and I believe it is all fine either. Long term a vector IMO makes more sense there.

CC @HechtiDerLachs

Copy link
Collaborator

@HechtiDerLachs HechtiDerLachs left a comment

Choose a reason for hiding this comment

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

Looks fine from my side, if the tests pass.

It seems that most of the relevant changes were for the modules and only revealed in my code because I use them. I'm afraid, I'm not qualified to change the printing of modules myself.

Copy link

codecov bot commented Jan 15, 2025

Codecov Report

Attention: Patch coverage is 82.60870% with 4 lines in your changes missing coverage. Please review.

Project coverage is 84.39%. Comparing base (ba3a8ac) to head (9b802ac).
Report is 101 commits behind head on master.

Files with missing lines Patch % Lines
...leAndHyperComplexes/src/Objects/tensor_products.jl 33.33% 4 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4363   +/-   ##
=======================================
  Coverage   84.39%   84.39%           
=======================================
  Files         668      668           
  Lines       88557    88567   +10     
=======================================
+ Hits        74736    74747   +11     
+ Misses      13821    13820    -1     
Files with missing lines Coverage Δ
experimental/GModule/src/Cohomology.jl 73.66% <100.00%> (+0.08%) ⬆️
...gebraicGeometry/Schemes/Sheaves/CoherentSheaves.jl 81.21% <ø> (ø)
src/Modules/UngradedModules/DirectSum.jl 85.07% <100.00%> (+0.69%) ⬆️
...leAndHyperComplexes/src/Objects/tensor_products.jl 90.56% <33.33%> (ø)

... and 1 file with indirect coverage changes

@fingolfin fingolfin merged commit d589f51 into master Jan 15, 2025
30 of 32 checks passed
@fingolfin fingolfin deleted the mh/Aqua-unbound_args branch January 15, 2025 21:44
@lgoettgens lgoettgens added the release notes: not needed PRs introducing changes that are wholly irrelevant to the release notes label Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release notes: not needed PRs introducing changes that are wholly irrelevant to the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants