-
Notifications
You must be signed in to change notification settings - Fork 132
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
Remove anonymous functions from sheaves #4121
Conversation
Codecov ReportAttention: Patch coverage is
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
|
There was a problem hiding this 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.
Let me know, wether you are still adding stuff to this or whether you would like a complete review. |
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. |
There was a problem hiding this 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.
### 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) |
There was a problem hiding this comment.
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.
# 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 |
There was a problem hiding this comment.
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.
* remove production_func and restriction_func.
Also fixes the issue pointed out by @simonbrandhorst on #4110 .