Skip to content

refactor(flow360): use unified Flow360BaseModel from schema package#1943

Merged
benflexcompute merged 2 commits intoBenY/CentralizedSchemafrom
BenY/BaseModelMigration
Mar 30, 2026
Merged

refactor(flow360): use unified Flow360BaseModel from schema package#1943
benflexcompute merged 2 commits intoBenY/CentralizedSchemafrom
BenY/BaseModelMigration

Conversation

@benflexcompute
Copy link
Copy Markdown
Collaborator

@benflexcompute benflexcompute commented Mar 30, 2026

Summary

  • Client's Flow360BaseModel is now a pure re-export from flow360-schema
  • Remove ~420 lines of duplicated base model code
  • Drop YAML file support, update tests accordingly

Depends on: flexcompute/flex PR (flow360-schema BaseModel unification)

Test plan

  • pytest tests/simulation — 1026 passed
  • pytest --ignore=tests/simulation — 341 passed
  • pylint clean on changed files

🤖 Generated with Claude Code


Note

Medium Risk
Moderate risk because it centralizes core model behavior (copy/preprocess/file I/O/hash) into the flow360-schema dependency and removes YAML serialization paths, which could affect downstream workflows relying on prior SDK-specific behavior.

Overview
Unifies the client’s base model with the schema package. flow360.component.simulation.framework.base_model.Flow360BaseModel is reduced to a pure re-export of flow360_schema.framework.base_model.Flow360BaseModel, deleting the local implementations for copy, preprocess, hashing, and JSON/YAML file I/O.

Updates dependency + tests for the new behavior. Bumps flow360-schema to 0.1.17 and adjusts tests to only round-trip via .json (removing .yaml coverage and YAML imports).

Written by Cursor Bugbot for commit b980e6e. This will update automatically on new commits. Configure here.

Client's Flow360BaseModel is now a re-export from flow360-schema.
All SDK methods (copy, preprocess, file I/O, hash, help) live in schema.

- Remove ~420 lines of duplicated base model code
- Drop YAML file support (JSON only)
- Update tests to remove YAML test cases

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@benflexcompute benflexcompute force-pushed the BenY/BaseModelMigration branch from 62f1ee5 to 8c73139 Compare March 30, 2026 18:26
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 30, 2026

Coverage report (flow360)

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  flow360/component/simulation/framework
  base_model.py
Project Total  

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

@benflexcompute benflexcompute force-pushed the BenY/BaseModelMigration branch from d67d312 to 593a974 Compare March 30, 2026 18:43
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

… version

- Remove unused re-exports of _preprocess_any_model, _preprocess_nested_list,
  need_conversion (only used internally by schema)
- Bump flow360-schema minimum version to ~0.1.17

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@benflexcompute benflexcompute force-pushed the BenY/BaseModelMigration branch from 593a974 to b980e6e Compare March 30, 2026 18:47
@benflexcompute benflexcompute merged commit 8ae4221 into BenY/CentralizedSchema Mar 30, 2026
18 checks passed
@benflexcompute benflexcompute deleted the BenY/BaseModelMigration branch March 30, 2026 18:58
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