Skip to content

Issue875#877

Closed
ilayfalach wants to merge 5 commits into
masterfrom
issue875
Closed

Issue875#877
ilayfalach wants to merge 5 commits into
masterfrom
issue875

Conversation

@ilayfalach
Copy link
Copy Markdown
Collaborator

No description provided.

Ilay Falach and others added 5 commits May 17, 2026 13:24
…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
   - fixed the plots of the rose and the projections.
utils -
       added plots of polygons.
@yehudarav
Copy link
Copy Markdown
Collaborator

@ilayfalach - I have also updated the code. make sure it passes the tests.

@yehudarav yehudarav closed this May 19, 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.

2 participants