help info for parameters appears in cli for upload and download#146
help info for parameters appears in cli for upload and download#146
Conversation
Codecov Report
@@ Coverage Diff @@
## master #146 +/- ##
==========================================
+ Coverage 86.75% 87.37% +0.61%
==========================================
Files 33 33
Lines 1208 1291 +83
==========================================
+ Hits 1048 1128 +80
- Misses 160 163 +3
Continue to review full report at Codecov.
|
6a04d6f to
9a1eb4c
Compare
hannes-ucsc
left a comment
There was a problem hiding this comment.
@Bento007 and I talked in person and agreed on some changes. Rejecting this purely for procedural reasons so I get notified for the next round of reviews.
* added cli.rst to generate cli documentation. * added epilog to all sphinx generated pages.
6b69d6b to
8bb7827
Compare
8bb7827 to
2b33caa
Compare
|
|
||
| @staticmethod | ||
| def parse_docstring(docstring): | ||
| """ |
There was a problem hiding this comment.
If you use triple single quotes here (despite that being a PEP8 violation), …
| arguments. Any other text is combined and added to the argparse description. | ||
|
|
||
| example: | ||
| \"\"\" |
There was a problem hiding this comment.
maybe you can use triple double quotes here. Would look less odd.
| * :ref:`search` | ||
| readme | ||
| cli | ||
| api |
There was a problem hiding this comment.
This makes the index page only contain a table of contents. Please change this so that the introduction still appears on the index page.
There was a problem hiding this comment.
added readme.rst to index.rst
| manifest is not set. If and only if a data file matches any of the patterns in `data_files` will it be | ||
| downloaded. | ||
| :param str bundle_uuid: The uuid of the bundle to download | ||
| :param str replica: the replica to download from. [aws,gcp,azure] |
There was a problem hiding this comment.
Please remove "azure" and spell out the possible values.
There was a problem hiding this comment.
removed azure and specified what the replicas mean.
| downloaded. | ||
| :param str bundle_uuid: The uuid of the bundle to download | ||
| :param str replica: the replica to download from. [aws,gcp,azure] | ||
| :param str version: Timestamp of bundle creation in RFC3339. The version to download, else download the latest. |
| Each row in the manifest represents one file in DSS. The manifest must have a header row. The header row must | ||
| declare the following columns: | ||
| :param str manifest: path to a TSV (tab-separated values) file listing files to download | ||
| :param str replica: the replica to download from. [aws,gcp,azure] |
| declare the following columns: | ||
| :param str manifest: path to a TSV (tab-separated values) file listing files to download | ||
| :param str replica: the replica to download from. [aws,gcp,azure] | ||
| :param int initial_retries_left: The initial number of times to retries a failed download. |
There was a problem hiding this comment.
s/retries/retry
Also, what does "initial" mean here? It should really be "num_retries" or something else more intuitive.
There was a problem hiding this comment.
added additional details to initial_retries_left
| Upload a directory of files from the local filesystem and create a bundle containing the uploaded files. | ||
|
|
||
| :param str src_dir: file path to a directory of file to upload | ||
| :param str replica: the replica to upload to. [aws,gcp,azure] |
| :param str src_dir: file path to a directory of file to upload | ||
| :param str replica: the replica to upload to. [aws,gcp,azure] | ||
| :param str staging_bucket: the bucket to upload from. | ||
| :param int timeout_seconds: timeout. |
There was a problem hiding this comment.
added more details.
|
|
||
| :param str src_dir: file path to a directory of file to upload | ||
| :param str replica: the replica to upload to. [aws,gcp,azure] | ||
| :param str staging_bucket: the bucket to upload from. |
There was a problem hiding this comment.
added more details.
| backports.tempfile | ||
| mock | ||
| unittest2 | ||
| sphinx-argparse |
There was a problem hiding this comment.
requirements-dev is for test/development-only requirements, but you are importing these packages in the main codebase. So you have to put this in requirements.txt, not requirements-dev.
Also, when I installed this, it didn't seem to automatically pull in sphinx, and I got an error:
>make docs
/Library/Developer/CommandLineTools/usr/bin/make -C docs html
Running Sphinx v1.5.5
Exception occurred:
File "/Users/akislyuk/projects/dcp-cli/hca/util/__init__.py", line 100, in <module>
from sphinx.parsers import RSTParser
ImportError: cannot import name RSTParser
I ran pip install sphinx and the error went away. Can you check if sphinx-argparse pulls in sphinx? If not, you have to list it here.
There was a problem hiding this comment.
added docutils to requirements.txt, added sphinx and sphinx-argparser to requirement-dev.txt
| **self._get_command_arg_settings(param_data)) | ||
|
|
||
| @staticmethod | ||
| def parse_docstring(docstring): |
There was a problem hiding this comment.
To make package organization more consistent and uncrowd this file, please detach this method and move it to hca/util/_docs.py.
There was a problem hiding this comment.
moved to hca/util/_docs.py
* moved docstrings for API to __init__ files. * deleted readme.rst * README.rst appears above table of contents in index.rst page. * removed unused imports from docs/conf.py * changed sphinx project name from 'hca-cli' to 'HCA CLI' * change epilog format to look less confusing.
7b28fe7 to
6fb77e2
Compare
| set. If and only if a metadata file matches any of the patterns in `metadata_files` will it be downloaded. | ||
| :param list data_files: one or more shell patterns against which all data files in the bundle will be matched | ||
| case-sensitively. A file is considered a data file if the `indexed` property in the manifest is not set. If | ||
| and only if a data file matches any of the patterns in `data_files` will it be downloaded. |
There was a problem hiding this comment.
Style: "The file will be downloaded only if ..."
| :param list data_files: one or more shell patterns against which all data files in the bundle will be matched | ||
| case-sensitively. A file is considered a data file if the `indexed` property in the manifest is not set. If | ||
| and only if a data file matches any of the patterns in `data_files` will it be downloaded. | ||
| :param int initial_retries_left: The initial quota of download failures to accept before exiting due to |
There was a problem hiding this comment.
This parameter should be renamed to something like num_retries. "Initial" and "left" are implementation details.
"The number of times to attempt the download before exiting with an error"
Release Notes
Known Issue
classmethod.