Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
enekomartinmartinez committed Jul 8, 2024
1 parent b363f48 commit 00e329d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
5 changes: 3 additions & 2 deletions pysd/py_backend/external.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion pysd/py_backend/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
9 changes: 6 additions & 3 deletions pysd/translators/structures/abstract_expressions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion tests/pytest_pysd/pytest_serialize_externals.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 00e329d

Please sign in to comment.