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.

Comment thread test/test_magnetic_symmetry.cpp Outdated
Co-authored-by: Cristian Le <github@lecris.me>
@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

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.90%. Comparing base (06f1799) to head (b67fcc7).
⚠️ Report is 629 commits behind head on develop.

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.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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?

Comment thread src/magnetic_spacegroup.c Outdated
Comment thread test/test_magnetic_symmetry.cpp
@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