summaryrefslogtreecommitdiff
path: root/python-hca-util.spec
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-05-18 06:02:58 +0000
committerCoprDistGit <infra@openeuler.org>2023-05-18 06:02:58 +0000
commit29b60c9e00174bb5db1b2f129a7f3337eb3a19fe (patch)
tree4c38c45c3ad772deca98e4d583bb328fda95a88b /python-hca-util.spec
parenta8a1cb620b6315211f6de3973920321ea24d98ed (diff)
automatic import of python-hca-util
Diffstat (limited to 'python-hca-util.spec')
-rw-r--r--python-hca-util.spec671
1 files changed, 671 insertions, 0 deletions
diff --git a/python-hca-util.spec b/python-hca-util.spec
new file mode 100644
index 0000000..15c0d86
--- /dev/null
+++ b/python-hca-util.spec
@@ -0,0 +1,671 @@
+%global _empty_manifest_terminate_build 0
+Name: python-hca-util
+Version: 0.2.16
+Release: 1
+Summary: CLI tool for uploading data to the HCA data platform
+License: Apache License
+URL: https://github.com/ebi-ait/hca-util
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/d2/d9/d6761138a424572b78d0401e197ee74dd9fda735619e1db6d96c460ed172/hca-util-0.2.16.tar.gz
+BuildArch: noarch
+
+Requires: python3-boto3
+Requires: python3-botocore
+Requires: python3-filetype
+Requires: python3-requests
+Requires: python3-tqdm
+
+%description
+# hca-util
+
+CLI tool for uploading data to the Human Cell Atlas AWS S3 buckets.
+
+# Users
+
+## Prerequisites
+Users need to have
+1. Basic command-line knowledge
+2. Python3.x installed on their machine
+3. Credentials to access data in the S3 bucket (access and secret keys)
+
+## Install
+The [hca-util](https://pypi.org/project/hca-util/) tool is available to install from PyPi.
+
+```shell script
+$ pip install hca-util
+```
+
+Note there is a version of this tool published as [covid-util](https://pypi.org/project/covid-util/) in PyPi for uploading data to the European COVID-19 data platform. This version uses its own separate data storage and access credentials.
+
+## Usage
+
+Display help and list of commands.
+
+```shell script
+$ hca-util -h
+usage: hca-util [-h] [--version] [--profile PROFILE] {config,create,select,list,upload,download,delete} ...
+
+hca-util
+
+optional arguments:
+ -h, --help show this help message and exit
+ --version, -v show program's version number and exit
+ --profile PROFILE use PROFILE instead of default 'hca-util' profile
+
+command:
+ {config,create,select,list,upload,download,delete}
+ config configure AWS credentials
+ create create an upload area (authorised users only)
+ select select or show the active upload area
+ list list contents of the area
+ upload upload files to the area
+ download download files from the area
+ delete delete files from the area
+```
+
+In the above, optional arguments are between `[]` and choices between `{}`.
+
+The basic usage is as follows:
+
+```shell script
+$ hca-util cmd ARG1 ARG2 -o1 -o2
+```
+
+Use the tool by specifying a command (`cmd` - see list below) to run, any mandatory (positional) arguments (e.g. `ARG1` and `ARG2` - see positional args for each command), and any optional arguments (e.g. `-o1` and `o2` - see options for each command).
+
+## Commands
+
+Help with specific command:
+
+```shell script
+$ hca-util <cmd> -h
+```
+
+Some commands or options/flags are restricted to authorised users (admin) only.
+
+## `config` command
+
+Configure AWS credentials
+
+```shell script
+$ hca-util config ACCESS_KEY SECRET_KEY
+
+positional arguments:
+ ACCESS_KEY AWS Access Key ID
+ SECRET_KEY AWS Secret Access Key
+```
+
+The tool uses the profile name _hca-util_ in 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.
+
+## `create` command
+
+Create an upload area **(authorised users only)**
+
+```shell script
+$ hca-util create NAME [-p {u,ud,ux,udx}]
+
+
+positional arguments:
+ NAME name for the new area
+
+optional arguments:
+ -p {u,ud,ux,udx} allowed actions (permissions) on new area. u for
+ upload, x for delete and d for download. Default is ux
+```
+
+## `select` command
+
+Show or select the active upload area
+
+```shell script
+$ hca-util select AREA
+
+positional arguments:
+ AREA area uuid.
+```
+
+If AREA is not specified, the selected area is shown.
+
+## `list` command
+
+List contents of selected area
+
+```shell script
+$ hca-util list [-b]
+
+optional arguments:
+ -b list all areas in bucket **(authorised users only)**
+```
+
+## `upload` command
+
+Upload files to the selected area
+
+```shell script
+$ hca-util upload PATH [PATH ...] [-o]
+
+positional arguments:
+ PATH valid file or directory
+
+optional arguments:
+ -o overwrite files with same names
+```
+
+
+## `download` command
+
+Download files from the selected area
+
+```shell script
+$ hca-util download (-a | -f file [file ...])
+
+optional arguments:
+ -a download all files from selected area
+ -f file [file ...] download specified file(s) only
+```
+
+## `delete` command
+
+Delete files from the selected area
+
+```shell script
+$ hca-util delete [-a | -d] [PATH [PATH ...]]
+
+positional arguments:
+ PATH path to file or directory to delete
+
+optional arguments:
+ -a delete all files from the area
+ -d delete upload area and contents (authorised users only)
+```
+
+## `sync` command
+
+Transfer files from the selected area to Ingest upload area
+
+```shell script
+$ hca-util sync INGEST_UPLOAD_AREA
+
+positional arguments:
+ INGEST_UPLOAD_AREA Ingest upload area
+```
+
+INGEST_UPLOAD_AREA format: `s3://org-hca-data-archive-upload-_ENV_/_UUID_/`
+
+
+# Developers
+Download dependencies
+```
+pip install -r requirements.txt
+```
+
+Run
+
+```shell script
+python3 -m ait.commons.util
+```
+
+Run tests
+
+```shell script
+nosetests
+```
+
+
+
+
+%package -n python3-hca-util
+Summary: CLI tool for uploading data to the HCA data platform
+Provides: python-hca-util
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-hca-util
+# hca-util
+
+CLI tool for uploading data to the Human Cell Atlas AWS S3 buckets.
+
+# Users
+
+## Prerequisites
+Users need to have
+1. Basic command-line knowledge
+2. Python3.x installed on their machine
+3. Credentials to access data in the S3 bucket (access and secret keys)
+
+## Install
+The [hca-util](https://pypi.org/project/hca-util/) tool is available to install from PyPi.
+
+```shell script
+$ pip install hca-util
+```
+
+Note there is a version of this tool published as [covid-util](https://pypi.org/project/covid-util/) in PyPi for uploading data to the European COVID-19 data platform. This version uses its own separate data storage and access credentials.
+
+## Usage
+
+Display help and list of commands.
+
+```shell script
+$ hca-util -h
+usage: hca-util [-h] [--version] [--profile PROFILE] {config,create,select,list,upload,download,delete} ...
+
+hca-util
+
+optional arguments:
+ -h, --help show this help message and exit
+ --version, -v show program's version number and exit
+ --profile PROFILE use PROFILE instead of default 'hca-util' profile
+
+command:
+ {config,create,select,list,upload,download,delete}
+ config configure AWS credentials
+ create create an upload area (authorised users only)
+ select select or show the active upload area
+ list list contents of the area
+ upload upload files to the area
+ download download files from the area
+ delete delete files from the area
+```
+
+In the above, optional arguments are between `[]` and choices between `{}`.
+
+The basic usage is as follows:
+
+```shell script
+$ hca-util cmd ARG1 ARG2 -o1 -o2
+```
+
+Use the tool by specifying a command (`cmd` - see list below) to run, any mandatory (positional) arguments (e.g. `ARG1` and `ARG2` - see positional args for each command), and any optional arguments (e.g. `-o1` and `o2` - see options for each command).
+
+## Commands
+
+Help with specific command:
+
+```shell script
+$ hca-util <cmd> -h
+```
+
+Some commands or options/flags are restricted to authorised users (admin) only.
+
+## `config` command
+
+Configure AWS credentials
+
+```shell script
+$ hca-util config ACCESS_KEY SECRET_KEY
+
+positional arguments:
+ ACCESS_KEY AWS Access Key ID
+ SECRET_KEY AWS Secret Access Key
+```
+
+The tool uses the profile name _hca-util_ in 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.
+
+## `create` command
+
+Create an upload area **(authorised users only)**
+
+```shell script
+$ hca-util create NAME [-p {u,ud,ux,udx}]
+
+
+positional arguments:
+ NAME name for the new area
+
+optional arguments:
+ -p {u,ud,ux,udx} allowed actions (permissions) on new area. u for
+ upload, x for delete and d for download. Default is ux
+```
+
+## `select` command
+
+Show or select the active upload area
+
+```shell script
+$ hca-util select AREA
+
+positional arguments:
+ AREA area uuid.
+```
+
+If AREA is not specified, the selected area is shown.
+
+## `list` command
+
+List contents of selected area
+
+```shell script
+$ hca-util list [-b]
+
+optional arguments:
+ -b list all areas in bucket **(authorised users only)**
+```
+
+## `upload` command
+
+Upload files to the selected area
+
+```shell script
+$ hca-util upload PATH [PATH ...] [-o]
+
+positional arguments:
+ PATH valid file or directory
+
+optional arguments:
+ -o overwrite files with same names
+```
+
+
+## `download` command
+
+Download files from the selected area
+
+```shell script
+$ hca-util download (-a | -f file [file ...])
+
+optional arguments:
+ -a download all files from selected area
+ -f file [file ...] download specified file(s) only
+```
+
+## `delete` command
+
+Delete files from the selected area
+
+```shell script
+$ hca-util delete [-a | -d] [PATH [PATH ...]]
+
+positional arguments:
+ PATH path to file or directory to delete
+
+optional arguments:
+ -a delete all files from the area
+ -d delete upload area and contents (authorised users only)
+```
+
+## `sync` command
+
+Transfer files from the selected area to Ingest upload area
+
+```shell script
+$ hca-util sync INGEST_UPLOAD_AREA
+
+positional arguments:
+ INGEST_UPLOAD_AREA Ingest upload area
+```
+
+INGEST_UPLOAD_AREA format: `s3://org-hca-data-archive-upload-_ENV_/_UUID_/`
+
+
+# Developers
+Download dependencies
+```
+pip install -r requirements.txt
+```
+
+Run
+
+```shell script
+python3 -m ait.commons.util
+```
+
+Run tests
+
+```shell script
+nosetests
+```
+
+
+
+
+%package help
+Summary: Development documents and examples for hca-util
+Provides: python3-hca-util-doc
+%description help
+# hca-util
+
+CLI tool for uploading data to the Human Cell Atlas AWS S3 buckets.
+
+# Users
+
+## Prerequisites
+Users need to have
+1. Basic command-line knowledge
+2. Python3.x installed on their machine
+3. Credentials to access data in the S3 bucket (access and secret keys)
+
+## Install
+The [hca-util](https://pypi.org/project/hca-util/) tool is available to install from PyPi.
+
+```shell script
+$ pip install hca-util
+```
+
+Note there is a version of this tool published as [covid-util](https://pypi.org/project/covid-util/) in PyPi for uploading data to the European COVID-19 data platform. This version uses its own separate data storage and access credentials.
+
+## Usage
+
+Display help and list of commands.
+
+```shell script
+$ hca-util -h
+usage: hca-util [-h] [--version] [--profile PROFILE] {config,create,select,list,upload,download,delete} ...
+
+hca-util
+
+optional arguments:
+ -h, --help show this help message and exit
+ --version, -v show program's version number and exit
+ --profile PROFILE use PROFILE instead of default 'hca-util' profile
+
+command:
+ {config,create,select,list,upload,download,delete}
+ config configure AWS credentials
+ create create an upload area (authorised users only)
+ select select or show the active upload area
+ list list contents of the area
+ upload upload files to the area
+ download download files from the area
+ delete delete files from the area
+```
+
+In the above, optional arguments are between `[]` and choices between `{}`.
+
+The basic usage is as follows:
+
+```shell script
+$ hca-util cmd ARG1 ARG2 -o1 -o2
+```
+
+Use the tool by specifying a command (`cmd` - see list below) to run, any mandatory (positional) arguments (e.g. `ARG1` and `ARG2` - see positional args for each command), and any optional arguments (e.g. `-o1` and `o2` - see options for each command).
+
+## Commands
+
+Help with specific command:
+
+```shell script
+$ hca-util <cmd> -h
+```
+
+Some commands or options/flags are restricted to authorised users (admin) only.
+
+## `config` command
+
+Configure AWS credentials
+
+```shell script
+$ hca-util config ACCESS_KEY SECRET_KEY
+
+positional arguments:
+ ACCESS_KEY AWS Access Key ID
+ SECRET_KEY AWS Secret Access Key
+```
+
+The tool uses the profile name _hca-util_ in 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.
+
+## `create` command
+
+Create an upload area **(authorised users only)**
+
+```shell script
+$ hca-util create NAME [-p {u,ud,ux,udx}]
+
+
+positional arguments:
+ NAME name for the new area
+
+optional arguments:
+ -p {u,ud,ux,udx} allowed actions (permissions) on new area. u for
+ upload, x for delete and d for download. Default is ux
+```
+
+## `select` command
+
+Show or select the active upload area
+
+```shell script
+$ hca-util select AREA
+
+positional arguments:
+ AREA area uuid.
+```
+
+If AREA is not specified, the selected area is shown.
+
+## `list` command
+
+List contents of selected area
+
+```shell script
+$ hca-util list [-b]
+
+optional arguments:
+ -b list all areas in bucket **(authorised users only)**
+```
+
+## `upload` command
+
+Upload files to the selected area
+
+```shell script
+$ hca-util upload PATH [PATH ...] [-o]
+
+positional arguments:
+ PATH valid file or directory
+
+optional arguments:
+ -o overwrite files with same names
+```
+
+
+## `download` command
+
+Download files from the selected area
+
+```shell script
+$ hca-util download (-a | -f file [file ...])
+
+optional arguments:
+ -a download all files from selected area
+ -f file [file ...] download specified file(s) only
+```
+
+## `delete` command
+
+Delete files from the selected area
+
+```shell script
+$ hca-util delete [-a | -d] [PATH [PATH ...]]
+
+positional arguments:
+ PATH path to file or directory to delete
+
+optional arguments:
+ -a delete all files from the area
+ -d delete upload area and contents (authorised users only)
+```
+
+## `sync` command
+
+Transfer files from the selected area to Ingest upload area
+
+```shell script
+$ hca-util sync INGEST_UPLOAD_AREA
+
+positional arguments:
+ INGEST_UPLOAD_AREA Ingest upload area
+```
+
+INGEST_UPLOAD_AREA format: `s3://org-hca-data-archive-upload-_ENV_/_UUID_/`
+
+
+# Developers
+Download dependencies
+```
+pip install -r requirements.txt
+```
+
+Run
+
+```shell script
+python3 -m ait.commons.util
+```
+
+Run tests
+
+```shell script
+nosetests
+```
+
+
+
+
+%prep
+%autosetup -n hca-util-0.2.16
+
+%build
+%py3_build
+
+%install
+%py3_install
+install -d -m755 %{buildroot}/%{_pkgdocdir}
+if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
+if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
+if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
+if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
+pushd %{buildroot}
+if [ -d usr/lib ]; then
+ find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/lib64 ]; then
+ find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/bin ]; then
+ find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/sbin ]; then
+ find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+touch doclist.lst
+if [ -d usr/share/man ]; then
+ find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
+fi
+popd
+mv %{buildroot}/filelist.lst .
+mv %{buildroot}/doclist.lst .
+
+%files -n python3-hca-util -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Thu May 18 2023 Python_Bot <Python_Bot@openeuler.org> - 0.2.16-1
+- Package Spec generated