AI-SDC / ACRO

Tools for the Automatic Checking of Research Outputs. These are the tools for researchers to use as drop-in replacements for commands that produce outputs in Stata Python and R

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Refactor the record module

rpreen opened this issue · comments

The current implementation of the record.py module works, but is a bit hacky.

  • There should probably be a dedicated filenames: list[str] attribute that holds the serialized filenames and a separate data attribute that points to the object (e.g., DataFrame) especially as we add more output types - instead of what we have at the moment which is an output attribute that points to the object until it's serialized and then points to the filenames. This also creates a bunch of issues when performing static type checking.
  • Serialization is performed in the to_dict() function because to_dict() is used for wrapping the Record into a format for printing as well as serializing when probably to_dict() should be just for dictionary conversion. That is, the Record class probably should implement a print() method.
  • etc.