Relay migrated simulation schema services from flow360-schema#2000
Relay migrated simulation schema services from flow360-schema#2000benflexcompute wants to merge 7 commits intomainfrom
Conversation
Add `# pylint: disable=unused-import` to relay-only files whose re-exported symbols are consumed by compute pipeline scripts. Remove genuinely unused `materialize_entities_and_selectors_in_place` import from services.py. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Keep only relay exports consumed by external compute scripts (_parse_root_item_type_from_simulation_json, apply_simulation_setting_to_entity_info, get_default_params, merge_geometry_entity_info, update_simulation_json). Remove 15 symbols with no internal or external callers. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
There are 4 total unresolved issues (including 2 from previous reviews).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 355d0ef. Configure here.
| RestrictedUnitSystem, | ||
| compute_udf_dimensionalization_factor, | ||
| get_flow360_unit_system_liquid, | ||
| ) |
There was a problem hiding this comment.
Missing relay exports for previously available public symbols
Low Severity
The old conversion.py exported need_conversion, require, and get_from_dict_by_key_list which are no longer re-exported in the relay module. While current in-tree consumers don't appear to use these from this path, dropping public symbols from a module that external callers may depend on can break downstream code. If these are intentionally removed, the module's relay comment could note the deprecation; otherwise they belong in the re-export list.
Reviewed by Cursor Bugbot for commit 355d0ef. Configure here.
| compare_values, | ||
| deprecation_reminder, | ||
| recursive_remove_key, | ||
| ) |
There was a problem hiding this comment.
Schema's deprecation_reminder may use wrong version
Medium Severity
The old deprecation_reminder compared against the client's flow360.version.__version__. Now it's imported from flow360_schema, which likely compares against the schema package's own version. Since user_code/core/types.py registers this with register_deprecation_check, deprecation checks for expressions could fire at the wrong time if the schema and client version strings diverge.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 355d0ef. Configure here.
…ma-migration-batch-1-client-main-v2


What changed
flow360/component/simulation/into thin relays over schema-owned implementationsservices_utilsWhy
The migration target is for the client to keep runtime-only responsibilities such as translator orchestration, web API code, BET wrappers, and unit-switching, while schema owns Pydantic behavior, validation, and deserialization.
This PR is the final replacement client migration batch re-rooted onto the true current
main.Impact
Validation
python -m py_compile flow360/component/simulation/services.py flow360/component/simulation/services_utils.py flow360/component/simulation/conversion.py flow360/component/simulation/utils.py flow360/component/simulation/framework/updater.py flow360/component/simulation/framework/updater_functions.py flow360/component/simulation/framework/updater_utils.pyflow360-schemapackage during developmentPaired Schema PR
Remaining Work From Plan
unit_system.py/exposed_units.pyonly after confirming real remaining consumerstests/simulation/params/test_validators_params.pyandtests/simulation/services/test_selector_expansion_validators.pyFollow-up
This PR supersedes #1998 and #1999 for review against
main. The remaining items should be finished in a follow-up PR rather than expanding this one further.Note
Medium Risk
Medium risk because core simulation validation/updater/conversion entrypoints are now delegated to the external
flow360-schemapackage, so behavioral changes depend on that version bump and can affect many workflows despite minimal in-repo code changes.Overview
This PR turns several
flow360/component/simulationmodules into thin relay layers overflow360_schemaimplementations, removing large blocks of duplicated client logic.Key entrypoints like simulation
validate_model, updater orchestration/helpers/utilities, unit conversion helpers, and various service/utils helpers now import and re-export schema-owned functions/constants instead of maintaining local copies, and theflow360-schemadependency is bumped to25.10.2b1.It also removes multiple client-side JSON fixtures/reference files that validated the duplicated behavior, with the expectation that these tests now live with the schema code.
Reviewed by Cursor Bugbot for commit 06d4110. Bugbot is set up for automated code reviews on this repo. Configure here.