Merged
Conversation
* parallel v1 * thread count fix * parallel * small parallel fixes * working multithread solution * Multi-thread + vector plots * black, black used everywhere --------- Co-authored-by: Piotr Kubala <pkubala@student.agh.edu.pl>
* tests I guess * uv fix * planet impl * ground truth * gen plot function * unit tests, monoticity tests, sanity tests * tests are now in tests * added ground truth files * removed leftovers * npy files * tests tidyup * tests adapted for current structure but still useless * renamed test to comply with pytest convention * fix ground_truth generation script * refactor unittests * added accuracy tests * Added saturation test for cloud base in unit tests * Refactored imports and clean up unused code in simulation and parcel modules * Enhanced accuracy tests by adding assertions for output completeness and consistency in unit tests * Refactored calculation of simulated mass fraction evaporation point to initialize variable and improved error handling --------- Co-authored-by: Hevagog <qkawiak@gmail.com> Co-authored-by: Mateusz Mazur <mazurm@student.agh.edu.pl>
m8 u removed too much
Hevagog
approved these changes
Jun 9, 2025
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
mzsuetam
requested changes
Jun 10, 2025
mzsuetam
left a comment
There was a problem hiding this comment.
Looks good to me, but we need to address some of the changes proposed by Copilot
…gen_figure.py Using dir shadowed the built-in dir() function. Renamed this variable (e.g., root_dir) to avoid confusion. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ted diffusion_coordinate assignment
emmacware
approved these changes
Jun 10, 2025
…and density, terminal velocity, and ventilation modules
There was a problem hiding this comment.
Pull Request Overview
This PR integrates the Loftus & Wordsworth (2021) planetary raindrop example into the PySDM codebase, adding example modules and a comprehensive test suite.
- Add new example package
Loftus_and_Wordsworth_2021with settings, planet definitions, parcel environment, and simulation driver - Introduce unit, accuracy, and ground-truth generation tests under
tests/examples_tests/Loftus_and_Wordsworth_2021 - Update
conftest.pyto discover the new example tests
Reviewed Changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/examples_tests/conftest.py | Include Loftus_and_Wordsworth_2021 in test-discovery patterns |
| tests/examples_tests/Loftus_and_Wordsworth_2021/unit_test.py | Unit tests for planet classes, parcel init, and simulation API |
| tests/examples_tests/Loftus_and_Wordsworth_2021/accuracy_test.py | Accuracy tests comparing simulation outputs to .npy ground truth |
| tests/examples_tests/Loftus_and_Wordsworth_2021/ground_truth/gen_figure.py | Script to regenerate Figure 2 ground truth data |
| examples/PySDM_examples/Loftus_and_Wordsworth_2021/settings.py | New Settings class for example configuration |
| examples/PySDM_examples/Loftus_and_Wordsworth_2021/simulation.py | New Simulation wrapper around PySDM builder/dynamics pipeline |
| examples/PySDM_examples/Loftus_and_Wordsworth_2021/planet.py | Planet‐specific dataclasses (EarthLike, Jupiter, etc.) |
| examples/PySDM_examples/Loftus_and_Wordsworth_2021/parcel.py | Custom AlienParcel subclass for environment dynamics |
| examples/PySDM_examples/Loftus_and_Wordsworth_2021/init.py | Package initialization and docstring |
| PySDM/physics/terminal_velocity/init.py | Adjusted module docstring formatting |
Comments suppressed due to low confidence (3)
tests/examples_tests/conftest.py:86
- [nitpick] Directory and module names are uppercase and use underscores; consider renaming to a lowercase package path to follow PEP 8 package naming conventions.
"Loftus_and_Wordsworth_2021",
tests/examples_tests/Loftus_and_Wordsworth_2021/ground_truth/gen_figure.py:95
- The variable
diris undefined here; it should use the previously definedroot_dirto construct the path.
figs_path = os.path.join(dir, "figs")
examples/PySDM_examples/Loftus_and_Wordsworth_2021/settings.py:34
si.metresis not a valid attribute; the correct SI unit property issi.metre.
self.z_half = 150 * si.metres
tests/examples_tests/Loftus_and_Wordsworth_2021/ground_truth/gen_figure.py
Show resolved
Hide resolved
mzsuetam
added a commit
that referenced
this pull request
Jun 19, 2025
* simulation setup * uv lock * introduced all equations * oblate spheroid impl * AlienParcel class extending Parcel * PySDM package internal imports fix * Formulae bug fixes * Planet is now dataclass instead of dict * drop falling without pancake shape * cloudbase fix * figure settings * multicore support for simulation (#2) * parallel v1 * thread count fix * parallel * small parallel fixes * working multithread solution * Multi-thread + vector plots * black, black used everywhere --------- Co-authored-by: Piotr Kubala <pkubala@student.agh.edu.pl> * pip install joblib * Tests (#1) * tests I guess * uv fix * planet impl * ground truth * gen plot function * unit tests, monoticity tests, sanity tests * tests are now in tests * added ground truth files * removed leftovers * npy files * tests tidyup * tests adapted for current structure but still useless * renamed test to comply with pytest convention * fix ground_truth generation script * refactor unittests * added accuracy tests * Added saturation test for cloud base in unit tests * Refactored imports and clean up unused code in simulation and parcel modules * Enhanced accuracy tests by adding assertions for output completeness and consistency in unit tests * Refactored calculation of simulated mass fraction evaporation point to initialize variable and improved error handling --------- Co-authored-by: Hevagog <qkawiak@gmail.com> Co-authored-by: Mateusz Mazur <mazurm@student.agh.edu.pl> * Notebook not running fix - added back necessary imports m8 u removed too much * black formatter * black for ipynb * Update PySDM/physics/particle_shape_and_density/oblate_spheroid.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Updated tests/examples_tests/Loftus_and_Wordsworth_2021/ground_truth/gen_figure.py Using dir shadowed the built-in dir() function. Renamed this variable (e.g., root_dir) to avoid confusion. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fixed pressure values in Planet subclasses to use correct scientific notation * Updated method signature for proper binding. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Refactored Settings class to remove unused 'coord' parameter and updated diffusion_coordinate assignment * Removed unused Lofus et al. 2021 implementations from particle shape and density, terminal velocity, and ventilation modules * plots warnings fixes * removed files rogers and yau * notebook rerun * notebook fix * minor linter fixes --------- Co-authored-by: emmacware <ecware@ucdavis.edu> Co-authored-by: Piotr Kubala <pkubala@student.agh.edu.pl> Co-authored-by: Hevagog <qkawiak@gmail.com> Co-authored-by: Mateusz Mazur <mazurm@student.agh.edu.pl>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
👽