Skip to content

Setup examples/tutorials for the C API - #313

Merged
EricBoittier merged 3 commits into
metatensor:metatomic-corefrom
Luthaf:setup-examples
Sep 8, 2026
Merged

Setup examples/tutorials for the C API#313
EricBoittier merged 3 commits into
metatensor:metatomic-corefrom
Luthaf:setup-examples

Conversation

@Luthaf

@Luthaf Luthaf commented Sep 2, 2026

Copy link
Copy Markdown
Member

This re-opens #305 which was merged without review.

This PR uses sphinx-gallery ability to parse non-Python examples to make tutorial for the C API. The corresponding code is tested separately, since sphinx does not know how to run it.

Contributor (creator of pull-request) checklist

  • Tests updated (for new features and bugfixes)?
  • Documentation updated (for new features)?
  • Issue referenced (for PRs that solve an issue)?

Reviewer checklist

  • CHANGELOG updated with public API or any other important changes?

@Luthaf
Luthaf requested a review from EricBoittier September 2, 2026 12:02

@EricBoittier EricBoittier left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good to me

@EricBoittier EricBoittier left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review of code up to and including "1-create-system.c"

Follow-up PR for other examples (e.g. models, plugins, engines, etc) to come

Comment thread examples/c/1-create-system.c
Comment thread examples/c/1-create-system.c
Comment thread examples/c/README.rst
Comment thread docs/src/examples/index.rst Outdated
Comment thread examples/c/1-create-system.c Outdated
Comment thread examples/c/1-create-system.c Outdated
Comment thread examples/c/1-create-system.c Outdated
Comment thread docs/src/examples/index.rst Outdated
@EricBoittier EricBoittier self-assigned this Sep 8, 2026
@EricBoittier

This comment was marked as outdated.

@Luthaf

Luthaf commented Sep 8, 2026

Copy link
Copy Markdown
Member Author

Ok, this has been cleaned up and now contains two tutorials about how to work with mta_system_t from C. @EricBoittier upcoming tutorials are in a separate PR in #320.

Let's finish reviewing these and merge them, and then we'll do the new tutorials!

@Luthaf
Luthaf requested review from EricBoittier and RMeli September 8, 2026 14:42

@EricBoittier EricBoittier left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks fine, apart from the materials in later tutorials which will be amended in the upcoming PR #320

@EricBoittier
EricBoittier merged commit ad8e43a into metatensor:metatomic-core Sep 8, 2026
66 of 74 checks passed
@Luthaf Luthaf mentioned this pull request Sep 9, 2026
4 tasks
Luthaf added a commit that referenced this pull request Sep 9, 2026
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