Skip to content

Add Steficon formula to Country Workspace#396

Draft
arsen-vs wants to merge 3 commits into
developfrom
feature/289969-Steficon-formula-V2
Draft

Add Steficon formula to Country Workspace#396
arsen-vs wants to merge 3 commits into
developfrom
feature/289969-Steficon-formula-V2

Conversation

@arsen-vs
Copy link
Copy Markdown
Contributor

289969: Add engine field to Transformer model and update related functionality

  • Introduced a new engine field in the Transformer model to specify the formula engine (JavaScript or Steficon).
  • Updated the TransformerAdmin and CountryTransformerAdmin to include the engine field in the admin interface.
  • Implemented validation for Steficon formulas in the clean method of the Transformer model.
  • Created a new SteficonExecutor class to handle the execution of Steficon-style formulas.
  • Added unit tests for the new functionality, ensuring correct behavior for both JavaScript and Steficon engines.

Arsen P added 3 commits May 28, 2026 12:29
- Introduced a new form, `RunTransformerForm`, to allow users to select a batch and specify the record type for formula application.
- Implemented a new admin action, `run_on_existing_records`, to handle the execution of formulas directly in the Country Workspace.
- Created a corresponding HTML template for the form, enhancing the user interface for running formulas without rule commits.
- Added permission checks to ensure users can only run formulas on batches they are authorized to process.
…ctionality

- Introduced tests for the `RunTransformerForm` to validate choices based on program type.
- Added tests for the `run_on_existing_records` method in the `CountryTransformerAdmin`, covering scenarios for rendering the form, handling permissions, and processing valid and invalid submissions.
- Utilized mocking to simulate requests and responses, ensuring isolated and reliable test outcomes.
…tionality

- Introduced a new `engine` field in the `Transformer` model to specify the formula engine (JavaScript or Steficon).
- Updated the `TransformerAdmin` and `CountryTransformerAdmin` to include the `engine` field in the admin interface.
- Implemented validation for Steficon formulas in the `clean` method of the `Transformer` model.
- Created a new `SteficonExecutor` class to handle the execution of Steficon-style formulas.
- Added unit tests for the new functionality, ensuring correct behavior for both JavaScript and Steficon engines.
@arsen-vs arsen-vs requested review from a team and saxix as code owners May 28, 2026 09:47
@arsen-vs arsen-vs marked this pull request as draft May 28, 2026 09:47
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.

1 participant