NOAA-GFDL / pace

Re-write of FV3GFS weather/climate model in Python
Apache License 2.0
12 stars 11 forks source link

Refactor local import in Quantity #3

Open FlorianDeconinck opened 1 year ago

FlorianDeconinck commented 1 year ago

Floating point precision lead to introducing a rather ugly pace.dsl.typing import Float locally to Quantity.__init__ to break a circular import

This include so deep in pace.util can lead to circular include. Since Quantity builds should not be in the critical path, this is "fine" for now but requires to be refactored out. Strategies that seems obvious (but aren't):

Apologies to whoever works on this. If it's future me... I deserved it.

More broadly, there's imports of pace.dsl in pace.util which breaks the dependency cycle of the repository