Add Steficon formula to Country Workspace#396
Draft
arsen-vs wants to merge 3 commits into
Draft
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
289969: Add engine field to Transformer model and update related functionality
enginefield in theTransformermodel to specify the formula engine (JavaScript or Steficon).TransformerAdminandCountryTransformerAdminto include theenginefield in the admin interface.cleanmethod of theTransformermodel.SteficonExecutorclass to handle the execution of Steficon-style formulas.