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

Reduce some code duplication, set some parents #1887

Merged
merged 1 commit into from
Oct 11, 2024
Merged

Reduce some code duplication, set some parents #1887

merged 1 commit into from
Oct 11, 2024

Conversation

fingolfin
Copy link
Member

No description provided.

Copy link

codecov bot commented Oct 9, 2024

Codecov Report

Attention: Patch coverage is 90.19608% with 5 lines in your changes missing coverage. Please review.

Project coverage is 87.23%. Comparing base (ae8c64d) to head (6ea004c).
Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
src/flint/FlintTypes.jl 90.19% 5 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1887   +/-   ##
=======================================
  Coverage   87.23%   87.23%           
=======================================
  Files          97       97           
  Lines       35758    35669   -89     
=======================================
- Hits        31194    31117   -77     
+ Misses       4564     4552   -12     

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

Copy link
Collaborator

@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.

Changes look good.
I was a bit confused, that the constructors of e.g. ZZModPolyRingElem don't set any parent. Maybe this can be tackled once #1889 is through with separating the flint from the nemo fields.

@fingolfin
Copy link
Member Author

As you probably know, a bunch of these Nemo types are designed to not require a parent to be set, so one does not have to bother with creating one.

Come to think of, perhaps that's why the lines z.parent = a.parent were missing in the first place: if the input has no parent set, then this line will produce an error. So perhaps some if isdefined(...) need to be added..

@fingolfin
Copy link
Member Author

Resolved merge conflict and added checks like this:

    if isdefined(a, :parent)
      z.parent = a.parent
    end

@fingolfin fingolfin merged commit 0f5fb24 into master Oct 11, 2024
25 checks passed
@fingolfin fingolfin deleted the mh/dedup branch October 11, 2024 12:01
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