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

Remove anonymous functions from sheaves #4121

Conversation

HechtiDerLachs
Copy link
Collaborator

Also fixes the issue pointed out by @simonbrandhorst on #4110 .

Copy link

codecov bot commented Sep 19, 2024

Codecov Report

Attention: Patch coverage is 76.36364% with 104 lines in your changes missing coverage. Please review.

Project coverage is 84.66%. Comparing base (90c2c88) to head (240be1e).
Report is 12 commits behind head on master.

Files with missing lines Patch % Lines
src/AlgebraicGeometry/Schemes/Sheaves/Methods.jl 76.54% 99 Missing ⚠️
...gebraicGeometry/Schemes/Sheaves/CoherentSheaves.jl 85.71% 2 Missing ⚠️
...metry/Schemes/PrincipalOpenSubset/Objects/Types.jl 0.00% 1 Missing ⚠️
src/AlgebraicGeometry/Schemes/Sheaves/Sheaves.jl 0.00% 1 Missing ⚠️
src/AlgebraicGeometry/Schemes/Sheaves/Types.jl 50.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           master    #4121    +/-   ##
========================================
  Coverage   84.65%   84.66%            
========================================
  Files         626      627     +1     
  Lines       84218    84342   +124     
========================================
+ Hits        71298    71410   +112     
- Misses      12920    12932    +12     
Files with missing lines Coverage Δ
...metry/Schemes/PrincipalOpenSubset/Objects/Types.jl 34.78% <0.00%> (ø)
src/AlgebraicGeometry/Schemes/Sheaves/Sheaves.jl 56.25% <0.00%> (-9.11%) ⬇️
src/AlgebraicGeometry/Schemes/Sheaves/Types.jl 93.58% <50.00%> (+6.68%) ⬆️
...gebraicGeometry/Schemes/Sheaves/CoherentSheaves.jl 79.36% <85.71%> (+1.54%) ⬆️
src/AlgebraicGeometry/Schemes/Sheaves/Methods.jl 76.54% <76.54%> (ø)

... and 9 files with indirect coverage changes

Copy link
Collaborator

@afkafkafk13 afkafkafk13 left a comment

Choose a reason for hiding this comment

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

I had always been confused by your production_function and restriction_function arguments. This is now a lot clearer (thanks to the needs of serialization efforts).

Overall this looks good, but moving stuff at the same time as making this change was not overly helpful for reviewing.

@afkafkafk13
Copy link
Collaborator

Let me know, wether you are still adding stuff to this or whether you would like a complete review.

@HechtiDerLachs
Copy link
Collaborator Author

Thanks for having a look. Unfortunately, moving the functions was unavoidable. Yes, a full review would be appreciated. Nothing changed about the internal mathematics, though.

Copy link
Collaborator

@afkafkafk13 afkafkafk13 left a comment

Choose a reason for hiding this comment

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

I marked two places where comments should be changed to reflect the current implementation. Otherwise this is good to go.

Comment on lines 61 to 62
### temporary workaround
produce_object(F::AbsPreSheaf, U::AbsAffineScheme) = production_func(F)(F, U)
produce_object(F::AbsPreSheaf, U::AbsAffineScheme) = produce_object(underlying_presheaf(F), U)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is the comment about the temporary workaround still valid? If not, please change.

Comment on lines 45 to 48
# production functions for new objects
is_open_func::Function # To check whether one set is open in the other
production_func::Union{Function, Nothing} # To produce ℱ(U) for U ⊂ X
restriction_func::Union{Function, Nothing} # To produce the restriction maps ℱ(U) → ℱ(V) for V ⊂ U ⊂ X open
Copy link
Collaborator

Choose a reason for hiding this comment

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

here again: please check whether the comment still reflects the current situation and change, if necessary. We do not want to confuse programmers who take a look at this as a model.

@simonbrandhorst simonbrandhorst enabled auto-merge (squash) September 20, 2024 11:13
@simonbrandhorst simonbrandhorst merged commit c64a7ca into oscar-system:master Sep 20, 2024
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants