Issue875#877
Closed
ilayfalach wants to merge 5 commits into
Closed
Conversation
…dynamics, and risk assessment (#875) Replace all `from unum.units import *` star imports and bare Unum unit literals (m, kg, cm, s, etc.) with explicit `ureg.<unit>` equivalents. Replace `.asNumber()` calls with `.m_as()` and add `unumToPint()` at function boundaries for backwards compatibility with legacy Unum callers. Files migrated: - hera/simulations/gaussian/{gasCloud,toolkit,Meteorology,Sigma,FallingNonEvaporatingDroplets,MeshUtils,DropletCloud}.py - hera/simulations/evaporation/{monaghan,models}.py - hera/simulations/deposition/models.py - hera/simulations/LSM/{toolkit,template,singleSimulation}.py - hera/simulations/hydrodynamics/nearWallFlow.py - hera/riskassessment/agents/Agents.py - hera/riskassessment/agents/effects/InjuryLevel.py - hera/utils/matplotlibCountour.py Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Remove all `from unum import Unum` local imports used only for isinstance checks. Replace `isinstance(x, Unum)` with `hasattr(x, 'asNumber')` duck typing so the production codebase no longer depends on the unum library at all. The three affected functions (ConfigurationToJSON, JSONToConfiguration, stripConfigurationUnits) all retain backwards compatibility: Unum objects passed in are still handled via unumToPint() conversion. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Fixing the shaply2 bug in the code
Collaborator
|
@ilayfalach - I have also updated the code. make sure it passes the tests. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.