Skip to content

Validate type of MSG#267

Merged
lan496 merged 6 commits intospglib:developfrom
lan496:fix-construct-type-validation
Apr 6, 2023
Merged

Validate type of MSG#267
lan496 merged 6 commits intospglib:developfrom
lan496:fix-construct-type-validation

Conversation

@lan496
Copy link
Copy Markdown
Member

@lan496 lan496 commented Apr 2, 2023

Fixes: #249

In the example, the orders of FSG and XSG are not consistent due to high mag_symprec.
The PR validates the consistency (by checking a returned construct type from 1 to 4).

@LecrisUT LecrisUT added the bug label Apr 3, 2023
@lan496
Copy link
Copy Markdown
Member Author

lan496 commented Apr 6, 2023

@LecrisUT The test with Address sanitizer for LLVM failed, but one for GCC succeeded. I have no idea why this difference happened. Do you have any idea?

@LecrisUT

This comment was marked as outdated.

@LecrisUT

This comment was marked as outdated.

@lan496 lan496 force-pushed the fix-construct-type-validation branch from 2fb7cd8 to 2722601 Compare April 6, 2023 13:41
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 6, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.20 🎉

Comparison is base (06f1799) 85.69% compared to head (b67fcc7) 85.90%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #267      +/-   ##
===========================================
+ Coverage    85.69%   85.90%   +0.20%     
===========================================
  Files           23       23              
  Lines         6069     6071       +2     
===========================================
+ Hits          5201     5215      +14     
+ Misses         868      856      -12     
Flag Coverage Δ
c_api 74.23% <100.00%> (+0.52%) ⬆️
fortran_api 37.36% <0.00%> (-0.02%) ⬇️
python_api 82.83% <50.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/magnetic_spacegroup.c 87.92% <100.00%> (+3.22%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Copy Markdown
Collaborator

@LecrisUT LecrisUT left a comment

Choose a reason for hiding this comment

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

When possible, can you add some quick comments in the code, e.g. why ASSERT_TRUE(size>0), or why/where it should fail?

@LecrisUT LecrisUT requested a review from atztogo April 6, 2023 14:06
Copy link
Copy Markdown
Collaborator

@LecrisUT LecrisUT left a comment

Choose a reason for hiding this comment

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

LGTM now w.r.t. C coding, but I'll let you guys confirm the technical details of this

@lan496
Copy link
Copy Markdown
Member Author

lan496 commented Apr 6, 2023

@LecrisUT Many thanks! I'll merge this PR after atztogo checks.

@atztogo
Copy link
Copy Markdown
Collaborator

atztogo commented Apr 6, 2023

Thanks @lan496 and @LecrisUT!

@lan496 lan496 merged commit 1945d46 into spglib:develop Apr 6, 2023
@lan496 lan496 deleted the fix-construct-type-validation branch April 6, 2023 22:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

get_magnetic_symmetry_dataset causes segmentation fault for higher mag_symprec

4 participants