Auto-mode: Merge accumulate/E1-F1 into main#1162
Conversation
Add a dedicated CondensationLatentHeatBuilder that reuses the shared condensation builder mixins and preserves constructor precedence for optional latent heat inputs. Export the new builder from the condensation builder package and cover strategy passthrough, scalar validation, parameter loading, and default update_gases behavior with focused tests. Closes uncscode#1157 ADW-ID: f437f8bb
Preserve empty charge arrays when building resolved particle representations so zero-particle cases do not warn or fail during shape normalization. Add a regression test covering resolved mass representations built with zero particles and array-valued charge input.
Update the E1-F1 plan sections to reflect the shipped P1 latent-heat builder work, including completed scope, focused test coverage, and deferred factory and export follow-up phases. Expand the latent-heat builder docstrings and keep the related builder test file aligned with the documented constructor and optional-parameter behavior. Closes uncscode#1157 ADW-ID: f437f8bb
Apply default units in CondensationLatentHeatBuilder.set_parameters() when *_units keys are omitted, and reset optional latent heat state between repeated parameter loads to prevent stale reuse. Validate latent_heat_strategy inputs at setter time with a clear TypeError, reject unsupported multidimensional density inputs in ParticleRepresentation, and reject incompatible particle charge array shapes instead of silently coercing them. Add builder and particle regression coverage for these behaviors and clean related test formatting/type issues so ruff and mypy pass. No remaining known failures. Closes uncscode#1157 ADW-ID: f437f8bb
Normalize singleton 2D density and charge inputs before building particle-resolved representations. This keeps resolved mass builders compatible with test fixtures and preserves expected 1D density and charge arrays. Closes uncscode#1157
Clarify particle representation and builder docstrings, tighten formatting, and simplify wording so the legacy particle APIs stay consistent with repository style requirements. Also rename the latent-heat builder regression test for clearer intent while keeping the current validation coverage intact. Closes uncscode#1157 ADW-ID: f437f8bb
Expose the latent-heat builder through CondensationFactory so configuration dictionaries can construct CondensationLatentHeat without custom factory logic. Add factory coverage for builder registration, strategy passthrough, scalar latent-heat fallback, precedence handling, and builder error propagation to protect the generic strategy path. Closes uncscode#1158 ADW-ID: 26e89047
Reflow latent-heat factory test assertions to satisfy formatting and line-length expectations after the implementation pass. This keeps the condensation factory tests lint-clean without changing behavior or coverage. Closes uncscode#1158 ADW-ID: 26e89047
Sync the E1-F1 plan section documents with the shipped P2 work for issue uncscode#1158. Document CondensationFactory latent-heat registration, the preserved generic builder path, added factory regression coverage, and the resolved factory-key decision so the feature plan matches the implemented documentation state. Closes uncscode#1158 ADW-ID: 26e89047
Expose CondensationLatentHeatBuilder from both public dynamics namespaces so the latent-heat builder matches the existing isothermal builder import surface. Extend the condensation export smoke tests to verify both namespaces include the builder in __all__ and resolve to the same class object. Closes uncscode#1159 ADW-ID: 409bd997
Update the condensation strategy guide to include
CondensationLatentHeatBuilder and the shipped
CondensationFactory.get_strategy("latent_heat", ...) path.
Sync the E1-F1 plan sections to mark the export and documentation
phases as shipped so the planning artifacts match the validated
documentation state.
Closes uncscode#1159
ADW-ID: 409bd997
Clarify that CondensationStrategy is exposed via particula.dynamics.condensation. Update the unified API section to distinguish the abstract interface from the concrete condensation exports available at the top-level dynamics namespace. Keep the public API scope unchanged while making the documentation accurate for users. This corrects the user-facing guidance so CondensationStrategy is referenced through the supported condensation subpackage path instead of an unsupported top-level dynamics path. Closes uncscode#1159 ADW-ID: 409bd997
Normalize particle mass-concentration conversions for zero-total and invalid-dimension inputs while adding regression tests for mole, volume, and mass fraction behavior. Also clarify the condensation strategy documentation so the latent-heat builder/factory workflow is distinguished from direct CondensationLatentHeat construction. Closes uncscode#1160 ADW-ID: 3f56e5c0
Refresh the module and function docstrings in convert_mass_concentration to use clearer summaries and consistent Args, Returns, and Raises sections. This keeps the formatting/docstring cleanup focused on style while preserving the existing conversion behavior. Closes uncscode#1160 ADW-ID: 3f56e5c0
Clarify the condensation strategy documentation for the latent-heat path by documenting direct constructor usage alongside the preferred builder and factory workflow. Sync the E1-F1 planning notes with the shipped docs-only follow-up, including the corrected issue reference and the targeted condensation validation set used to confirm the examples stay aligned with the public API. Closes uncscode#1160 ADW-ID: 3f56e5c0
Normalize scalar and list-like inputs in the mass, mole, and volume fraction helpers so single-component concentrations return stable fractions instead of failing on zero-dimensional arrays. Add regression coverage for scalar, zero, and list-like inputs across the conversion helpers, and clarify the latent-heat docs around the isothermal fallback path. Closes uncscode#1160 ADW-ID: 3f56e5c0
Final Handoff — Branch Accumulation CompleteAll 4 slices have been accumulated onto This PR requires manual review and merge.
Implementation SummaryDiff summary unavailable in finalization context Slices Completed |
There was a problem hiding this comment.
Pull request overview
This auto-mode merge brings the accumulate/E1-F1 work into main, primarily adding the latent-heat condensation builder/factory/export surface while also tightening legacy particle-representation input normalization and expanding fraction-conversion helpers/tests.
Changes:
- Added
CondensationLatentHeatBuilder, registered it inCondensationFactoryunder"latent_heat", and re-exported it viaparticula.dynamicsandparticula.dynamics.condensation(plus docs + tests). - Introduced stricter normalization/validation for
ParticleRepresentationdensity/charge shapes, with new regression tests (including zero-particle cases). - Updated mass→(mole/volume/mass) fraction conversion utilities to better handle scalar/list inputs and zero-total rows, with expanded tests.
Reviewed changes
Copilot reviewed 29 out of 29 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| particula/particles/tests/representation_zero_particle_test.py | New regression test covering zero-particle resolved representation builds (charge shape handling). |
| particula/particles/tests/representation_test.py | Adjusts test setup to rely on ParticleRepresentation normalization; adds density/charge shape validation tests. |
| particula/particles/tests/representation_builders_test.py | Adds coverage that resolved builder normalizes singleton 2D density/charge inputs. |
| particula/particles/representation.py | Adds _normalize_density_array / _normalize_charge_array helpers; tightens normalization + error messaging. |
| particula/particles/representation_builders.py | Adds resolved density/charge normalization helpers used by resolved builders. |
| particula/particles/properties/tests/convert_mass_concentration_test.py | Adds tests for scalar/list inputs, zero totals, and invalid dimensionality for fraction helpers. |
| particula/particles/properties/convert_mass_concentration.py | Updates fraction helpers to normalize scalar/1D/2D inputs and explicitly reject invalid dimensions. |
| particula/dynamics/tests/condensation_exports_test.py | Extends export smoke tests to include CondensationLatentHeatBuilder. |
| particula/dynamics/condensation/tests/condensation_latent_heat_builder_test.py | New unit tests for latent-heat condensation builder setters, validation, and build behavior. |
| particula/dynamics/condensation/tests/condensation_factories_test.py | Adds factory coverage for "latent_heat" strategy creation and precedence behavior. |
| particula/dynamics/condensation/condensation_factories.py | Registers CondensationLatentHeatBuilder in factory builders map and documents "latent_heat". |
| particula/dynamics/condensation/condensation_builder/condensation_latent_heat_builder.py | New builder implementation for CondensationLatentHeat with scalar/strategy latent heat handling. |
| particula/dynamics/condensation/condensation_builder/init.py | Exports CondensationLatentHeatBuilder from the builder package. |
| particula/dynamics/condensation/init.py | Re-exports CondensationLatentHeatBuilder in condensation namespace. |
| particula/dynamics/init.py | Re-exports CondensationLatentHeatBuilder in the top-level dynamics namespace. |
| docs/Features/condensation_strategy_system.md | Documents the new builder/factory workflow and import surfaces. |
| .opencode/plans/sections/features/E1-F1/testing_strategy.md | Updates plan section to reflect shipped tests/commands and validation scope. |
| .opencode/plans/sections/features/E1-F1/success_criteria.md | Marks success criteria complete and updates metrics to shipped state. |
| .opencode/plans/sections/features/E1-F1/scope.md | Replaces template content with shipped scope summary and in/out-of-scope lists. |
| .opencode/plans/sections/features/E1-F1/risk_register.md | Updates risk statuses/mitigations to reflect shipped resolutions. |
| .opencode/plans/sections/features/E1-F1/phase_details.md | Marks phases P1–P4 shipped and records final validation/testing notes. |
| .opencode/plans/sections/features/E1-F1/overview.md | Replaces template with shipped problem/value proposition and user stories. |
| .opencode/plans/sections/features/E1-F1/open_questions.md | Marks factory key naming question resolved to "latent_heat". |
| .opencode/plans/sections/features/E1-F1/infrastructure_reuse.md | Documents reuse points and integration anchors with file references. |
| .opencode/plans/sections/features/E1-F1/implementation_tasks.md | Marks implementation tasks complete and aligns wording with shipped changes. |
| .opencode/plans/sections/features/E1-F1/documentation_updates.md | Records the documentation sync work that was completed/shipped. |
| .opencode/plans/sections/features/E1-F1/dependencies.md | Updates dependency notes to reflect the shipped phase ordering/outcomes. |
| .opencode/plans/sections/features/E1-F1/change_log.md | Adds dated changelog entries describing the shipped plan/doc synchronization. |
| .opencode/plans/sections/features/E1-F1/architecture_design.md | Updates architecture section to match the shipped builder/factory/export behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if density_array.size == 0: | ||
| return np.zeros(0, dtype=np.float64) |
| charge_array = np.asarray(charge, dtype=np.float64) | ||
| if charge_array.ndim == 2 and charge_array.shape == mass.shape: | ||
| return charge_array[:, 0] | ||
| if charge_array.ndim == 2 and 1 in charge_array.shape: | ||
| return np.ravel(charge_array[:, :1]) | ||
| return charge |
🤖 Agent Developer Workflow
Current Status
Workflow Plan
📋 Recent ActivityThis comment is automatically updated as the workflow progresses |
ADW Code ReviewPR: #1162 - Auto-mode: Merge accumulate/E1-F1 into main Summary
Overall AssessmentThis PR looks generally solid: linting passes, no security-exploitable concerns were found, and no architectural issues were identified. The main items worth addressing before merge are:
Critical Issues (Must Fix)No critical issues were identified. Warnings (Should Fix)
Suggestions (Overview)
Positive Observations
Inline CommentsDetailed feedback has been posted as separate review comments on the following locations:
This review was generated by ADW Multi-Agent Code Review System. |
|
WARNING: Avoid advanced-index copies in normalization
This 2D normalization path can avoid advanced-index copies by using Suggested fix: prefer an |
🤖 Agent Developer Workflow
Current Status
Workflow Plan
📋 Recent Activity🔍 Archived UpdatesThis comment is automatically updated as the workflow progresses |
Reset CondensationLatentHeatBuilder update_gases state on reused set_parameters calls with regression coverage. Preserve zero-particle resolved density species shape and fix singleton-row resolved charge normalization. Reduce mass concentration normalization allocations via a shared masked np.divide helper with regression coverage. Add explicit public builder return type hints and direct 1D number_concentration allocations. Refresh E1-F1 planning, risk, and success docs for the shipped review follow-up. Resolve validation-found lint and mypy issues in representation_builders/tests. No remaining known failures. Closes uncscode#1162 ADW-ID: c8fd1220
Rewrite legacy ParticleRepresentation getter docstrings to use consistent Google-style Args and Returns sections. Also keep the touched particle representation tests aligned with the formatter's preferred wrapping for annotated function signatures. Closes uncscode#1162 ADW-ID: c8fd1220
Fix SummaryAddressed the actionable review feedback for particle representation normalization, builder state reuse, allocation efficiency, typing, and stale plan/docs updates. Changes Made
Review Comments AddressedSource workflow plan did not record explicit review comment IDs, so this summary maps fixes to the actionable items captured in
Files ChangedDiff vs Key files:
Automated fix by ADW workflow |
Reset CondensationLatentHeatBuilder update_gases state on reused set_parameters calls with regression coverage. Preserve zero-particle resolved density species shape and fix singleton-row resolved charge normalization. Reduce mass concentration normalization allocations via a shared masked np.divide helper with regression coverage. Add explicit public builder return type hints and direct 1D number_concentration allocations. Refresh E1-F1 planning, risk, and success docs for the shipped review follow-up. Resolve validation-found lint and mypy issues in representation_builders/tests. No remaining known failures. Closes #1162 ADW-ID: c8fd1220
🤖 Agent Developer Workflow
Current Status
Workflow Plan
📋 Recent ActivityThis comment is automatically updated as the workflow progresses |
🤖 Agent Developer Workflow
Current Status
Workflow Plan
📋 Recent ActivityThis comment is automatically updated as the workflow progresses |
🤖 Agent Developer Workflow
Current Status
Workflow Plan
📋 Recent ActivityThis comment is automatically updated as the workflow progresses |
🤖 Agent Developer Workflow
Current Status
Workflow Plan
📋 Recent ActivityThis comment is automatically updated as the workflow progresses |
🤖 Agent Developer Workflow
Current Status
Workflow Plan
📋 Recent ActivityThis comment is automatically updated as the workflow progresses |
🤖 Agent Developer Workflow
Current Status
Workflow Plan
📋 Recent ActivityThis comment is automatically updated as the workflow progresses |
🤖 Agent Developer Workflow
Current Status
Workflow Plan
📋 Recent ActivityThis comment is automatically updated as the workflow progresses |
🤖 Agent Developer Workflow
Current Status
Workflow Plan
📋 Recent ActivityThis comment is automatically updated as the workflow progresses |
🤖 Agent Developer Workflow
Current Status
Workflow Plan
📋 Recent ActivityThis comment is automatically updated as the workflow progresses |
🤖 Agent Developer Workflow
Current Status
Workflow Plan
📋 Recent ActivityThis comment is automatically updated as the workflow progresses |
🤖 Agent Developer Workflow
Current Status
Workflow Plan
📋 Recent ActivityThis comment is automatically updated as the workflow progresses |
🤖 Agent Developer Workflow
Current Status
Workflow Plan
📋 Recent ActivityThis comment is automatically updated as the workflow progresses |
🤖 Agent Developer Workflow
Current Status
Workflow Plan
📋 Recent ActivityThis comment is automatically updated as the workflow progresses |
🤖 Agent Developer Workflow
Current Status
Workflow Plan
📋 Recent ActivityThis comment is automatically updated as the workflow progresses |
🤖 Agent Developer Workflow
Current Status
Workflow Plan
📋 Recent ActivityThis comment is automatically updated as the workflow progresses |
🤖 Agent Developer Workflow
Current Status
Workflow Plan
📋 Recent ActivityThis comment is automatically updated as the workflow progresses |
🤖 Agent Developer Workflow
Current Status
Workflow Plan
📋 Recent ActivityThis comment is automatically updated as the workflow progresses |
🤖 Agent Developer Workflow
Current Status
Workflow Plan
📋 Recent ActivityThis comment is automatically updated as the workflow progresses |
🤖 Agent Developer Workflow
Current Status
Workflow Plan
📋 Recent ActivityThis comment is automatically updated as the workflow progresses |
🤖 Agent Developer Workflow
Current Status
Workflow Plan
📋 Recent ActivityThis comment is automatically updated as the workflow progresses |
Target Branch:
mainAuto-mode completed for
accumulate/E1-F1.