Add multi-module attribute inspection
mrnosal opened this issue · comments
When writing a module, it can be useful to know what attributes are available from other modules, and to see which modules may set and attribute's value, and which ones may read an attribute's value. An inspector for attributes could give the user a list of attributes available from other modules, and to let them see sample values.
This would be a great feature. The plan was to include this in two of the tabs, but due to time constraints we had to cut back on scope. Though these features should fit right in if someone to implement them.
The 'Attributes List' tab would provide a list of all available attributes, so that a user could search through them to get a hint of what data is available to use.
The 'Related Modules' tab would provide a list of all modules that affect and are affected by the current module, including through the use of attributes. That would help users reason about how the current module affects overall system behavior. The use of attributes as global variables is simple and flexible, but will likely result in unintended (or forgotten) interdependencies as the number of modules increases.
We can generate an attributes.json
file in Synthea now, so it could be something we could push/pull directly from the Synthea master
build.
If you run ./gradlew attributes
it generates the file in the /output
folder.
The file has a list of attributes and which modules and states read and write to those attributes.