Closed
Description
📝 Description of the feature
Currently we're using:
# In case of CI/CD pipelines
port_in_env = os.environ.get("ANSRV_DPF_SOUND_PORT")
if port_in_env is not None:
return "C:\\data\\" + filename
else:
return local_path
In the file download.py
in _download_file
This is not optimal as we're using an hardcoded path (which only makes sense for the specific case of build pipelines), and an environment variable This download function should not use/depend of the environment variable (which should be used only for build pipelines).
💡 Steps for implementing the feature
- Modify the signature of
_download_file
(and functions that call it) to add an argument which is theserver
: _download_file(filename, directory=None, _test=False, server)` - Use the function
dpf.upload_file
inside_download_file
to upload the file to the server - Return the path returned by
dpf.upload_file
- Make sure all examples are working in setups with and without docker container