Skip to content

Conversation

singularitti
Copy link
Contributor

Greetings,
As a user of spglib and an active contributor within the Julia community, I have successfully ported the C-API to Julia, which can be accessed here. However, the magnetic interface is yet to be implemented and I would greatly appreciate any assistance in this regard.
The Spglib.jl is already being utilized by some individuals, and it is my aspiration to further promote both spglib and Spglib.jl, thereby expanding their user base.

@LecrisUT
Copy link
Collaborator

LecrisUT commented Oct 1, 2023

LGTM @atztogo @lan496 thoughts?

On my side I only have a few CI questions outside of this PR:

  • how do you keep track of new releases? And where does the project define how the cmake is built?
  • is it possible to run the CI on spglib main so that we can see if there are breaking changes to report? Maybe if you can make a reusable workflow that can be imported and run here?

@codecov-commenter
Copy link

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (02a58c6) 83.53% compared to head (bf8aad9) 83.53%.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #340   +/-   ##
========================================
  Coverage    83.53%   83.53%           
========================================
  Files           24       24           
  Lines         8157     8157           
========================================
  Hits          6814     6814           
  Misses        1343     1343           
Flag Coverage Δ
c_api 76.10% <ø> (ø)
fortran_api 54.97% <ø> (ø)
python_api 80.42% <ø> (ø)
unit_tests 1.24% <ø> (ø)

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.

@singularitti
Copy link
Contributor Author

singularitti commented Oct 1, 2023

I'm not the expert but I will try to answer these questions:

how do you keep track of new releases? And where does the project define how the cmake is built?

Julia has a mechanism called "artifacts", which ships binary executables or libraries. In the building package of that artifact (in this case, the package spglib_jll.jl), almost all platforms are supported uniformly. So in any platform that supports Julia, you could use spglib_jll with the same API without building it by yourself.

But spglib_jll is just a plain Julia wrapper that wraps around the dynamic library file, it does not provide any native data structure and function support for Julia. That's why I wrapped it again to be a useful package Spglib.jl.

To keep track of the latest release of spglib, whenever there is a new release of spglib, we ship a new version of spglib_jll, with the same version number plus a suffix, like v2.0.2+0.
The building script is here.
We use Docker containers to provide building environments to debug locally, and once it is finished, we push it to GitHub and let CI build the spglib_jll package.

However, I do have problems building the v2.1.0 version of spglib, I do not know which part of the script is wrong since it was successful in the past.
The build errors are here.
I guess you changed some dependencies in this version? Would you mind telling me what might affect the building process? The changelog from v2.0.2 to v2.1.0 is too long and I cannot go through it immediately.

is it possible to run the CI on spglib main so that we can see if there are breaking changes to report? Maybe if you can make a reusable workflow that can be imported and run here?

I'm not sure about what you mean here. I currently put all tests here. Most of the CI builds are successful. Here is one example (The errors are intentional since the package only works on Julia v1.6+.

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 requested a review from atztogo October 1, 2023 23:55
@LecrisUT
Copy link
Collaborator

LecrisUT commented Oct 2, 2023

I've responded in the julia PR about the packaging. But otherwise it seems the updates are opened manually? It is preferable that there is some automation for the release also for rc when possible.

is it possible to run the CI on spglib main so that we can see if there are breaking changes to report? Maybe if you can make a reusable workflow that can be imported and run here?

I'm not sure about what you mean here. I currently put all tests here. Most of the CI builds are successful. Here is one example (The errors are intentional since the package only works on Julia v1.6+.

I mean, can you make a github workflow that builds spglib_jll and than triggers the tests in Spglib.jl linked to that? We can then try out a design where your workflow is called within this repo. That way we are also made aware of any potential errors downstream. We currently have this for Fedora and partially for conda through release candidates.

@atztogo
Copy link
Collaborator

atztogo commented Oct 2, 2023

Thanks @singularitti. It is very nice to inform the existence of the Julia interface from the documentation officially.

@LecrisUT LecrisUT merged commit 37ec2a0 into spglib:develop Oct 2, 2023
@singularitti
Copy link
Contributor Author

Thank you very much! I'll look into the spglib_jll build errors.

@singularitti singularitti deleted the patch-1 branch October 2, 2023 05:11
@singularitti
Copy link
Contributor Author

Sorry, would you mind changing the title to "Rust, Fortran, Julia, and Ruby interfaces"? I forgot to update that.

@LecrisUT
Copy link
Collaborator

LecrisUT commented Oct 2, 2023

I think we'll refactor that to something else to include packaging as well

@singularitti
Copy link
Contributor Author

Cool! Please inform me if there's anything I can help.

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.

5 participants