crim-ca / weaver

Weaver: Workflow Execution Management Service (EMS); Application, Deployment and Execution Service (ADES); OGC API - Processes; WPS; CWL Application Package
https://pavics-weaver.readthedocs.io
Apache License 2.0
24 stars 6 forks source link

Fix `input-location` definition for `PACKAGE_DIRECTORY_TYPE` input #524

Closed francisPLT closed 1 year ago

francisPLT commented 1 year ago

Found out that the location input returned for PACKAGE_DIRECTORY_TYPE is one level too high, so this PR fixes this to return the proper directory.

The locations variable (https://github.com/crim-ca/weaver/blob/c237714e02dec8ed73a69d1a1d322ec435ad13c0/weaver/processes/wps_package.py#L2065) didn't contain the top-level container, only files and folders inside it, so I ended up using this approach, as it covers the possibility that the formatting of the url might change (with or without trailing "/")

francisPLT commented 1 year ago

I'm looking into the failing test today (test_workflow_directory_input_output_chaining). Looks like the created process fails during execution in that test, but haven't dug deep enough to find why and how to fix it.

codecov[bot] commented 1 year ago

Codecov Report

Merging #524 (f2fdb62) into master (7cd57a4) will increase coverage by 0.01%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #524      +/-   ##
==========================================
+ Coverage   84.27%   84.29%   +0.01%     
==========================================
  Files          78       78              
  Lines       16849    16862      +13     
  Branches     2561     2564       +3     
==========================================
+ Hits        14200    14213      +13     
  Misses       1952     1952              
  Partials      697      697              
Impacted Files Coverage Δ
weaver/processes/wps_package.py 83.21% <100.00%> (+0.01%) :arrow_up:
weaver/utils.py 84.33% <100.00%> (+0.13%) :arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.