Skip to content

Conversation

@benflexcompute
Copy link
Collaborator

Selector Tokenization Support

  • Added a selector cache (AssetCache.selectors) and ensured it survives preprocessing so selector definitions can be reused across the tree.
  • Introduced token-awareness in the selector expansion pipeline (_process_selectors, _expand_node_selectors, expand_entity_selectors_in_place) plus a new helper, collect_and_tokenize_selectors_in_place, to collect unique selector definitions and replace inline JSON with tokens.
  • Extended services_utils.has_any_entity_selectors and strip_selector_matches_inplace to understand string tokens, and wired draft uploads (Draft.update_simulation_params) to run tokenization before stripping entities.
  • Added regression tests under tests/simulation/framework/test_entity_selector_token.py covering token round-trip, mixed token/dict usage, and expansion results.

@benflexcompute benflexcompute merged commit 21bf112 into BenY/FXC-3494/TextExpression Nov 19, 2025
18 checks passed
@benflexcompute benflexcompute deleted the BenY/AddSelectorsToAssetCache branch November 19, 2025 21:20
benflexcompute added a commit that referenced this pull request Nov 29, 2025
* [FXC-3529] Introduce `EntitySelector` data model into `EntityList` (#1466)

* [FXC-3529] Introduce EntitySelector data model into EntityList

* Remove unnecessary changes

* [FXC-3530] Added `EntitySelector` expansion function (#1471)

* Added the get_entity_database_for_selectors

* WIP

* Added support for generic Glob patterns

* Ready

* Added case sensitivity on Windows

* [FXC-3554] `EntitySelector` generation flunet API (#1492)

* Finished implementation

* Removed equals and not_equals

* Self review

* Changed discriminator to be confromal to the user API

* Removed Flow360BaseModel inheritance from InputFileModel

* [Text expression] Update the service to ensure expanding before the validation (#1534)

* Update the service to ensure expanding before the validation

* Fixed unit test

* Added support for assigning EntitySelector to EntityList, also updated validations to defer stored_entities related checks to validate_model() stage

* Enabled pure selector input

* fixed lint

* Refactor on entity test structure

* Added removal of matched entities before submission

* Reviewed

* Fixed pylint

* fix(): Moving the preprocessing of dict before validaiton into a function before constructing ParamsValidationInfo() (#1607)

* fix(): Moving the preprocessing of dict before validaiton into a function before constructing ParamsValidationInfo()

* moving things around

* Fix lint

* feat: add selector tokenization support (#1608)

* Added description and `selector_id` (#1610)

* Added description and selector_id

* resolve lintintg

* Fixed linting

* Added description and `selector_id` (#1612)

* Added description and selector_id

* resolve lintintg

* Fixed linting

* Fixed linting

* Added contexted field/model validators (#1613)

* renamed to contextual and also examined stored entities validations

* Added unit test ensuring the entities matched by selectors are removed before upload

* Added warning and empty selector error

* QOL: Removed the logging for unit system internally

* Fixed unit test

* Fixed linting

* fix(): Change tokening with name to with ID instead
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