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

Simplify attribute handling using new @attr features #4476

Merged
merged 2 commits into from
Jan 25, 2025

Conversation

lgoettgens
Copy link
Member

@lgoettgens lgoettgens commented Jan 16, 2025

See Nemocas/AbstractAlgebra.jl#1958 for the changes to @attr. This PR needs to wait for Nemocas/AbstractAlgebra.jl#1958 to get released (x-ref Nemocas/AbstractAlgebra.jl#1963).

Furthermore, this includes #4475. Depending on the result there, this PR may need to get adapted.

This is a draft, since I want to look through all uses of other attribute-related functions like get_attribute and set_attribute! as well and do analogous changes for these as well.

The diff view may be a bit overwhelming and doesn't make much sense for this kind of change; instead you could look at the diff view with whitespace changes ignored: https://github.com/oscar-system/Oscar.jl/pull/4476/files?w=1

pinging some people that may benefit from this PR: @HereAround @simonbrandhorst @HechtiDerLachs

@lgoettgens lgoettgens added WIP NOT ready for merging needs aa update release notes: not needed PRs introducing changes that are wholly irrelevant to the release notes labels Jan 16, 2025
@lgoettgens lgoettgens marked this pull request as draft January 16, 2025 16:53
@HechtiDerLachs
Copy link
Collaborator

Looks reasonable to me. Let's see how the tests go, when they run. Thanks!

@lgoettgens lgoettgens removed the WIP NOT ready for merging label Jan 17, 2025
@lgoettgens lgoettgens marked this pull request as ready for review January 17, 2025 15:54
Copy link
Member

@fingolfin fingolfin left a comment

Choose a reason for hiding this comment

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

Looks good to me but yeah would be good if people whose code this is (@HereAround @HechtiDerLachs @simonbrandhorst) had a look.

@simonbrandhorst
Copy link
Collaborator

If the tests pass they pass. I do not see anything suspicious.

@lgoettgens lgoettgens marked this pull request as draft January 21, 2025 08:16
@lgoettgens
Copy link
Member Author

Let me re-draft this for the time being. I would prefer to first change the definition of @attr again and adapt this instead of merging this PR and doing a follow-up.

@lgoettgens
Copy link
Member Author

This is now rebased and uses Nemocas/AbstractAlgebra.jl#1966. So we need to wait until that is released in AA.

@lgoettgens lgoettgens closed this Jan 22, 2025
@lgoettgens lgoettgens reopened this Jan 22, 2025
Copy link

codecov bot commented Jan 22, 2025

Codecov Report

Attention: Patch coverage is 85.07937% with 47 lines in your changes missing coverage. Please review.

Project coverage is 84.55%. Comparing base (3932f48) to head (b346152).
Report is 6 commits behind head on master.

Files with missing lines Patch % Lines
src/Rings/mpoly-localizations.jl 35.29% 11 Missing ⚠️
...ry/Schemes/ProjectiveSchemes/Objects/Attributes.jl 53.84% 6 Missing ⚠️
...ry/Schemes/ProjectiveSchemes/Objects/Properties.jl 75.00% 6 Missing ⚠️
.../AlgebraicGeometry/Schemes/Sheaves/IdealSheaves.jl 87.17% 5 Missing ⚠️
...raicGeometry/Surfaces/EllipticSurface/Morphisms.jl 0.00% 4 Missing ⚠️
...perimental/Schemes/src/ToricDivisors/attributes.jl 80.00% 3 Missing ⚠️
...try/ToricVarieties/cohomCalg/special_attributes.jl 88.23% 2 Missing ⚠️
src/Groups/matrices/form_group.jl 88.88% 2 Missing ⚠️
src/Modules/Posur.jl 77.77% 2 Missing ⚠️
src/Rings/mpoly-ideals.jl 94.59% 2 Missing ⚠️
... and 4 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4476      +/-   ##
==========================================
- Coverage   84.55%   84.55%   -0.01%     
==========================================
  Files         672      672              
  Lines       88876    88811      -65     
==========================================
- Hits        75145    75090      -55     
+ Misses      13731    13721      -10     
Files with missing lines Coverage Δ
...heoryTools/src/AbstractFTheoryModels/attributes.jl 100.00% <100.00%> (ø)
...Tools/src/FamilyOfG4Fluxes/special_constructors.jl 77.41% <100.00%> (+0.30%) ⬆️
...ometry/Schemes/AffineSchemes/Objects/Attributes.jl 91.66% <100.00%> (-0.06%) ⬇️
...metry/Schemes/CoveredSchemes/Objects/Attributes.jl 98.18% <100.00%> (-0.04%) ⬇️
...icGeometry/Schemes/FunctionField/FunctionFields.jl 81.10% <100.00%> (-0.08%) ⬇️
...ometry/Surfaces/EllipticSurface/EllipticSurface.jl 83.62% <100.00%> (-0.03%) ⬇️
.../ToricVarieties/NormalToricVarieties/attributes.jl 98.67% <100.00%> (-0.01%) ⬇️
src/Groups/group_characters.jl 96.39% <100.00%> (ø)
src/Modules/mpolyquo-localizations.jl 88.76% <100.00%> (-0.13%) ⬇️
src/Rings/MPolyMap/AffineAlgebras.jl 95.95% <100.00%> (-0.05%) ⬇️
... and 18 more

... and 2 files with indirect coverage changes

@lgoettgens lgoettgens marked this pull request as ready for review January 22, 2025 17:51
Copy link
Member

@HereAround HereAround left a comment

Choose a reason for hiding this comment

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

Thank you for working on this @lgoettgens . I am very happy with those changes! Thus, as long as I am concerned, good to be merged.

@HereAround
Copy link
Member

@lgoettgens , am I right to assume that you wish to hear from @simonbrandhorst , @HechtiDerLachs and @fingolfin before this PR is being merged? Anything else holding this PR back?

@lgoettgens
Copy link
Member Author

2 approvals are enough for me right now. In case of any issues, we can adjust it again later. But now, let's get it merged, before we get any more conflicts

@lgoettgens lgoettgens merged commit a5038e9 into oscar-system:master Jan 25, 2025
33 of 60 checks passed
@lgoettgens lgoettgens deleted the lg/attr-ignore-kwargs branch January 25, 2025 21:07
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.

5 participants