Skip to content

Conversation

@szymonlopaciuk
Copy link
Collaborator

@szymonlopaciuk szymonlopaciuk commented Nov 14, 2025

Description

Further the implementation of include headers functionality:

  • Register headers for Xtrack the same way as the other packages (through the hook in pyproject.toml). This means the headers can also (and in the future should only) be included with #include "xtrack/..." without assuming xtrack is top-level. This is to avoid collisions with the other Xsuite packages. In the future the old way should be disabled.
  • Update the examples to use the new way.
  • Populate properly the pyproject.toml file. We can remove setup.py while still using setuptools, as it's not doing anything special currently.
  • Bump the supported Python version to 3.9+.
  • Move atomicAdd and qualifier keyword macros to Xobjects (see Bugfixes, more adjustments for include headers xobjects#160).
  • Implement what we can with headers (e.g. multisetter.h, local_particle_custom_api.h)
  • Get rid of the magic comment /*placeholder_for_local_particle_src*/ and the related behaviour (the functionality was unnecessarily convoluted as a result of ParticlesPurelyLongitudinal -- it is now simpler, is fact no need to regenerate and propagate local_particle_src as it's completely static in the current version of Xsuite).
  • The above also indirectly fixes a bug where /*placeholder...*/ would be ignored if the same snippet of code didn't contain //start_per_particle_block.

Checklist

Mandatory:

  • I have added tests to cover my changes
  • All the tests are passing, including my new ones
  • I described my changes in this PR description

Optional:

  • The code I wrote follows good style practices (see PEP 8 and PEP 20).
  • I have updated the docs in relation to my changes, if applicable
  • I have tested also GPU contexts

@szymonlopaciuk szymonlopaciuk mentioned this pull request Nov 26, 2025
@szymonlopaciuk
Copy link
Collaborator Author

Merged in #730

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.

1 participant