Skip to content

Remove two submodules - #206

Merged
spossann merged 54 commits into
develfrom
remove-two-submodules
Mar 20, 2026
Merged

spossann merged 54 commits into
develfrom
remove-two-submodules

Conversation

@spossann

@spossann spossann commented Mar 13, 2026 •

Copy link
Copy Markdown
Member

Addresses #203

Auto-generates PRs into struphy-parameter-files and struphy-tutorials on push to main in case changes exist in the new folders examples/ or tutorials/.

Moreover:

  • New PR-test of examples: test all *.py files in new examples/ folder
  • Tests use the new option Simulation.run(one_time_step=True) for performing just one time step.
  • New folder tutorials/, used in build of the sphinx doc
  • New PR-test of tutorials in tutorials/
  • use def main(): in pproc and regression scripts
  • Auto-generate tag in the two repos when pushing to struphy main
  • temporarily add the bound jax-finufft<=1.2.0 until desc has a new release

Example of PR: struphy-hub/struphy-examples#14
Example of tag: https://github.com/struphy-hub/struphy-parameter-files/tags

@spossann

Copy link
Copy Markdown
Member Author

We have to wait for desc update, see #181 (comment)

@spossann
spossann marked this pull request as ready for review March 18, 2026 08:03
@spossann
spossann requested a review from max-models March 18, 2026 08:03
Comment thread .github/workflows/create-PR-parameters.yml
Comment thread .github/workflows/create-PR-tutorials.yml
Comment thread src/struphy/simulation/sim.py

Copilot AI 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.

Pull request overview

This PR removes the struphy-tutorials and struphy-parameter-files git submodules by moving their contents into this repository, adds CI coverage to execute examples/tutorials, and updates docs/build tooling to include the notebooks in the Sphinx documentation.

Changes:

  • Remove the two submodules and add tutorials/ notebooks plus examples/ parameter files directly in-repo.
  • Add CI workflows to execute tutorial notebooks and to run each examples/**/params_*.py (with one time step) plus optional pproc_*/regress_* scripts.
  • Extend Simulation.run() with a one_time_step option and update Sphinx config to include notebook collections.

Reviewed changes

Copilot reviewed 33 out of 34 changed files in this pull request and generated 13 comments.

Show a summary per file
File Description
tutorials/tutorial_01_struphy_simulations.ipynb Adds/relocates tutorial notebook into repo.
tutorials/tutorial_02_parameter_files.ipynb Adds/relocates tutorial notebook; documents launch/parameter files.
tutorials/tutorial_03_test_particles.ipynb Adds/relocates tutorial notebook; particle examples.
tutorials/tutorial_04_smoothed_particle_hydrodynamics.ipynb Adds/relocates tutorial notebook; SPH examples.
tutorials/tutorial_05_vlasov_maxwell.ipynb Adds/relocates tutorial notebook; Vlasov-Ampère example walkthrough.
tutorials/tutorial_06_mapped_domains.ipynb Adds/relocates tutorial notebook; mapped domains.
tutorials/tutorial_07_mhd_equilibria.ipynb Adds/relocates tutorial notebook; MHD equilibria interface examples.
struphy-tutorials Removes the struphy-tutorials submodule pointer.
struphy-parameter-files Removes the struphy-parameter-files submodule pointer.
.gitmodules Drops removed submodules from git submodule configuration.
src/struphy/simulation/sim.py Adds one_time_step option to Simulation.run().
src/struphy/models/tests/test_examples.py New pytest that discovers/runs examples/**/params_*.py and companion scripts.
src/struphy/io/setup.py Allows importing parameter scripts under a configurable module name.
pyproject.toml Adds sphinx-collections to doc extras.
examples/VlasovMaxwellOneSpecies/weibel_instability/params_weibel_instability.py Adds example parameter file previously managed externally.
examples/VlasovMaxwellOneSpecies/weibel_instability/pproc_weibel_instability.py Adds example post-processing script.
examples/VlasovAmpereOneSpecies/weak_Landau_damping/params_weak_Landau_damping.py Adds example parameter file.
examples/VlasovAmpereOneSpecies/weak_Landau_damping/pproc_weak_Landau_damping.py Adds example post-processing script.
examples/VlasovAmpereOneSpecies/strong_Landau_damping/params_strong_Landau_damping.py Adds example parameter file.
examples/VlasovAmpereOneSpecies/strong_Landau_damping/pproc_strong_Landau_damping.py Adds example post-processing script.
examples/VlasovAmpereOneSpecies/two_stream/params_two_stream.py Adds example parameter file.
examples/VlasovAmpereOneSpecies/two_stream/pproc_two_stream.py Adds example post-processing script.
examples/VlasovAmpereOneSpecies/bump_on/params_bump_on.py Adds example parameter file.
examples/VlasovAmpereOneSpecies/bump_on/pproc_bump_on.py Adds example post-processing script.
doc/conf.py Enables sphinx_collections and configures notebook collection copying.
doc/index.rst Adds tutorials section to documentation index.
doc/sections/tutorials.rst New tutorials page with toctree entries for notebooks.
.gitignore Ignores Sphinx notebook collection outputs and generated params_* files.
.github/workflows/test-PR-examples.yml New CI workflow to run example tests (serial + MPI).
.github/workflows/test-PR-tutorials.yml New CI workflow to execute tutorial notebooks via nbconvert.
.github/workflows/submod-struphy-tutorials.yml Removes old submodule-based CI workflow.
.github/workflows/submod-struphy-params.yml Removes old submodule-based CI workflow.
.github/workflows/create-PR-tutorials.yml New workflow to sync tutorials/ changes into external tutorials repo.
.github/workflows/create-PR-parameters.yml New workflow to sync examples/ changes into external parameter-files repo.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/struphy/io/setup.py Outdated
Comment thread .github/workflows/create-PR-parameters.yml Outdated
Comment thread doc/sections/tutorials.rst Outdated
Comment thread tutorials/tutorial_07_mhd_equilibria.ipynb Outdated
Comment thread tutorials/tutorial_05_vlasov_maxwell.ipynb Outdated
Comment thread .github/workflows/create-PR-tutorials.yml Outdated
Comment thread tutorials/tutorial_05_vlasov_maxwell.ipynb Outdated
Comment thread tutorials/tutorial_02_parameter_files.ipynb Outdated
Comment thread tutorials/tutorial_03_test_particles.ipynb Outdated
Comment thread tutorials/tutorial_03_test_particles.ipynb Outdated
spossann and others added 11 commits March 20, 2026 07:51
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@spossann

Copy link
Copy Markdown
Member Author

@max-models this is now ready for final review

@spossann
spossann merged commit 3218f35 into devel Mar 20, 2026
13 checks passed
@spossann
spossann deleted the remove-two-submodules branch March 20, 2026 09:44
@spossann spossann mentioned this pull request Mar 20, 2026
max-models pushed a commit that referenced this pull request Mar 20, 2026
Addresses #203

Auto-generates PRs into `struphy-parameter-files` and
`struphy-tutorials` on push to main in case changes exist in the new
folders `examples/` or `tutorials/`.

Moreover:
* New PR-test of examples: test all `*.py` files in new `examples/`
folder
* Tests use the new option `Simulation.run(one_time_step=True)` for
performing just one time step.
* New folder `tutorials/`, used in build of the sphinx doc
* New PR-test of tutorials in `tutorials/`
* use `def main():` in pproc and regression scripts
* Auto-generate tag in the two repos when pushing to struphy main
* temporarily add the bound jax-finufft<=1.2.0 until desc has a new
release

Example of PR:
struphy-hub/struphy-examples#14
Example of tag:
https://github.com/struphy-hub/struphy-parameter-files/tags

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
max-models pushed a commit that referenced this pull request Mar 20, 2026
Addresses #203

Auto-generates PRs into `struphy-parameter-files` and
`struphy-tutorials` on push to main in case changes exist in the new
folders `examples/` or `tutorials/`.

Moreover:
* New PR-test of examples: test all `*.py` files in new `examples/`
folder
* Tests use the new option `Simulation.run(one_time_step=True)` for
performing just one time step.
* New folder `tutorials/`, used in build of the sphinx doc
* New PR-test of tutorials in `tutorials/`
* use `def main():` in pproc and regression scripts
* Auto-generate tag in the two repos when pushing to struphy main
* temporarily add the bound jax-finufft<=1.2.0 until desc has a new
release

Example of PR:
struphy-hub/struphy-examples#14
Example of tag:
https://github.com/struphy-hub/struphy-parameter-files/tags

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@max-models

Copy link
Copy Markdown
Member

Maybe try this:

export PYVISTA_OFF_SCREEN=true
export DISPLAY=
export LIBGL_ALWAYS_SOFTWARE=1

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