xcube-dev / xcube-dev/xcengine
Copy run-time auxiliary files to working directory
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 4
- Forks
- 0
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 8
Description
The recently-introduced include_directory option allows all the files in the input notebook's directory to be copied into the container image in the directory of the generated script. In typical notebook code, such auxiliary files are expected to be found in the CWD. When the image is run as an EOAP by cwltool, a new working directory is created and used, so code like t = Path("myauxfile.txt").read_text() won't work. current workaround (documented here) is to check if __file__ is set and if so, resolve paths relative to it. It would be more user-friendly for the xcengine run-time wrapper code to automatically ensure that the auxiliary files are in the CWD, no matter where it is. It should be enough to check whether the CWD is the default, and if not, to move the auxiliary files to the new CWD.
Implementation will be easier after the implementation of #97 -- then /home/mambauser/workdir/ should contain only run-time auxiliary files, making the copying more straightforward.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the runtime wrapper and the implementation planned in issue #97, since the proposed layout depends on that change. Reproduce an EOAP run with cwltool and an auxiliary file such as myauxfile.txt; done means the auxiliary files are available from the generated working directory without requiring file-relative paths.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100