Skip to content

Migrate SimulationParams models to flow360-schema#1989

Merged
benflexcompute merged 9 commits intoBenY/CentralizedSchemafrom
BenY/simulation-schema-migration-wip
Apr 14, 2026
Merged

Migrate SimulationParams models to flow360-schema#1989
benflexcompute merged 9 commits intoBenY/CentralizedSchemafrom
BenY/simulation-schema-migration-wip

Conversation

@benflexcompute
Copy link
Copy Markdown
Collaborator

@benflexcompute benflexcompute commented Apr 14, 2026

Summary

  • relay SimulationParams -> leaf models imports from the Python client to flow360-schema
  • keep client module paths stable while moving the schema source of truth out of the client repo
  • include the small client-side follow-up fixes needed after the migration, including translator validation scope and relay/lint cleanup

Notes

  • schema-side implementation landed in flexcompute/flex#11061 and is now merged
  • this PR keeps the client surface mostly as 1:1 relay modules to minimize review noise

Validation

  • poetry run pylint $(git ls-files "flow360/*.py") --rcfile .pylintrc
  • export PYTEST_CACHE_DIR="./tests/.pytest_cache" && poetry run pytest -c tests/pytest.ini -rA tests/simulation
  • targeted schema/client migration regression tests run during implementation

Note

Medium Risk
Medium risk because many simulation/meshing/material model definitions and validators are replaced with schema re-exports, so any schema/client version mismatch or subtle import/validation differences could break user code at runtime.

Overview
Migrates the Python client’s simulation model source-of-truth to flow360-schema by replacing local implementations of boundary split helpers, meshing parameter models (edge/face/volume/snappy/specs/params), and material models with thin relay modules that re-export the schema types under the existing client import paths.

Updates validation wiring to match the new ownership (e.g., meshing_validators now lazily resolves validate_snappy_uniform_refinement_entities from the schema), while keeping the public API surface largely stable for downstream imports.

Reviewed by Cursor Bugbot for commit ee7e4ba. Bugbot is set up for automated code reviews on this repo. Configure here.

@benflexcompute benflexcompute enabled auto-merge (squash) April 14, 2026 00:51
@benflexcompute benflexcompute merged commit b7a6a9a into BenY/CentralizedSchema Apr 14, 2026
18 checks passed
@benflexcompute benflexcompute deleted the BenY/simulation-schema-migration-wip branch April 14, 2026 00:56
@github-actions
Copy link
Copy Markdown
Contributor

Coverage report (flow360)

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  flow360/component/simulation
  primitives.py
  units.py
  flow360/component/simulation/framework
  boundary_split.py
  flow360/component/simulation/meshing_param
  edge_params.py
  face_params.py
  meshing_specs.py
  meshing_validators.py 3-17
  params.py
  volume_params.py
  flow360/component/simulation/meshing_param/snappy
  snappy_mesh_refinements.py
  snappy_params.py
  snappy_specs.py
  flow360/component/simulation/models
  material.py
  solver_numerics.py
  surface_models.py
  turbulence_quantities.py
  volume_models.py
  flow360/component/simulation/models/validation
  validation_bet_disk.py 3-19
  flow360/component/simulation/operating_condition
  atmosphere_model.py 3-17
  flow360/component/simulation/outputs
  output_fields.py
  flow360/component/simulation/translator
  solver_translator.py
  utils.py 181-182, 234
  flow360/component/simulation/validation
  validation_context.py
  validation_simulation_params.py
  validation_utils.py
Project Total  

The report is truncated to 25 files out of 33. To see the full report, please visit the workflow summary page.

This report was generated by python-coverage-comment-action

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