Skip to content
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

Adding ParameterCollection.where for conditional parameter iteration #1899

Merged
merged 15 commits into from
Sep 26, 2024

Commits on Sep 20, 2024

  1. Provide ParameterCollection.where for better iteration of parameters

    Allows selective iteration of parameters that meet, by their definition
    not their value, meet a certain condition. This would be useful to
    iterate over all parameters on a ``Block`` that are relevant for
    neutronics calculations with
    ```python
    for p in block.p.where(lambda pd: "neutronics" in pd.categories):
        ...
    ```
    The argument is a function that should return true for a given parameter
    and can be complicated
    ```python
    block.p.where(
        lambda pd: (
            pd.atLocation(ParamLocation.EDGES) or
            pd.atLocation(ParamLocation.CORNERS)
        )
    )
    ```
    
    Closes #1898
    drewj-tp committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    4483527 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0c5f542 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6fc7204 View commit details
    Browse the repository at this point in the history
  4. Provide Parameter.hasCategory

    (cherry picked from commit 4162cd7)
    drewj-tp committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    3bb13f7 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    83e126f View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    18e5219 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    e335f07 View commit details
    Browse the repository at this point in the history

Commits on Sep 21, 2024

  1. Configuration menu
    Copy the full SHA
    6efe6e1 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9493ef6 View commit details
    Browse the repository at this point in the history

Commits on Sep 23, 2024

  1. Update armi/reactor/tests/test_parameters.py

    Co-authored-by: John Stilley <[email protected]>
    drewj-tp and john-science authored Sep 23, 2024
    Configuration menu
    Copy the full SHA
    81b55ee View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f822d37 View commit details
    Browse the repository at this point in the history

Commits on Sep 25, 2024

  1. Configuration menu
    Copy the full SHA
    96f1962 View commit details
    Browse the repository at this point in the history
  2. Merge branch 'main' into drewj/iter-params/1898

    * main:
      Fixing a problem with the latest release of h5py (#1907)
    drewj-tp committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    f9e1047 View commit details
    Browse the repository at this point in the history
  3. Update doc/release/0.4.rst

    Co-authored-by: John Stilley <[email protected]>
    drewj-tp and john-science authored Sep 25, 2024
    Configuration menu
    Copy the full SHA
    1f090d1 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    f835c95 View commit details
    Browse the repository at this point in the history