uncscode / particula

a simple, fast, and powerful particle simulator
https://uncscode.github.io/particula
MIT License
6 stars 9 forks source link

Merge in from Gorkowski Dev #474

Closed Gorkowski closed 1 month ago

Gorkowski commented 1 month ago

Fixes #473

Summary by Sourcery

Introduce new coagulation strategies and surface tension factories, enhance existing classes with improved methods and flexibility, fix bugs in mean free path calculations, and update documentation and tests to reflect these changes.

New Features:

Bug Fixes:

Enhancements:

Build:

CI:

Documentation:

Tests:

Chores:

sourcery-ai[bot] commented 1 month ago

Reviewer's Guide by Sourcery

This pull request implements significant changes across multiple modules in the particula project, including updates to gas species handling, coagulation strategies, and various utility functions. The changes involve refactoring existing code, adding new functionality, and improving type hinting and error handling.

Class diagram for GasSpecies

classDiagram
    class GasSpecies {
        - name: Union[str, NDArray[np.str_]]
        - molar_mass: Union[float, NDArray[np.float64]]
        - pure_vapor_pressure_strategy: Union[VaporPressureStrategy, list[VaporPressureStrategy]]
        - condensable: Union[bool, NDArray[np.bool_]]
        - concentration: Union[float, NDArray[np.float64]]
        + get_molar_mass() Union[float, NDArray[np.float64]]
        + get_condensable() Union[bool, NDArray[np.bool_]]
        + get_concentration() Union[float, NDArray[np.float64]]
        + get_pure_vapor_pressure(temperature: Union[float, NDArray[np.float64]]) Union[float, NDArray[np.float64]]
        + get_partial_pressure(temperature: Union[float, NDArray[np.float64]]) Union[float, NDArray[np.float64]]
        + get_saturation_ratio(temperature: Union[float, NDArray[np.float64]]) Union[float, NDArray[np.float64]]
        + get_saturation_concentration(temperature: Union[float, NDArray[np.float64]]) Union[float, NDArray[np.float64]]
        + add_concentration(added_concentration: Union[float, NDArray[np.float64]])
    }

Class diagram for Stream and StreamAveraged

classDiagram
    class Stream {
        - header: List[str]
        - data: NDArray[np.float64]
        - time: NDArray[np.float64]
        - files: List[str]
        + validate_inputs()
        + __getitem__(index: Union[int, str]) NDArray[np.float64]
        + __setitem__(index: Union[int, str], value: NDArray[np.float64])
        + __len__() int
        + datetime64() NDArray[np.float64]
        + header_dict() dict[int, str]
        + header_float() NDArray[np.float64]
    }
    class StreamAveraged {
        - average_interval: float
        - start_time: float
        - stop_time: float
        - standard_deviation: NDArray[np.float64]
        + validate_averaging_params()
        + get_std(index: Union[int, str]) NDArray[np.float64]
    }
    StreamAveraged --|> Stream

File-Level Changes

Change Details Files
Refactored and enhanced gas species handling
  • Updated GasSpecies class with new methods and properties
  • Implemented new vapor pressure strategies and factories
  • Added new gas properties calculations
  • Improved type hinting and error handling in gas-related modules
particula/next/gas/species.py
particula/next/gas/vapor_pressure_strategies.py
particula/next/gas/vapor_pressure_factories.py
particula/next/gas/properties/mean_free_path.py
particula/next/gas/properties/thermal_conductivity.py
Implemented new coagulation strategies and related functionality
  • Added abstract CoagulationStrategy class and concrete implementations
  • Implemented particle-resolved coagulation method
  • Added new utility functions for coagulation calculations
particula/next/dynamics/coagulation/strategy.py
particula/next/particles/properties/friction_factor_module.py
particula/next/particles/properties/knudsen_number_module.py
Updated and refactored utility functions and modules
  • Improved input handling and unit conversion functions
  • Updated time management utilities
  • Refactored and enhanced statistical functions
particula/util/input_handling.py
particula/util/time_manage.py
particula/util/stats.py
particula/util/reduced_quantity.py
Updated data handling and processing modules
  • Refactored Stream and Lake classes
  • Updated data loading and processing functions
  • Improved error handling and logging in data-related modules
particula/data/stream.py
particula/data/lake.py
particula/data/loader.py
particula/data/process/size_distribution.py
Updated documentation and examples
  • Updated README and version number
  • Added new example notebooks
  • Updated existing documentation in various modules
README.md
particula/__init__.py
docs/How-To-Guides/Light_Scattering/index.md
docs/How-To-Guides/Equilibria/index.md

Tips and commands #### Interacting with Sourcery - **Trigger a new review:** Comment `@sourcery-ai review` on the pull request. - **Continue discussions:** Reply directly to Sourcery's review comments. - **Generate a GitHub issue from a review comment:** Ask Sourcery to create an issue from a review comment by replying to it. #### Customizing Your Experience Access your [dashboard](https://app.sourcery.ai) to: - Enable or disable review features such as the Sourcery-generated pull request summary, the reviewer's guide, and others. - Change the review language. - Add, remove or edit custom review instructions. - Adjust other review settings. #### Getting Help - [Contact our support team](mailto:support@sourcery.ai) for questions or feedback. - Visit our [documentation](https://docs.sourcery.ai) for detailed guides and information. - Keep in touch with the Sourcery team by following us on [X/Twitter](https://x.com/SourceryAI), [LinkedIn](https://www.linkedin.com/company/sourcery-ai/) or [GitHub](https://github.com/sourcery-ai).
github-actions[bot] commented 1 month ago

PR Preview Action v1.4.8 :---: :rocket: Deployed preview to https://uncscode.github.io/particula/pr-preview/pr-474/ on branch gh-pages at 2024-10-04 12:29 UTC

Gorkowski commented 1 month ago

I'm just wanted to create some issues for most of the soucery comments so we don't forget

I'm good with it now