Skip to content

Commit

Permalink
Fixed conversion issue
Browse files Browse the repository at this point in the history
  • Loading branch information
antonio-olleros committed Jun 29, 2024
1 parent b75ed83 commit 5d576e6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions development.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ def compare_with_baseline():

if __name__ == "__main__":
INPUT_PATH_3_3 = Path(__file__).parent / "xbridge"/ "Testing" / "test_files" / "sample_3_3"
INSTANCE_PATH = Path.cwd() / "input" / "instances" / "scrambled_alm.xbrl"
INSTANCE_PATH = INPUT_PATH_3_3 / "test1_in.xbrl"
INSTANCE_PATH = Path.cwd() / "input" / "instances" / "corep_of1.xbrl"
# INSTANCE_PATH = INPUT_PATH_3_3 / "test1_in.xbrl"

start = time()
converter = Converter(INSTANCE_PATH)
Expand Down
2 changes: 1 addition & 1 deletion xbridge/converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def _convert_tables(self, temp_dir_path, mapping_dict):
for open_key in table.open_keys:
dim_name = mapping_dict.get(open_key)
#For open keys, there are no dim_names (they are not mapped)
if dim_name:
if dim_name and not datapoints.empty:
datapoints[open_key] = dim_name + ":" + datapoints[open_key].astype(str)
datapoints = datapoints.sort_values(by=["datapoint"], ascending=True)
output_path_table = temp_dir_path / table.url
Expand Down

0 comments on commit 5d576e6

Please sign in to comment.