Story #5621

[Documentation] Improve SDK documentation

Added by Radhika Chippada almost 4 years ago. Updated almost 4 years ago.

Status:
New
Priority:
Normal
Assigned To:
-
Category:
-
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Story points:
-

Description

Today on IRC, sguthrie asked "how can I get the full path of a file in an arvados collection?" and Brett answered (in IRC) as follows:
11:38 The TASK_KEEPMOUNT environment variable tells you where the mount is. So fundamentally you just have to do `os.path.join(os.environ['TASK_KEEPMOUNT'], collection_hash, file_path)`
So say you have a job that takes a reference, and then you create tasks to compare specific files against it.
11:38 You can get the path of the reference with get_job_param_mount, and the path of the specific file with get_task_param_mount.
11:38 Both results will start with the path in TASK_KEEPMOUNT, but they look at parameters in different places to generate the rest of the path.
11:38 Does that make sense?

I think it would be quite helpful if we capture some of these helpful tips and hints in some form of documentation.

History

#1 Updated by Radhika Chippada almost 4 years ago

  • Description updated (diff)

Also available in: Atom PDF