-
Notifications
You must be signed in to change notification settings - Fork 0
Alien attempt #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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 <[email protected]>
* 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 <[email protected]> Co-authored-by: Mateusz Mazur <[email protected]>
m8 u removed too much
Co-authored-by: Copilot <[email protected]>
mzsuetam
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <[email protected]>
Co-authored-by: Copilot <[email protected]>
…ted diffusion_coordinate assignment
mzsuetam
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work, lets ship it! 🚢
piotrkubala
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some comments
…and density, terminal velocity, and ventilation modules
There was a problem hiding this comment.
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 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
* 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 <[email protected]> * 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 <[email protected]> Co-authored-by: Mateusz Mazur <[email protected]> * 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 <[email protected]> * 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 <[email protected]> * Fixed pressure values in Planet subclasses to use correct scientific notation * Updated method signature for proper binding. Co-authored-by: Copilot <[email protected]> * 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 <[email protected]> Co-authored-by: Piotr Kubala <[email protected]> Co-authored-by: Hevagog <[email protected]> Co-authored-by: Mateusz Mazur <[email protected]>
👽