Skip to content

Conversation

@PhilipDeegan
Copy link
Member

@PhilipDeegan PhilipDeegan commented Jul 5, 2025

closes #1038

ruff check before

ruff check tests | wc -l
1564

after

ruff check tests | wc -l
404

Deletes cpp_dbg lib as it's redundant

@coderabbitai
Copy link

coderabbitai bot commented Jul 5, 2025

📝 Walkthrough
## Walkthrough

This change refactors test scripts by reorganizing and minimizing imports, especially for packages with heavy binary dependencies like `scipy`, `matplotlib`, and `numpy`. Imports are moved inside functions where possible, redundant imports are removed, and graphical backend setup is standardized. Minor unused variable assignments and code are also cleaned up.

## Changes

| File(s)                                                                                      | Change Summary                                                                                                 |
|---------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------|
| tests/amr/data/field/refine/test_refine_field.py                                            | Removed local override of `refinement_ratio`; now uses imported value directly.                               |
| tests/core/data/gridlayout/allocSizes.py, .../deriv.py, .../fieldNodeCoordinates.py, .../gridIndexing.py | Cleaned up and reordered import statements; removed unused variables.                                          |
| tests/core/data/gridlayout/test_linear_combinaisons_yee.py                                  | Removed unused imports.                                                                                       |
| tests/diagnostic/__init__.py                                                                | Removed unused `numpy` import.                                                                                |
| tests/functional/alfven_wave/alfven_wave1d.py, .../harris/harris_2d.py, .../td/td1d.py, .../translation/translat1d.py | Standardized disabling GUI via `ph.NO_GUI()`, removed/changed `matplotlib` backend setup and unused imports.   |
| tests/functional/ionIonBeam/ion_ion_beam1d.py                                               | Moved heavy imports (`scipy.optimize`, `scipy.signal`) inside functions; reorganized imports; updated MPI rank access. |
| tests/functional/shock/shock.py, .../test_load_balancing.py, .../test_run.py                | Deferred `startMPI()` initialization to main block.                                                           |
| tests/functional/tdtagged/td1dtagged.py                                                     | Removed unused variable in plotting loop.                                                                     |
| tests/initializer/job.py                                                                    | Replaced specific class imports with module import and updated usage accordingly.                             |
| tests/simulator/__init__.py                                                                 | Removed Caliper profiling integration code and related functions.                                             |
| tests/simulator/data_wrangler.py, .../refined_particle_nbr.py, .../refinement/test_2d_10_core.py, .../test_2d_2_core.py, .../test_advance.py, .../test_diagnostic_timestamps.py, .../test_diagnostics.py, .../test_initialization.py, .../test_restarts.py, .../test_simulation.py, .../test_validation.py | Reorganized import statements; moved instantiation of `cpp` object; removed unused variables and imports.      |
| pyphare/pyphare/cpp/__init__.py                                                            | Simplified `cpp_lib` function to always import release module; removed override and debug import logic.        |
| src/python3/CMakeLists.txt                                                                   | Removed debug-specific pybind11 module target `cpp_dbg`.                                                     |
| tests/diagnostic/job_1d.py.in, tests/diagnostic/job_2d.py.in                               | Reformatted imports and calls to use `ph` namespace; improved readability without logic changes.              |

## Sequence Diagram(s)

```mermaid
sequenceDiagram
    participant Script
    participant ph as pyphare.pharein
    participant matplotlib
    participant scipy

    Script->>ph: import ph
    Script->>ph: call ph.NO_GUI() (to disable GUI)
    Note over Script,ph: matplotlib imports removed or deferred
    Script->>scipy: import inside function (only when needed)

Assessment against linked issues

Objective Addressed Explanation
Minimize imports at file scope for packages with binary requirements (e.g., scipy, matplotlib, numpy) (#1038)
Move heavy or problematic imports inside functions where possible (#1038)
Standardize disabling GUI to avoid backend issues (#1038)

Suggested labels

test, refactoring

Suggested reviewers

  • nicolasaunai

</details>

<!-- walkthrough_end -->

<!-- announcements_start -->

> [!NOTE]
> <details open="true">
> <summary>⚡️ Unit Test Generation is now available in beta!</summary>
> 
> Learn more [here](https://docs.coderabbit.ai/finishing-touches/unit-test-generation), or try it out under "Finishing Touches" below.
> 
> </details>

<!-- announcements_end -->
<!-- internal state start -->


<!-- DwQgtGAEAqAWCWBnSTIEMB26CuAXA9mAOYCmGJATmriQCaQDG+Ats2bgFyQAOFk+AIwBWJBrngA3EsgEBPRvlqU0AgfFwA6NPEgQAfACgjoCEYDEZyAAUASpETZWaCrKNwSPbABsvkCiQBHbGlcSHFcLzpIACIaRFCGSMxsbkgAej9sADMssHgMImjIAHc0ZAcBZnUaejkw2A9sREprBC94bgAREhIiTHQMelR4JQxxLPgossgMRwEWgEYABgBmAE4NGAbrO0T8ZuQkBw8zZZWADk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gFraGc8rRS60GEiLVdJgGg4jcvyb5r9eeeFajeLKL2aPEWzQR+AgGUAJHQoUMfBFJEr1FH4zysltEr3r06F+NKaKEiadBlMc39XZjJUWGQCkKa+EYrSuXODUtVMQMoAw6zfVTKlb1GMfBM2CkgO81Kw0sJywAicKgonRYVsM9wjjxO42uqcgMUFifMA0nh6+QoSw8eaVUA8hBWKr2/odl3OoQNpU7cEig2GZ+sV+wiClgaAFgLT+eS0FOFiN5mdFuWhkMEsxSkNKexvEtzbqySVYdhnZv3gIf3D7rup4WSoaHSSL+aWh1w5VwUaKG8N+h0R2FKy2KP/tZGnnpRrUcg6FaEs5Ue4qcZ+KJ7OQNS4UZanPyLHiZyOT4+IMBzWFXO2x549gGz3QBKSnOC48F2ozQqxGDBuwb611zsZoBJuersjnQBj8zlogHHKxWJzljFmgQ2gqjgvPT0/NITYQx2zIoPNPZ6UFpEwbsTjyjRqDNueRWWOpiTF4Ql0RJniKTtgTnvWcO6eXDMt0zu6xs/EtbPiti+X7bo1I3c9sKRzkxuo+34/QDoGyEwjgAmg1aX0XAKZrVrqCnIto70XaF9EMDSvKoAPEYBRLX6H9vZWr36FABVBKhaAKoNYCsFoAKgVgUsV0AsBUBKgVgSwc4E64YBZAlQCoc4AwClgOupYKoBYCQDWAAB2JYAqDWBKgTX0rhYFa4EA2hI3SoCN2gCVBKgsgUsNYFLBWA5uFQDAJYD0DWACBzgJABYL66WBLAiwAgItzG6GiQA1geb3BmsFoAMBw3CoNAFa6WBRvM3Usd1wqClihulQAgON6G5IAXBQ3DAdtyqBVChva3EASAG69pJSxVgKoPNy69DcOM1gKoLICqDQALABALb4NwqAVC0BcGPb3JGsCLdLATXBgHV2BD1cZSUYgOw/vSX2h1vmAjYRwQqjyMIqONoQAaAYDZBAeDAAAbwMCQAYgWSvCT8ETqQAMm2TekOB5iClBZQ2k2D/B4MAABfQD8B9vfvvP32Kn96+++hAA= -->

<!-- internal state end -->
<!-- finishing_touch_checkbox_start -->

<details>
<summary>✨ Finishing Touches</summary>

- [ ] <!-- {"checkboxId": "7962f53c-55bc-4827-bfbf-6a18da830691"} --> 📝 Generate Docstrings
<details>
<summary>🧪 Generate unit tests</summary>

- [ ] <!-- {"checkboxId": "f47ac10b-58cc-4372-a567-0e02b2c3d479", "radioGroupId": "utg-output-choice-group-unknown_comment_id"} -->   Create PR with unit tests
- [ ] <!-- {"checkboxId": "07f1e7d6-8a8e-4e23-9900-8731c2c87f58", "radioGroupId": "utg-output-choice-group-unknown_comment_id"} -->   Post copyable unit tests in a comment

</details>

</details>

<!-- finishing_touch_checkbox_end -->
<!-- tips_start -->

---

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

<details>
<summary>❤️ Share</summary>

- [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai)
- [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai)
- [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai)
- [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)

</details>

<details>
<summary>🪧 Tips</summary>

### Chat

There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=PHAREHUB/PHARE&utm_content=1039):

- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
  - `I pushed a fix in commit <commit_id>, please review it.`
  - `Explain this complex logic.`
  - `Open a follow-up GitHub issue for this discussion.`
- Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples:
  - `@coderabbitai explain this code block.`
  -	`@coderabbitai modularize this function.`
- PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
  - `@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.`
  - `@coderabbitai read src/utils.ts and explain its main purpose.`
  - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.`
  - `@coderabbitai help me debug CodeRabbit configuration file.`

### Support

Need help? Create a ticket on our [support page](https://www.coderabbit.ai/contact-us/support) for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

### CodeRabbit Commands (Invoked using PR comments)

- `@coderabbitai pause` to pause the reviews on a PR.
- `@coderabbitai resume` to resume the paused reviews.
- `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
- `@coderabbitai full review` to do a full review from scratch and review all the files again.
- `@coderabbitai summary` to regenerate the summary of the PR.
- `@coderabbitai generate docstrings` to [generate docstrings](https://docs.coderabbit.ai/finishing-touches/docstrings) for this PR.
- `@coderabbitai generate sequence diagram` to generate a sequence diagram of the changes in this PR.
- `@coderabbitai generate unit tests` to generate unit tests for this PR.
- `@coderabbitai resolve` resolve all the CodeRabbit review comments.
- `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository.
- `@coderabbitai help` to get help.

### Other keywords and placeholders

- Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed.
- Add `@coderabbitai summary` to generate the high-level summary at a specific location in the PR description.
- Add `@coderabbitai` anywhere in the PR title to generate the title automatically.

### Documentation and Community

- Visit our [Documentation](https://docs.coderabbit.ai) for detailed information on how to use CodeRabbit.
- Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback.
- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.

</details>

<!-- tips_end -->

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (9)
tests/functional/ionIonBeam/ion_ion_beam1d.py (1)

167-167: Remove redundant import.

The find_peaks import is already present in the growth_b_right_hand function at line 110. Since main() calls growth_b_right_hand(), this import is redundant.

-    from scipy.signal import find_peaks
tests/core/data/gridlayout/allocSizes.py (1)

13-15: Prefer explicit relative import to decouple tests from PYTHONPATH quirks

Importing the sibling module as from . import gridparams makes the script resolvable regardless of the current working directory and avoids accidentally pulling in an unrelated top-level gridparams if one exists on the system path.

-import gridparams
+from . import gridparams
tests/diagnostic/__init__.py (1)

1-5: nbr_dump_step may be a float — cast before passing to np.arange.

If sim.final_time is not an exact multiple of dump_step, np.arange receives a float stop which silently truncates the last point. Consider explicit integer rounding for clarity:

-    nbr_dump_step = sim.final_time / dump_step
+    nbr_dump_step = int(sim.final_time / dump_step)
tests/initializer/job.py (1)

24-26: Generator expression used where a tuple is intended — yields one-shot iterators.

bx, by, bz = (lambda x: 1 for i in range(3)) assigns three lambdas but sources them from a generator that is exhausted afterwards. It’s obscure and brittle; prefer an explicit tuple for clarity:

-bx, by, bz = (lambda x: 1 for i in range(3))
+bx = by = bz = (lambda x: 1)

Same pattern occurs for ex, ey, ez, vx, vy, vz, and vthx, vthy, vthz.

tests/simulator/test_advance.py (3)

1-3: Drop placeholder header comments

The first two comment lines don’t convey any useful information and just add visual noise.
Consider deleting them for a cleaner file header.

-#
-#
-

29-30: Lazy-load cpp_lib() to avoid up-front side-effects

Instantiating cpp = cpp_lib() at module import time can trigger MPI initialisation (or other heavy native setup) before the unit-test framework even decides which tests to run. This makes dry-run discovery slower and complicates mocking.

A lightweight pattern:

-cpp = cpp_lib()
+_cpp_instance = None
+
+def cpp():
+    """Singleton accessor to cpp_lib(), lazily instantiated."""
+    global _cpp_instance
+    if _cpp_instance is None:
+        _cpp_instance = cpp_lib()
+    return _cpp_instance

Call cpp() where you currently use the global cpp.


753-755: Use os.path.join for platform-safe diagnostic paths

Hard-coding forward slashes is fine on POSIX but breaks on Windows. A tiny tweak keeps the tests portable:

-import random
+import os, random-L0_datahier  = _getHier("L0_diags")
-L0L1_datahier = _getHier("L0L1_diags", refinement_boxes)
+L0_datahier   = _getHier(os.path.join("L0_diags"))
+L0L1_datahier = _getHier(os.path.join("L0L1_diags"), refinement_boxes)
tests/simulator/__init__.py (2)

1-3: Remove empty banner comments

These “# / #” lines serve no functional or documentary purpose after the Caliper clean-up. Deleting them makes the file more concise.

-#
-#
-

4-4: os import is now unused

With the profiling code gone, os is no longer referenced anywhere in this module and is flagged by Ruff/Flake8. Safe to drop:

-import os
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 09e9954 and 46d493d.

📒 Files selected for processing (29)
  • tests/amr/data/field/refine/test_refine_field.py (0 hunks)
  • tests/core/data/gridlayout/allocSizes.py (1 hunks)
  • tests/core/data/gridlayout/deriv.py (1 hunks)
  • tests/core/data/gridlayout/fieldNodeCoordinates.py (1 hunks)
  • tests/core/data/gridlayout/gridIndexing.py (1 hunks)
  • tests/core/data/gridlayout/test_linear_combinaisons_yee.py (1 hunks)
  • tests/diagnostic/__init__.py (1 hunks)
  • tests/functional/alfven_wave/alfven_wave1d.py (1 hunks)
  • tests/functional/harris/harris_2d.py (2 hunks)
  • tests/functional/ionIonBeam/ion_ion_beam1d.py (4 hunks)
  • tests/functional/shock/shock.py (1 hunks)
  • tests/functional/td/td1d.py (1 hunks)
  • tests/functional/tdtagged/td1dtagged.py (0 hunks)
  • tests/functional/translation/translat1d.py (1 hunks)
  • tests/initializer/job.py (2 hunks)
  • tests/simulator/__init__.py (1 hunks)
  • tests/simulator/data_wrangler.py (1 hunks)
  • tests/simulator/refined_particle_nbr.py (1 hunks)
  • tests/simulator/refinement/test_2d_10_core.py (1 hunks)
  • tests/simulator/refinement/test_2d_2_core.py (1 hunks)
  • tests/simulator/test_advance.py (3 hunks)
  • tests/simulator/test_diagnostic_timestamps.py (1 hunks)
  • tests/simulator/test_diagnostics.py (1 hunks)
  • tests/simulator/test_initialization.py (2 hunks)
  • tests/simulator/test_load_balancing.py (3 hunks)
  • tests/simulator/test_restarts.py (5 hunks)
  • tests/simulator/test_run.py (2 hunks)
  • tests/simulator/test_simulation.py (0 hunks)
  • tests/simulator/test_validation.py (3 hunks)
💤 Files with no reviewable changes (3)
  • tests/simulator/test_simulation.py
  • tests/functional/tdtagged/td1dtagged.py
  • tests/amr/data/field/refine/test_refine_field.py
🧰 Additional context used
🧠 Learnings (13)
📓 Common learnings
Learnt from: PhilipDeegan
PR: PHAREHUB/PHARE#888
File: src/hdf5/detail/h5/h5_file.hpp:78-79
Timestamp: 2024-10-09T08:32:15.667Z
Learning: Avoid commenting on draft PRs for the user PhilipDeegan.
Learnt from: PhilipDeegan
PR: PHAREHUB/PHARE#888
File: src/hdf5/detail/h5/h5_file.hpp:78-79
Timestamp: 2024-09-05T17:02:58.784Z
Learning: Avoid commenting on draft PRs for the user PhilipDeegan.
Learnt from: PhilipDeegan
PR: PHAREHUB/PHARE#888
File: pyphare/pyphare/pharesee/hierarchy/hierarchy_utils.py:566-568
Timestamp: 2024-09-09T13:57:02.285Z
Learning: Avoid commenting on draft PRs for PhilipDeegan unless explicitly requested.
Learnt from: PhilipDeegan
PR: PHAREHUB/PHARE#784
File: tests/simulator/test_restarts.py:333-339
Timestamp: 2024-07-26T22:04:34.160Z
Learning: PhilipDeegan has indicated a preference for minimal and efficient code, even after making changes to get a function working. There may be opportunities to remove or optimize parts of the code such as sleep/wait/advances.
Learnt from: PhilipDeegan
PR: PHAREHUB/PHARE#784
File: tests/simulator/test_restarts.py:333-339
Timestamp: 2024-10-09T08:32:15.667Z
Learning: PhilipDeegan has indicated a preference for minimal and efficient code, even after making changes to get a function working. There may be opportunities to remove or optimize parts of the code such as sleep/wait/advances.
tests/functional/harris/harris_2d.py (1)
Learnt from: PhilipDeegan
PR: PHAREHUB/PHARE#910
File: pyphare/pyphare/pharesee/hierarchy/hierarchy_utils.py:7-7
Timestamp: 2024-10-18T13:23:32.074Z
Learning: In the `pyphare.pharesee.hierarchy` module, importing `PatchHierarchy` and `format_timestamp` from `hierarchy.py` into `hierarchy_utils.py` is acceptable as long as `hierarchy.py` does not import `hierarchy_utils.py`, thereby avoiding a cyclic import.
tests/diagnostic/__init__.py (1)
Learnt from: PhilipDeegan
PR: PHAREHUB/PHARE#910
File: pyphare/pyphare/pharesee/hierarchy/hierarchy_utils.py:7-7
Timestamp: 2024-10-18T13:23:32.074Z
Learning: In the `pyphare.pharesee.hierarchy` module, importing `PatchHierarchy` and `format_timestamp` from `hierarchy.py` into `hierarchy_utils.py` is acceptable as long as `hierarchy.py` does not import `hierarchy_utils.py`, thereby avoiding a cyclic import.
tests/simulator/test_validation.py (1)
Learnt from: PhilipDeegan
PR: PHAREHUB/PHARE#910
File: pyphare/pyphare/pharesee/hierarchy/hierarchy_utils.py:7-7
Timestamp: 2024-10-18T13:23:32.074Z
Learning: In the `pyphare.pharesee.hierarchy` module, importing `PatchHierarchy` and `format_timestamp` from `hierarchy.py` into `hierarchy_utils.py` is acceptable as long as `hierarchy.py` does not import `hierarchy_utils.py`, thereby avoiding a cyclic import.
tests/initializer/job.py (4)
Learnt from: PhilipDeegan
PR: PHAREHUB/PHARE#910
File: pyphare/pyphare/pharesee/hierarchy/hierarchy_utils.py:7-7
Timestamp: 2024-10-18T13:23:32.074Z
Learning: In the `pyphare.pharesee.hierarchy` module, importing `PatchHierarchy` and `format_timestamp` from `hierarchy.py` into `hierarchy_utils.py` is acceptable as long as `hierarchy.py` does not import `hierarchy_utils.py`, thereby avoiding a cyclic import.
Learnt from: rochSmets
PR: PHAREHUB/PHARE#921
File: src/core/data/ions/ions.hpp:138-142
Timestamp: 2025-02-06T10:52:56.461Z
Learning: In PHARE's physics simulations, handling of zero density cells in velocity calculations must be based on physical requirements rather than simple numerical fixes. The solution must account for population-specific behavior in the bulk velocity computation.
Learnt from: rochSmets
PR: PHAREHUB/PHARE#921
File: src/core/data/ions/ions.hpp:138-142
Timestamp: 2025-02-06T10:52:56.461Z
Learning: In PHARE simulations, velocity calculations must account for per-population densities that can be strictly zero in given cells. Simple zero-return solutions for division by zero are inadequate as they don't reflect the correct physics.
Learnt from: rochSmets
PR: PHAREHUB/PHARE#921
File: src/core/data/ions/ions.hpp:138-142
Timestamp: 2025-02-06T10:52:56.461Z
Learning: The bulk velocity calculation in PHARE must maintain physical consistency across both ion and electron calculations. Zero density cases need special handling that preserves the physics, particularly since the calculations are used in level initialization, ion updates, and electron physics.
tests/simulator/data_wrangler.py (1)
Learnt from: PhilipDeegan
PR: PHAREHUB/PHARE#910
File: pyphare/pyphare/pharesee/hierarchy/hierarchy_utils.py:7-7
Timestamp: 2024-10-18T13:23:32.074Z
Learning: In the `pyphare.pharesee.hierarchy` module, importing `PatchHierarchy` and `format_timestamp` from `hierarchy.py` into `hierarchy_utils.py` is acceptable as long as `hierarchy.py` does not import `hierarchy_utils.py`, thereby avoiding a cyclic import.
tests/simulator/refinement/test_2d_2_core.py (1)
Learnt from: PhilipDeegan
PR: PHAREHUB/PHARE#910
File: pyphare/pyphare/pharesee/hierarchy/hierarchy_utils.py:7-7
Timestamp: 2024-10-18T13:23:32.074Z
Learning: In the `pyphare.pharesee.hierarchy` module, importing `PatchHierarchy` and `format_timestamp` from `hierarchy.py` into `hierarchy_utils.py` is acceptable as long as `hierarchy.py` does not import `hierarchy_utils.py`, thereby avoiding a cyclic import.
tests/simulator/test_diagnostics.py (1)
Learnt from: PhilipDeegan
PR: PHAREHUB/PHARE#910
File: pyphare/pyphare/pharesee/hierarchy/hierarchy_utils.py:7-7
Timestamp: 2024-10-18T13:23:32.074Z
Learning: In the `pyphare.pharesee.hierarchy` module, importing `PatchHierarchy` and `format_timestamp` from `hierarchy.py` into `hierarchy_utils.py` is acceptable as long as `hierarchy.py` does not import `hierarchy_utils.py`, thereby avoiding a cyclic import.
tests/simulator/refinement/test_2d_10_core.py (1)
Learnt from: PhilipDeegan
PR: PHAREHUB/PHARE#910
File: pyphare/pyphare/pharesee/hierarchy/hierarchy_utils.py:7-7
Timestamp: 2024-10-18T13:23:32.074Z
Learning: In the `pyphare.pharesee.hierarchy` module, importing `PatchHierarchy` and `format_timestamp` from `hierarchy.py` into `hierarchy_utils.py` is acceptable as long as `hierarchy.py` does not import `hierarchy_utils.py`, thereby avoiding a cyclic import.
tests/functional/translation/translat1d.py (1)
Learnt from: PhilipDeegan
PR: PHAREHUB/PHARE#910
File: pyphare/pyphare/pharesee/hierarchy/hierarchy_utils.py:7-7
Timestamp: 2024-10-18T13:23:32.074Z
Learning: In the `pyphare.pharesee.hierarchy` module, importing `PatchHierarchy` and `format_timestamp` from `hierarchy.py` into `hierarchy_utils.py` is acceptable as long as `hierarchy.py` does not import `hierarchy_utils.py`, thereby avoiding a cyclic import.
tests/simulator/test_initialization.py (1)
Learnt from: PhilipDeegan
PR: PHAREHUB/PHARE#910
File: pyphare/pyphare/pharesee/hierarchy/hierarchy_utils.py:7-7
Timestamp: 2024-10-18T13:23:32.074Z
Learning: In the `pyphare.pharesee.hierarchy` module, importing `PatchHierarchy` and `format_timestamp` from `hierarchy.py` into `hierarchy_utils.py` is acceptable as long as `hierarchy.py` does not import `hierarchy_utils.py`, thereby avoiding a cyclic import.
tests/simulator/test_diagnostic_timestamps.py (1)
Learnt from: PhilipDeegan
PR: PHAREHUB/PHARE#910
File: pyphare/pyphare/pharesee/hierarchy/hierarchy_utils.py:7-7
Timestamp: 2024-10-18T13:23:32.074Z
Learning: In the `pyphare.pharesee.hierarchy` module, importing `PatchHierarchy` and `format_timestamp` from `hierarchy.py` into `hierarchy_utils.py` is acceptable as long as `hierarchy.py` does not import `hierarchy_utils.py`, thereby avoiding a cyclic import.
tests/simulator/test_restarts.py (1)
Learnt from: PhilipDeegan
PR: PHAREHUB/PHARE#910
File: pyphare/pyphare/pharesee/hierarchy/hierarchy_utils.py:7-7
Timestamp: 2024-10-18T13:23:32.074Z
Learning: In the `pyphare.pharesee.hierarchy` module, importing `PatchHierarchy` and `format_timestamp` from `hierarchy.py` into `hierarchy_utils.py` is acceptable as long as `hierarchy.py` does not import `hierarchy_utils.py`, thereby avoiding a cyclic import.
🧬 Code Graph Analysis (8)
tests/functional/shock/shock.py (1)
pyphare/pyphare/simulator/simulator.py (1)
  • startMPI (39-43)
tests/functional/harris/harris_2d.py (1)
pyphare/pyphare/pharein/__init__.py (1)
  • NO_GUI (60-64)
tests/simulator/test_run.py (1)
pyphare/pyphare/simulator/simulator.py (1)
  • startMPI (39-43)
tests/simulator/test_load_balancing.py (1)
pyphare/pyphare/simulator/simulator.py (1)
  • startMPI (39-43)
tests/functional/alfven_wave/alfven_wave1d.py (1)
pyphare/pyphare/pharein/__init__.py (1)
  • NO_GUI (60-64)
tests/simulator/refinement/test_2d_10_core.py (2)
pyphare/pyphare/simulator/simulator.py (1)
  • startMPI (39-43)
pyphare/pyphare/pharein/__init__.py (1)
  • NO_GUI (60-64)
tests/functional/translation/translat1d.py (2)
tests/diagnostic/__init__.py (1)
  • all_timestamps (8-12)
pyphare/pyphare/pharein/__init__.py (1)
  • NO_GUI (60-64)
tests/simulator/test_initialization.py (1)
pyphare/pyphare/cpp/__init__.py (1)
  • cpp_lib (12-26)
🪛 Pylint (3.3.7)
tests/diagnostic/__init__.py

[error] 16-16: No name 'pharein' in module 'pyphare'

(E0611)

tests/simulator/test_validation.py

[error] 7-7: No name 'cpp' in module 'pyphare'

(E0611)


[error] 8-8: No name 'core' in module 'pyphare'

(E0611)


[error] 9-9: No name 'simulator' in module 'pyphare'

(E0611)

tests/simulator/data_wrangler.py

[error] 9-9: No name 'cpp' in module 'pyphare'

(E0611)


[error] 10-10: No name 'simulator' in module 'pyphare'

(E0611)

tests/simulator/refinement/test_2d_2_core.py

[error] 14-14: No name 'pharein' in module 'pyphare'

(E0611)


[error] 15-15: No name 'cpp' in module 'pyphare'

(E0611)


[error] 16-16: No name 'core' in module 'pyphare'

(E0611)


[error] 17-17: No name 'simulator' in module 'pyphare'

(E0611)

tests/simulator/test_diagnostics.py

[error] 10-10: No name 'pharein' in module 'pyphare'

(E0611)


[error] 11-11: No name 'cpp' in module 'pyphare'

(E0611)


[error] 12-12: No name 'pharein' in module 'pyphare'

(E0611)


[error] 13-13: No name 'pharesee' in module 'pyphare'

(E0611)


[error] 14-14: No name 'pharesee' in module 'pyphare'

(E0611)


[error] 15-15: No name 'simulator' in module 'pyphare'

(E0611)

tests/simulator/refinement/test_2d_10_core.py

[error] 14-14: No name 'core' in module 'pyphare'

(E0611)


[error] 15-15: No name 'simulator' in module 'pyphare'

(E0611)

tests/simulator/test_initialization.py

[error] 8-8: No name 'cpp' in module 'pyphare'

(E0611)

tests/simulator/refined_particle_nbr.py

[error] 12-12: No name 'cpp' in module 'pyphare'

(E0611)


[error] 13-13: No name 'cpp' in module 'pyphare'

(E0611)


[error] 14-14: No name 'simulator' in module 'pyphare'

(E0611)

tests/simulator/test_diagnostic_timestamps.py

[error] 10-10: No name 'pharein' in module 'pyphare'

(E0611)


[error] 11-11: No name 'cpp' in module 'pyphare'

(E0611)


[error] 12-12: No name 'core' in module 'pyphare'

(E0611)


[error] 13-13: No name 'pharein' in module 'pyphare'

(E0611)


[error] 14-14: No name 'pharesee' in module 'pyphare'

(E0611)


[error] 15-15: No name 'pharesee' in module 'pyphare'

(E0611)


[error] 16-16: No name 'pharesee' in module 'pyphare'

(E0611)


[error] 17-17: No name 'simulator' in module 'pyphare'

(E0611)

tests/simulator/test_advance.py

[error] 8-8: No name 'core' in module 'pyphare'

(E0611)


[error] 10-10: No name 'cpp' in module 'pyphare'

(E0611)

tests/simulator/test_restarts.py

[error] 13-13: No name 'pharein' in module 'pyphare'

(E0611)


[error] 15-15: No name 'cpp' in module 'pyphare'

(E0611)

tests/simulator/__init__.py

[error] 9-9: No name 'pharein' in module 'pyphare'

(E0611)

🪛 Ruff (0.11.9)
tests/simulator/__init__.py

4-4: os imported but unused

(F401)

🪛 Flake8 (7.2.0)
tests/simulator/__init__.py

[error] 4-4: 'os' imported but unused

(F401)

⏰ Context from checks skipped due to timeout of 90000ms (7)
  • GitHub Check: Analyze (python)
  • GitHub Check: Analyze (cpp)
  • GitHub Check: build (macos-14)
  • GitHub Check: build (macos-latest)
  • GitHub Check: build (macos-13)
  • GitHub Check: build (ubuntu-latest, gcc)
  • GitHub Check: build (ubuntu-latest, clang)
🔇 Additional comments (32)
tests/core/data/gridlayout/test_linear_combinaisons_yee.py (1)

4-8: No dangling np or utilities references detected in test_linear_combinaisons_yee.py
Verified with:

rg -n '\b(np\b|utilities\b)' tests/core/data/gridlayout/test_linear_combinaisons_yee.py

No matches found—removing the numpy / utilities imports is safe.

tests/functional/ionIonBeam/ion_ion_beam1d.py (3)

3-14: Good standardization of imports and test patterns.

The reorganization looks clean - moving numpy and matplotlib imports to the top level follows PEP 8 conventions, and the standardization of GUI disabling with ph.NO_GUI() and MPI rank access through cpp_lib() aligns well with the test cleanup objectives.


109-110: Approve moving heavy imports inside functions.

Moving scipy imports inside functions is a good optimization to avoid import overhead for heavy dependencies unless they're actually needed during execution.


176-176: Approve the MPI rank access standardization.

The change from mpi_rank() to cpp.mpi_rank() properly uses the new cpp instance and aligns with the standardization effort across the test suite.

tests/core/data/gridlayout/deriv.py (1)

4-9: Import re-ordering looks good

os, sys, and numpy are now grouped logically before third-party and local imports, matching Ruff’s style rules. No functional impact observed.

tests/core/data/gridlayout/gridIndexing.py (1)

11-16: Clean import grouping LGTM

Moving sys/gridlayout into the standard/third-party section removes earlier shadowing and clarifies dependencies. No other issues spotted.

tests/core/data/gridlayout/fieldNodeCoordinates.py (1)

5-10: Import cleanup LGTM

The new ordering (os, sys, third-party, local) adheres to Ruff/PEP-8 and improves readability. All added imports are used later in the file.

tests/functional/td/td1d.py (1)

3-8: Import ordering looks good; NO_GUI activated early.

Nice consolidation: removing matplotlib imports and calling ph.NO_GUI() early keeps the test headless-friendly and avoids heavy imports until strictly needed.

tests/functional/harris/harris_2d.py (1)

12-15: Headless mode enabled consistently.

ph.NO_GUI() correctly replaces the previous backend tweak and is called before any plotting could occur. 👍

tests/functional/translation/translat1d.py (1)

3-10: Good consistency: GUI disabled and heavy matplotlib import removed.

This mirrors the pattern across the suite and reduces binary dependencies in test startup time.

tests/simulator/refinement/test_2d_10_core.py (2)

14-14: Import reorganization looks good.

The import of pyphare.core.box has been moved to a more logical position in the import sequence. This aligns with the systematic import cleanup across the test suite.


17-17: Excellent standardization of GUI backend handling.

Replacing direct matplotlib backend calls with ph.NO_GUI() centralizes the backend configuration logic. This is functionally equivalent since NO_GUI() internally calls mpl.use("Agg") as shown in pyphare/pyphare/pharein/__init__.py lines 60-64, but provides better maintainability.

tests/simulator/refinement/test_2d_2_core.py (1)

13-21: Well-organized import cleanup and standardization.

The import reorganization improves code structure by:

  • Grouping related imports together (cpp_lib, core.box)
  • Moving test imports to a logical position
  • Standardizing GUI backend handling with ph.NO_GUI()

This aligns perfectly with the systematic cleanup across the test suite.

tests/functional/alfven_wave/alfven_wave1d.py (1)

10-13: Effective import cleanup and GUI standardization.

The changes demonstrate good cleanup practices by:

  • Retaining only the necessary matplotlib import (pyplot) that's actually used in the main() function
  • Adding proper spacing for readability
  • Standardizing GUI backend handling with ph.NO_GUI()

This is consistent with the systematic refactoring across the test suite and removes unused imports while preserving functionality.

tests/functional/shock/shock.py (1)

178-178: Good practice: Defer MPI initialization to main execution.

Moving startMPI() into the main execution block prevents MPI initialization on import, improving test isolation and following Python best practices.

tests/simulator/test_run.py (1)

249-249: Consistent improvement: MPI initialization deferred to test execution.

This change aligns with the broader cleanup effort, ensuring MPI is only initialized when tests are executed directly rather than on import.

tests/simulator/test_initialization.py (1)

8-8: Improved import organization and spacing.

The reorganization of cpp_lib import and cpp instantiation with proper spacing enhances code readability and follows consistent patterns across the test suite.

Also applies to: 27-29

tests/simulator/refined_particle_nbr.py (1)

8-8: Consistent import reorganization across test files.

The reordering groups standard library imports together and moves project-specific imports and instantiations to a dedicated section, improving code organization.

Also applies to: 12-12, 19-20

tests/simulator/data_wrangler.py (1)

6-8: Completed import reorganization pattern.

The final adjustment completes the consistent import organization pattern across test files, grouping standard library imports at the top and moving instantiations after all imports.

Also applies to: 10-10, 14-15

tests/simulator/test_load_balancing.py (3)

22-22: LGTM: Improved spacing after cpp instantiation.

The blank line after cpp = cpp_lib() enhances readability by providing visual separation.


214-217: LGTM: Properly removed unused variable assignment.

Removing the diag_dir variable assignment is correct since the method expects a RuntimeError to be raised and the assignment would never be reached anyway.


285-285: LGTM: Consistent MPI initialization pattern.

Moving startMPI() to the if __name__ == "__main__": block aligns with similar changes across other simulator test files and ensures MPI is only initialized when the script runs directly.

tests/simulator/test_diagnostics.py (1)

6-20: LGTM: Excellent import reorganization.

The import restructuring follows Python best practices by grouping standard library imports, third-party imports, and project-specific imports. Moving the cpp = cpp_lib() instantiation to a more logical position after imports improves code organization. This pattern is consistent with similar changes across other test files in the simulator suite.

tests/simulator/test_validation.py (3)

7-15: LGTM: Consistent import reorganization.

Moving the cpp_lib import and instantiation follows the same cleanup pattern applied across other simulator test files, improving consistency and code organization.


48-48: LGTM: Removed unused exception variable.

Changing except ValueError as e: to except ValueError: correctly removes the unused exception variable, following good Python practices.


389-390: LGTM: Deferred unittest import.

Moving the unittest import inside the if __name__ == "__main__": block is consistent with the cleanup approach and ensures the import is only loaded when needed.

tests/simulator/test_diagnostic_timestamps.py (1)

6-20: LGTM: Consistent import organization pattern.

The import reorganization follows the same systematic approach applied across all simulator test files, grouping standard library imports, organizing pyphare-specific imports, and positioning the cpp = cpp_lib() instantiation logically after imports. This creates a consistent and clean import structure throughout the test suite.

tests/simulator/test_restarts.py (3)

1-25: LGTM: Systematic cleanup and import reorganization.

The header cleanup, import reorganization, and cpp instantiation positioning follow the same beneficial pattern applied across all simulator test files. These changes improve code organization and consistency without affecting functionality.


387-387: LGTM: Removed unused variable assignments.

Removing the unused model variable assignments from setup_model() calls is correct since the returned model instances weren't being used. This cleanup aligns with PhilipDeegan's preference for minimal and efficient code.

Also applies to: 405-405


424-424: LGTM: Improved exception handling.

Changing from a bare except: to except Exception: is a good practice that makes the exception handling more explicit while maintaining the same functional behavior.

tests/simulator/test_advance.py (1)

8-10: Minor import redundancy

You import pyphare.core.box twice—once aliased as boxm (line 8) and again as Box (line 11).
That’s perfectly valid, but if the goal is to trim unused imports you might alias one or the other consistently to avoid cognitive overhead.
No action needed if you prefer the current style.

tests/simulator/__init__.py (1)

9-9: Caliper removal looks good

Confirming that all Caliper-specific helpers and environment plumbing were removed consistently; this simplifies the test harness without affecting behaviour. Nice cleanup.

@PHAREHUB PHAREHUB deleted a comment from coderabbitai bot Jul 5, 2025
Copy link
Member

@nicolasaunai nicolasaunai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add some explainations for the h5 stuff at least

@PhilipDeegan
Copy link
Member Author

todo: move h5py import / explain why h5py should not be imported until later

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (4)
tests/simulator/__init__.py (1)

1-3: Add a meaningful module docstring

The file now starts with two lonely comment markers. Replacing them with a short docstring clarifies purpose and silences doc-lint tools.

-#
-#
-#
+"""
+Shared utilities for PHARE simulator integration tests.
+"""
doc/conventions.md (3)

3-3: Fix heading level to comply with MD001

Jumping from # to ### skips a level. Use ## instead.

-### Reference document for the code base
+## Reference document for the code base

31-33: Typo: “depenencies” → “dependencies”

-## 2.2 dependencies and imports
-Third party depenencies are stated in the file `requirements.txt` in the project root.
+## 2.2 Dependencies and imports
+Third-party dependencies are stated in the file `requirements.txt` in the project root.

36-36: Remove trailing period in heading (MD026)

Headings should not end with punctuation.

-### 2.2.1 Python file import structure.
+### 2.2.1 Python file import structure
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 95cfa9d and 08ba203.

📒 Files selected for processing (36)
  • doc/conventions.md (1 hunks)
  • pyphare/pyphare/cpp/__init__.py (2 hunks)
  • pyphare/pyphare/pharesee/hierarchy/fromh5.py (5 hunks)
  • src/python3/CMakeLists.txt (0 hunks)
  • tests/amr/data/field/refine/test_refine_field.py (0 hunks)
  • tests/core/data/gridlayout/allocSizes.py (1 hunks)
  • tests/core/data/gridlayout/deriv.py (1 hunks)
  • tests/core/data/gridlayout/fieldNodeCoordinates.py (1 hunks)
  • tests/core/data/gridlayout/gridIndexing.py (1 hunks)
  • tests/core/data/gridlayout/test_linear_combinaisons_yee.py (1 hunks)
  • tests/diagnostic/__init__.py (3 hunks)
  • tests/diagnostic/job_1d.py.in (1 hunks)
  • tests/diagnostic/job_2d.py.in (1 hunks)
  • tests/functional/alfven_wave/alfven_wave1d.py (1 hunks)
  • tests/functional/harris/harris_2d.py (2 hunks)
  • tests/functional/ionIonBeam/ion_ion_beam1d.py (4 hunks)
  • tests/functional/shock/shock.py (1 hunks)
  • tests/functional/td/td1d.py (1 hunks)
  • tests/functional/tdtagged/td1dtagged.py (0 hunks)
  • tests/functional/translation/translat1d.py (1 hunks)
  • tests/initializer/job.py (2 hunks)
  • tests/simulator/__init__.py (1 hunks)
  • tests/simulator/data_wrangler.py (1 hunks)
  • tests/simulator/refined_particle_nbr.py (1 hunks)
  • tests/simulator/refinement/test_2d_10_core.py (1 hunks)
  • tests/simulator/refinement/test_2d_2_core.py (1 hunks)
  • tests/simulator/test_advance.py (3 hunks)
  • tests/simulator/test_diagnostic_timestamps.py (2 hunks)
  • tests/simulator/test_diagnostics.py (3 hunks)
  • tests/simulator/test_initialization.py (2 hunks)
  • tests/simulator/test_load_balancing.py (7 hunks)
  • tests/simulator/test_restarts.py (5 hunks)
  • tests/simulator/test_run.py (2 hunks)
  • tests/simulator/test_simulation.py (0 hunks)
  • tests/simulator/test_tagging.py.off (2 hunks)
  • tests/simulator/test_validation.py (3 hunks)
💤 Files with no reviewable changes (4)
  • tests/simulator/test_simulation.py
  • tests/functional/tdtagged/td1dtagged.py
  • tests/amr/data/field/refine/test_refine_field.py
  • src/python3/CMakeLists.txt
✅ Files skipped from review due to trivial changes (8)
  • tests/core/data/gridlayout/test_linear_combinaisons_yee.py
  • tests/simulator/test_tagging.py.off
  • tests/functional/td/td1d.py
  • tests/functional/harris/harris_2d.py
  • tests/core/data/gridlayout/allocSizes.py
  • tests/simulator/data_wrangler.py
  • pyphare/pyphare/pharesee/hierarchy/fromh5.py
  • tests/simulator/test_restarts.py
🚧 Files skipped from review as they are similar to previous changes (22)
  • tests/functional/shock/shock.py
  • tests/core/data/gridlayout/gridIndexing.py
  • tests/core/data/gridlayout/deriv.py
  • tests/functional/translation/translat1d.py
  • tests/simulator/test_run.py
  • tests/diagnostic/init.py
  • tests/diagnostic/job_1d.py.in
  • tests/functional/alfven_wave/alfven_wave1d.py
  • tests/initializer/job.py
  • tests/simulator/refinement/test_2d_10_core.py
  • tests/simulator/test_validation.py
  • tests/core/data/gridlayout/fieldNodeCoordinates.py
  • tests/simulator/test_diagnostic_timestamps.py
  • tests/simulator/refined_particle_nbr.py
  • tests/simulator/test_diagnostics.py
  • pyphare/pyphare/cpp/init.py
  • tests/diagnostic/job_2d.py.in
  • tests/simulator/refinement/test_2d_2_core.py
  • tests/simulator/test_advance.py
  • tests/simulator/test_load_balancing.py
  • tests/simulator/test_initialization.py
  • tests/functional/ionIonBeam/ion_ion_beam1d.py
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: PhilipDeegan
PR: PHAREHUB/PHARE#888
File: src/hdf5/detail/h5/h5_file.hpp:78-79
Timestamp: 2024-09-05T17:02:58.784Z
Learning: Avoid commenting on draft PRs for the user PhilipDeegan.
Learnt from: PhilipDeegan
PR: PHAREHUB/PHARE#888
File: src/hdf5/detail/h5/h5_file.hpp:78-79
Timestamp: 2024-10-09T08:32:15.667Z
Learning: Avoid commenting on draft PRs for the user PhilipDeegan.
Learnt from: PhilipDeegan
PR: PHAREHUB/PHARE#888
File: pyphare/pyphare/pharesee/hierarchy/hierarchy_utils.py:566-568
Timestamp: 2024-09-09T13:57:02.285Z
Learning: Avoid commenting on draft PRs for PhilipDeegan unless explicitly requested.
Learnt from: PhilipDeegan
PR: PHAREHUB/PHARE#784
File: tests/simulator/test_restarts.py:333-339
Timestamp: 2024-10-09T08:32:15.667Z
Learning: PhilipDeegan has indicated a preference for minimal and efficient code, even after making changes to get a function working. There may be opportunities to remove or optimize parts of the code such as sleep/wait/advances.
Learnt from: PhilipDeegan
PR: PHAREHUB/PHARE#784
File: tests/simulator/test_restarts.py:333-339
Timestamp: 2024-07-26T22:04:34.160Z
Learning: PhilipDeegan has indicated a preference for minimal and efficient code, even after making changes to get a function working. There may be opportunities to remove or optimize parts of the code such as sleep/wait/advances.
doc/conventions.md (1)

Learnt from: nicolasaunai
PR: #591
File: res/cmake/options.cmake:73-75
Timestamp: 2025-02-07T14:35:14.630Z
Learning: In CMake configuration for PHARE, lowResourceTests and highResourceTests options must be mutually exclusive and cannot be enabled simultaneously.

🪛 markdownlint-cli2 (0.17.2)
doc/conventions.md

3-3: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)


36-36: Trailing punctuation in heading
Punctuation: '.'

(MD026, no-trailing-punctuation)

🪛 Ruff (0.12.2)
tests/simulator/__init__.py

4-4: os imported but unused

(F401)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: build (macos-14)
  • GitHub Check: build (macos-13)
  • GitHub Check: build (macos-latest)
  • GitHub Check: build (ubuntu-latest, gcc)
  • GitHub Check: build (ubuntu-latest, clang)
  • GitHub Check: Analyze (cpp)

@PHAREHUB PHAREHUB deleted a comment from coderabbitai bot Jul 24, 2025
@PhilipDeegan PhilipDeegan merged commit 893a544 into PHAREHUB:master Jul 25, 2025
13 checks passed
@PhilipDeegan PhilipDeegan deleted the ctypes branch July 25, 2025 12:43
UCaromel pushed a commit to UCaromel/PHARE that referenced this pull request Aug 1, 2025
PhilipDeegan added a commit to PhilipDeegan/PHARE that referenced this pull request Aug 7, 2025
PhilipDeegan added a commit to PhilipDeegan/PHARE that referenced this pull request Oct 8, 2025
UCaromel pushed a commit to UCaromel/PHARE that referenced this pull request Oct 14, 2025
@coderabbitai coderabbitai bot mentioned this pull request Nov 7, 2025
UCaromel pushed a commit to UCaromel/PHARE that referenced this pull request Feb 6, 2026
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.

The scipy install you are using seems to be broken

2 participants