~savoy/ade

371488110e77778ffe41c4b54ca4218b1abed6de — savoy 2 years ago f3998ec
bug: raw data wasn't being included when specified

For reports that don't rely on compile methods, the ordering for the
DataStructure wasn't correct and the raw data wasn't being included in
the final data. Raw data wasn't also an option for reports with compile
methods.

Signed-off-by: savoy <git@liberation.red>
1 files changed, 19 insertions(+), 10 deletions(-)

M ade/lib/remote.py
M ade/lib/remote.py => ade/lib/remote.py +19 -10
@@ 2049,21 2049,30 @@ class Compile:
                self.data = getattr(self, self.report.parent.key)(
                    **self.output.report.compilate.args
                )
            if include_data:
                self.data["df"] = DataStructure(
                    SheetStructure("df", "A1"),
                    self.output.df,
                    self.output,
                    None,
                )
        except AttributeError:
            if include_data or not self.report.pivot:
                self.data = {
                    "df": DataStructure(
                        SheetStructure("Sheet1", "A1"),
                        self.output.df,
                        self.output,
                        None,
                    )
                }

            if self.report.pivot:
                self.data = {}
                getattr(self, "adhoc_pivot")()

            if include_data or not self.report.pivot:
                structure = DataStructure(
                    SheetStructure("df", "A1"),
                    self.output.df,
                    self.output,
                    None,
                )
                try:
                    self.data["df"] = structure
                except NameError:
                    self.data = {"df": structure}

    def _metadata(self) -> dict[str, Union[str, dict[str, Any]]]:
        """Prepares the metadata of the class to easily insert into the spreadsheet output."""
        metadata = {