Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR addresses issue #4 by fixing the handling of filenames with spaces, ensuring that Tapis URIs are no longer URL‐encoded when constructed. Key changes include:
- Replacing URL encoding (via urllib.parse.quote) with direct construction of Tapis URIs in dapi/jobs.py and dapi/files.py.
- Updating tests and examples to expect unencoded space characters in filenames.
- Adjusting import paths and patch targets in tests and authentication modules.
Reviewed Changes
Copilot reviewed 10 out of 12 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/jobs/test_job_gen_jobinfo.py | Updated import and function calls to use generate_job_request. |
| tests/jobs/test_dir_uri.py | Modified expected URI output to ensure spaces are preserved. |
| tests/files/test_uri_translation.py | Added tests for handling paths with spaces. |
| tests/auth/test_auth.py | Updated patch decorators and import paths for auth functions. |
| examples/mpm/uniaxial_stress/test_benchmark.py | Entire file removal; verify that functionality is covered elsewhere. |
| docs/installation.md & docs/examples/openfoam.md | Documentation updates for new installation branch and clarity. |
| dapi/jobs.py | Removed URL encoding in archive URI and list_outputs, download_output. |
| dapi/files.py | Removed URL encoding when generating file URIs in get_ds_path_uri. |
| README.md | Removed deprecated API docs instructions. |
Comments suppressed due to low confidence (3)
dapi/jobs.py:1010
- Removing URL encoding for the archive URI may lead to issues if downstream consumers or Tapis APIs expect encoded paths for filenames with spaces. Please confirm that all parts of the system properly handle unencoded spaces.
return f"tapis://{details.archiveSystemId}/{archive_path}"
dapi/files.py:317
- There is an inconsistency in encoding strategy: the Tapis URI is constructed without URL encoding, but verification uses an encoded version for the API call. Ensure that this approach does not lead to double encoding or unexpected mismatches in behavior.
encoded_remote_path = urllib.parse.quote(remote_path)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.