Skip to content

Conversation

LecrisUT
Copy link
Collaborator

  • Separated the rules to be independent of each other and made advanced variables to control their settings
  • Made the macro definition PRIVATE because they only affect the library compilation and not spglib.h
  • Simplified various debug statements since most of them are optimized by compiler when empty. Good coding practices these days is to avoid #ifdef and macros as much as possible.
  • @atztogo you have copyright of niggli.c and it said to be part of a different project, so I have to ask your approval for 32bae2b. Generally I avoid including code from project to project and then editing it, and when I do copy around and have full copyright, I tend to remove and migrate the copyright to avoid such confusions
  • What's the deal with c2efc49? Those functions are not used anywhere. Is it for future implementation, in which case it should be moved to a separate file, and be marked for experimental builds

@LecrisUT LecrisUT requested a review from atztogo June 15, 2023 11:25
@codecov-commenter
Copy link

codecov-commenter commented Jun 15, 2023

Codecov Report

Patch coverage has no change and project coverage change: -14.10 ⚠️

Comparison is base (94d288f) 85.92% compared to head (bd8019a) 71.82%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files
@@             Coverage Diff              @@
##           develop     #293       +/-   ##
============================================
- Coverage    85.92%   71.82%   -14.10%     
============================================
  Files           23       22        -1     
  Lines         6081     5793      -288     
============================================
- Hits          5225     4161     -1064     
- Misses         856     1632      +776     
Flag Coverage Δ
c_api 71.82% <ø> (-2.39%) ⬇️
fortran_api 36.16% <ø> (-1.22%) ⬇️
python_api ?

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

Impacted Files Coverage Δ
src/niggli.c 56.87% <ø> (-28.41%) ⬇️
src/pointgroup.c 72.36% <ø> (-4.59%) ⬇️
src/primitive.c 68.40% <ø> (-6.40%) ⬇️
src/spglib.c 61.45% <ø> (-11.55%) ⬇️
src/symmetry.c 57.77% <ø> (-22.93%) ⬇️

... and 16 files with indirect coverage changes

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

@atztogo
Copy link
Collaborator

atztogo commented Jun 15, 2023

  • @atztogo you have copyright of niggli.c and it said to be part of a different project, so I have to ask your approval for [32bae2b]. Generally I avoid including code from project to project and then editing it, and when I do copy around and have full copyright, I tend to remove and migrate the copyright to avoid such confusions

It's perfectly no problem. My aim was to make it a stand alone routine. I should do like you wrote. We can migrate the copyright.

@LecrisUT
Copy link
Collaborator Author

Thanks for the clarification. I should leave that commit to you. You can simply pull my branch and push directly to it.

@atztogo
Copy link
Collaborator

atztogo commented Jun 15, 2023

What's the deal with c2efc49? Those functions are not used anywhere. Is it for future implementation, in which case it should be moved to a separate file, and be marked for experimental builds

If it is who I wrote, I think it can be removed.

@atztogo
Copy link
Collaborator

atztogo commented Jun 15, 2023

Thanks for the clarification. I should leave that commit to you. You can simply pull my branch and push directly to it.

Sorry for bothering you. How can I do it concretely?

@LecrisUT
Copy link
Collaborator Author

What's the deal with c2efc49? Those functions are not used anywhere. Is it for future implementation, in which case it should be moved to a separate file, and be marked for experimental builds

If it is who I wrote, I think it can be removed.

It goes all the way back to "First commit on github" 10 year ago:

Sorry for bothering you. How can I do it concretely?

No problem at all:

Assuming you push using ssh, otherwise change it to https
$ git remote add LecrisUT git@github.com:LecrisUT/spglib.git
$ git fetch LecrisUT
$ git checkout LecrisUT/debug-warnings
Edit to your heart's content
$ vi src/niggli.c
Then do the usual
$ git commit -s
Now just specify my remote instead of origin
$ git push LecrisUT

@atztogo
Copy link
Collaborator

atztogo commented Jun 15, 2023

It goes all the way back to "First commit on github" 10 year ago:

Then, it's definitely me. Let's remove it. Spglib was born in Aachen more than 10 years ago.

Thanks for your instruction about git.

@atztogo
Copy link
Collaborator

atztogo commented Jun 19, 2023

@LecrisUT, thanks for all of these improvements.

@LecrisUT
Copy link
Collaborator Author

Actually I was looking at the debug in the tests and I find the debug messages too spamy to be useful to navigate so I want to get your opinion about it (not for this PR). Have you used the breakpoint debugger in VSCode? Do you find it more useful than the manual printing? I find that the usage of all of the debug_print and warning_print are equivalent with what you achieve with breakpoint debugger, and if these can be eliminated in favor of the latter, it will make debugging of the test cases much more manageable.

@atztogo
Copy link
Collaborator

atztogo commented Jun 19, 2023

Of course I am happy to move to the modern world!

@atztogo
Copy link
Collaborator

atztogo commented Jun 19, 2023

When I started to learn C, google didn't exist.

@LecrisUT
Copy link
Collaborator Author

Great, just wanted to make sure if it's not part of a developer's active setup, and if it is, if they need some help setting up the IDE debugger to work around it. I will leave it to @lan496 to merge this one after he's caught up with the discussion.

LecrisUT and others added 8 commits June 19, 2023 15:53
Signed-off-by: Cristian Le <cristian.le@mpsd.mpg.de>
- Also do not propagate the definition flags

Signed-off-by: Cristian Le <cristian.le@mpsd.mpg.de>
Signed-off-by: Cristian Le <cristian.le@mpsd.mpg.de>
Signed-off-by: Cristian Le <cristian.le@mpsd.mpg.de>
These are optimized out by the compiler, no need for #ifdef guards

Signed-off-by: Cristian Le <cristian.le@mpsd.mpg.de>
Signed-off-by: Cristian Le <cristian.le@mpsd.mpg.de>
Signed-off-by: Atsushi Togo <atz.togo@gmail.com>
Signed-off-by: Cristian Le <cristian.le@mpsd.mpg.de>
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!

@lan496 lan496 merged commit 8e426ac into spglib:develop Jun 20, 2023
@LecrisUT LecrisUT deleted the debug-warnings branch June 20, 2023 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants