diff --git a/pysd/py_backend/external.py b/pysd/py_backend/external.py index bd64bdcb..f4104b1f 100644 --- a/pysd/py_backend/external.py +++ b/pysd/py_backend/external.py @@ -94,8 +94,9 @@ class External(object): fail, but it may be used to check the quality of the data. file: str File name from which the data is read. - sheet: str - Sheet name from which the data is read. + tab: str + Tab name from which the data is read. If file type is not a + spreadsheet this will be used as a separator. """ missing = "warning" diff --git a/pysd/py_backend/model.py b/pysd/py_backend/model.py index 2db13ad7..5d97eb1c 100644 --- a/pysd/py_backend/model.py +++ b/pysd/py_backend/model.py @@ -753,7 +753,7 @@ def __include_for_serialization(self, ext, py_name_clean, data, metadata, for col in self._doc.columns } var_meta["files"] = ";".join(ext.files) - var_meta["sheets"] = ";".join(ext.sheets) + var_meta["tabs"] = ";".join(ext.tabs) var_meta["cells"] = ";".join(ext.cells) # TODO: add also time_row_or_cols diff --git a/pysd/translators/structures/abstract_expressions.py b/pysd/translators/structures/abstract_expressions.py index 07e02dec..5af36388 100644 --- a/pysd/translators/structures/abstract_expressions.py +++ b/pysd/translators/structures/abstract_expressions.py @@ -558,7 +558,8 @@ class GetLookupsStructure(AbstractSyntax): file: str The file path where the data is. tab: str - The sheetname where the data is. + Tab name from which the data is read. If file type is not a + spreadsheet this will be used as a separator. x_row_or_col: str The pointer to the cell or cellrange name that defines the interpolation series data. @@ -587,7 +588,8 @@ class GetDataStructure(AbstractSyntax): file: str The file path where the data is. tab: str - The sheetname where the data is. + Tab name from which the data is read. If file type is not a + spreadsheet this will be used as a separator. time_row_or_col: str The pointer to the cell or cellrange name that defines the interpolation time series data. @@ -616,7 +618,8 @@ class GetConstantsStructure(AbstractSyntax): file: str The file path where the data is. tab: str - The sheetname where the data is. + Tab name from which the data is read. If file type is not a + spreadsheet this will be used as a separator. cell: str The pointer to the cell or the cellrange name that defines the data. diff --git a/tests/pytest_pysd/pytest_serialize_externals.py b/tests/pytest_pysd/pytest_serialize_externals.py index 33f45d77..639ae6aa 100644 --- a/tests/pytest_pysd/pytest_serialize_externals.py +++ b/tests/pytest_pysd/pytest_serialize_externals.py @@ -50,7 +50,7 @@ def test_serialize_externals_file_content(self, tmp_path, model): assert "description" in ds.attrs.keys() assert all(map( lambda x: x in ds.data_vars["_ext_data_data_forward"].attrs.keys(), - ["Py Name", "sheets", "files"])) + ["Py Name", "tabs", "files"])) @pytest.mark.parametrize( "model_path,include,exclude",