Skip to content

Conversation

atztogo
Copy link
Collaborator

@atztogo atztogo commented Aug 6, 2022

spg_get_spacegroup_type_from_symmetry is implemented to replace spg_get_hall_number_from_symmetry that is deprecated at v2.0.

  • C-API
  • test.c
  • Python-API
  • pytest

@codecov-commenter
Copy link

codecov-commenter commented Aug 6, 2022

Codecov Report

Merging #176 (008a290) into develop (9df1894) will increase coverage by 0.55%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##           develop     #176      +/-   ##
===========================================
+ Coverage    84.63%   85.19%   +0.55%     
===========================================
  Files           14       16       +2     
  Lines         1204     1317     +113     
===========================================
+ Hits          1019     1122     +103     
- Misses         185      195      +10     
Impacted Files Coverage Δ
spglib/__init__.py 100.00% <0.00%> (ø)
test/conftest.py 85.52% <0.00%> (ø)
test/test_spacegrouop_type_from_symmetry.py 100.00% <0.00%> (ø)
spglib/spglib.py 80.60% <0.00%> (+0.72%) ⬆️
test/test_hall_number_from_symmetry.py 100.00% <0.00%> (+6.06%) ⬆️

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

@atztogo
Copy link
Collaborator Author

atztogo commented Aug 6, 2022

@lan496

  • Added conftest.py, please have a look at test_spacegrouop_type_from_symmetry.py.
  • python/_spglib.c was formatted and many lines were modified, but real change is only addition of py_get_spacegroup_type_from_symmetry.
  • Docstrings of spglib.py were updated, and that for get_magnetic_symmetry_dataset was slightly modified to use a similar manner (numpy like).

Copy link
Member

@lan496 lan496 left a comment

Choose a reason for hiding this comment

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

LGTM! I left a tiny comment.

Yesterday, I learned unittest2pytest, which seems to help migrate bulit-in unittest to pytest.

@atztogo
Copy link
Collaborator Author

atztogo commented Aug 7, 2022

Yesterday, I learned unittest2pytest, which seems to help migrate bulit-in unittest to pytest.

For me, manual migration is easy because I wrote the current tests. But I agree, in general, it is a good idea to use those convenient tools.

@atztogo atztogo changed the title (WIP) Implement spg_get_spacegroup_type_from_symmetry Implement spg_get_spacegroup_type_from_symmetry Aug 7, 2022
@atztogo atztogo merged commit b2662f7 into develop Aug 7, 2022
@atztogo atztogo deleted the get-spgtype-from-sym branch August 7, 2022 03:27
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.

3 participants