Package: hca-util
hca-utilCLI tool for uploading data to the Human Cell Atlas AWS S3 buckets.UsersPrerequisitesUsers need to haveBasic command-line knowledgePython3.x installed on their machineCredentials to access data in the S3 bucket (access and secret keys)InstallThehca-utiltool is available to install from PyPi.$pipinstallhca-utilNote there is a version of this tool published ascovid-utilin PyPi for uploading data to the European COVID-19 data platform. This version uses its own separate data storage and access credentials.UsageDisplay help and list of commands.$hca-util-h
usage:hca-util[-h][--version][--profilePROFILE]{config,create,select,list,upload,download,delete}...

hca-util

optionalarguments:-h,--helpshowthishelpmessageandexit--version,-vshowprogram's version number and exit--profile PROFILE     use PROFILE instead of default 'hca-util'profile

command:{config,create,select,list,upload,download,delete}configconfigureAWScredentialscreatecreateanuploadarea(authorisedusersonly)selectselectorshowtheactiveuploadarealistlistcontentsoftheareauploaduploadfilestotheareadownloaddownloadfilesfromtheareadeletedeletefilesfromtheareaIn the above, optional arguments are between[]and choices between{}.The basic usage is as follows:$hca-utilcmdARG1ARG2-o1-o2Use the tool by specifying a command (cmd- see list below) to run, any mandatory (positional) arguments (e.g.ARG1andARG2- see positional args for each command), and any optional arguments (e.g.-o1ando2- see options for each command).CommandsHelp with specific command:$hca-util<cmd>-hSome commands or options/flags are restricted to authorised users (admin) only.configcommandConfigure AWS credentials$hca-utilconfigACCESS_KEYSECRET_KEY

positionalarguments:ACCESS_KEYAWSAccessKeyIDSECRET_KEYAWSSecretAccessKeyThe tool uses the profile namehca-utilin local AWS config files.Once configured, the set up can be checked by running the command again, this time without credentials (hca-util config), to verify if the previously entered credentials are valid or not.createcommandCreate an upload area(authorised users only)$hca-utilcreateNAME[-p{u,ud,ux,udx}]positionalarguments:NAMEnameforthenewarea

optionalarguments:-p{u,ud,ux,udx}allowedactions(permissions)onnewarea.uforupload,xfordeleteanddfordownload.DefaultisuxselectcommandShow or select the active upload area$hca-utilselectAREA

positionalarguments:AREAareauuid.If AREA is not specified, the selected area is shown.listcommandList contents of selected area$hca-utillist[-b]optionalarguments:-blistallareasinbucket**(authorisedusersonly)**uploadcommandUpload files to the selected area$hca-utiluploadPATH[PATH...][-o]positionalarguments:PATHvalidfileordirectory

optionalarguments:-ooverwritefileswithsamenamesdownloadcommandDownload files from the selected area$hca-utildownload(-a|-ffile[file...])optionalarguments:-adownloadallfilesfromselectedarea-ffile[file...]downloadspecifiedfile(s)onlydeletecommandDelete files from the selected area$hca-utildelete[-a|-d][PATH[PATH...]]positionalarguments:PATHpathtofileordirectorytodelete

optionalarguments:-adeleteallfilesfromthearea-ddeleteuploadareaandcontents(authorisedusersonly)synccommandTransfer files from the selected area to Ingest upload area$hca-utilsyncINGEST_UPLOAD_AREA

positionalarguments:INGEST_UPLOAD_AREAIngestuploadareaINGEST_UPLOAD_AREA format:s3://org-hca-data-archive-upload-_ENV_/_UUID_/DevelopersDownload dependenciespip install -r requirements.txtRunpython3-mait.commons.utilRun testsnosetests