refactor: prefix VelocityAdvection internal attributes with underscore#1180
refactor: prefix VelocityAdvection internal attributes with underscore#1180
Conversation
|
Hi there, this is jenkins continuous integration... |
1 similar comment
|
Hi there, this is jenkins continuous integration... |
…with underscore convention Rename internal state attributes in VelocityAdvection to use underscore prefix, matching the convention used in SolveNonhydro and Diffusion: - self.grid -> self._grid - self.metric_state -> self._metric_state - self.interpolation_state -> self._interpolation_state - self.vertical_params -> self._vertical_params - self.edge_params -> self._edge_params - self.c_owner_mask -> self._c_owner_mask Public attributes (cfl_w_limit, scalfac_exdiff, vertical_cfl) remain unchanged as they are part of the external API. Agent-Logs-Url: https://github.com/C2SM/icon4py/sessions/551a6408-1d07-45e9-a16d-b0c9974aed25 Co-authored-by: jcanton <5622559+jcanton@users.noreply.github.com>
|
cscs-ci run default |
|
cscs-ci run distributed |
msimberg
left a comment
There was a problem hiding this comment.
This looks fine and self contained to me assuming tests pass.
|
@copilot update the branch to latest origin/main. |
…es-consistent Co-authored-by: msimberg <42977+msimberg@users.noreply.github.com>
Done — merged latest |
|
I would say these three variables |
@copilot can you take care of this comment? If the only place where they're accessed "externally" is in tests, just access them with |
…elocityAdvection Agent-Logs-Url: https://github.com/C2SM/icon4py/sessions/f4210f8b-74a8-44d5-bece-81b5a6d75aab Co-authored-by: msimberg <42977+msimberg@users.noreply.github.com>
Done in |
| self._vertical_params = vertical_params | ||
| self._edge_params = edge_params | ||
| self._c_owner_mask = owner_mask |
There was a problem hiding this comment.
should these three also have type hints?
There was a problem hiding this comment.
Would be good. @copilot can you add type hints?
There was a problem hiding this comment.
Added type hints in e02c9ff: _vertical_params: v_grid.VerticalGrid, _edge_params: grid_states.EdgeParams, _c_owner_mask: fa.CellField[bool] — now all nine attributes in __init__ have explicit type annotations.
…mask Agent-Logs-Url: https://github.com/C2SM/icon4py/sessions/ac306e0a-db6e-4419-9feb-c2ea89ccab40 Co-authored-by: msimberg <42977+msimberg@users.noreply.github.com>
|
Mandatory Tests Please make sure you run these tests via comment before you merge!
Optional Tests To run benchmarks you can use:
To run tests and benchmarks with the DaCe backend you can use:
To run test levels ignored by the default test suite (mostly simple datatest for static fields computations) you can use:
For more detailed information please look at CI in the EXCLAIM universe. |
|
cscs-ci run default |
|
cscs-ci run distributed |
* main: refactor: prefix VelocityAdvection internal attributes with underscore (#1180) fortran bindings: split py2fgen and bindings (#1185) Rename `single_node_default` to `single_node_exchange` (#1176) remove the duplication of fixtures (#1186) Update GT4Py to v1.1.9 (#1187) cleanup 3 unused vars from solve_nh_init (#1169)
self.grid→self._gridin VelocityAdvectionself.metric_state→self._metric_statein VelocityAdvectionself.interpolation_state→self._interpolation_statein VelocityAdvectionself.vertical_params→self._vertical_paramsin VelocityAdvectionself.edge_params→self._edge_paramsin VelocityAdvectionself.c_owner_mask→self._c_owner_maskin VelocityAdvectionself.cfl_w_limit→self._cfl_w_limitin VelocityAdvectionself.scalfac_exdiff→self._scalfac_exdiffin VelocityAdvectionself.vertical_cfl→self._vertical_cflin VelocityAdvection_vertical_params,_edge_params,_c_owner_mask_prefix⚡ Quickly spin up Copilot coding agent tasks from anywhere on your macOS or Windows machine with Raycast.