https://github.com/emjun/tisanecodegenerator
Code generator for Tisane (https://github.com/emjun/tisane)
https://github.com/emjun/tisanecodegenerator
Last synced: 10 months ago
JSON representation
Code generator for Tisane (https://github.com/emjun/tisane)
- Host: GitHub
- URL: https://github.com/emjun/tisanecodegenerator
- Owner: emjun
- Created: 2022-10-13T23:42:42.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-12-01T23:39:56.000Z (over 3 years ago)
- Last Synced: 2025-02-16T14:07:45.867Z (over 1 year ago)
- Language: Python
- Homepage:
- Size: 62.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Use case
Designed as a modular code generator for [Tisane](https://github.com/emjun/rTisane).
# Files
In `tisanecodegenerator`:
`codeGenerator.py`: CodeGenerator class that is responsible for generating code, A CodeGenerator has-a Statistical Model for which it generates code
`strings.json`: Code templates to populate
`codeGeneratorStrings.py`: Helper class for loading strings
`StatisticalModel.py`: Class for representing a statistical model, contains getter/setter methods
In `tests/`:
`input_json`: JSON files that Tisane generates, used to generate Statistical Models and generate code
`generated_scripts`: R scripts that CodeGenerator generates for a statistical model
`keys_scripts`: R scripts used for testing --> may no longer be needed
# Notes on testing
The current set of tests that the code generated is expected and that the produced file is able to run. Direct comparison between a generated script and a master script is no longer implemented due to possible differences in whitespace, etc. that may arise over time but have no bearing on the functionality of the produced scripts. Ideally, ASTs would be compared.
# TODO:
[ ] Compare ASTs of generated scripts to master scripts