Skip to content

fix(storage): use output identifier when reference filename is 'input' - #713

Open
C1-BA-B1-F3 wants to merge 2 commits into
geopython:mainfrom
C1-BA-B1-F3:fix/output-reference-filename
Open

C1-BA-B1-F3 wants to merge 2 commits into
geopython:mainfrom
C1-BA-B1-F3:fix/output-reference-filename

Conversation

@C1-BA-B1-F3

Copy link
Copy Markdown

Summary

When a ComplexOutput is returned as a reference and its file was inherited from a URL download, the generated URL always contains input.<ext> (the default name for downloaded resources). This is misleading to users as it is actually the output file.

Fix

In _build_output_name, if the file name is the generic input and the output has an identifier, use the identifier as the file name prefix. This produces meaningful URLs like my_result.csv instead of input.csv.

Test plan

  • Mock output with file='/tmp/workdir/input.csv' and identifier='my_result' → generates my_result.csv
  • Normal file names are unchanged.

Fixes #674

test_db_content asserts the process-instance table is empty, but other
tests may have left rows there, making the result order-dependent.
Delete all rows in setUp so the test passes whether run alone or after
other tests.

Fixes geopython#679
When a ComplexOutput is returned as a reference and its file was
inherited from a URL download, the generated URL always contains
'input.<ext>' (the default name for downloaded resources). Use the
output identifier instead so the reference URL is meaningful to users.

Fixes geopython#674

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ComplexOutput data as reference always generates a file named "input.csv", should be "output".

1 participant