cernopendata / cernopendata-client

CERN Open Data command-line client
http://cernopendata-client.readthedocs.io/
GNU General Public License v3.0
10 stars 9 forks source link

docs: better docstrings #53

Closed tiborsimko closed 3 years ago

tiborsimko commented 4 years ago

(1) Introduce pydocstyle into run-tests.sh following e.g. reana-client example.

(2) Fix existing warnings in master branch:

$ pydocstyle .
./docs/conf.py:1 at module level:
        D100: Missing docstring in public module
./cernopendata_client/search.py:1 at module level:
        D100: Missing docstring in public module
./cernopendata_client/cli.py:40 in public function `cernopendata_client`:
        D103: Missing docstring in public function
./cernopendata_client/cli.py:68 in public function `get_metadata`:
        D301: Use r""" if any backslashes in a docstring
./cernopendata_client/cli.py:123 in public function `get_file_locations`:
        D301: Use r""" if any backslashes in a docstring
./cernopendata_client/cli.py:180 in public function `download_files`:
        D202: No blank lines allowed after function docstring (found 1)
./cernopendata_client/cli.py:180 in public function `download_files`:
        D301: Use r""" if any backslashes in a docstring
./cernopendata_client/downloader.py:1 at module level:
        D100: Missing docstring in public module
./cernopendata_client/downloader.py:15 in public function `show_download_progress`:
        D400: First line should end with a period (not 'e')
./cernopendata_client/downloader.py:28 in public function `download_single_file`:
        D400: First line should end with a period (not 'e')
./cernopendata_client/downloader.py:49 in public function `get_download_files_by_name`:
        D400: First line should end with a period (not 'e')
./cernopendata_client/downloader.py:49 in public function `get_download_files_by_name`:
        D401: First line should be in imperative mood (perhaps 'Return', not 'Returns')
./cernopendata_client/downloader.py:57 in public function `get_download_files_by_regexp`:
        D205: 1 blank line required between summary line and description (found 0)
./cernopendata_client/downloader.py:57 in public function `get_download_files_by_regexp`:
        D400: First line should end with a period (not ')')
./cernopendata_client/downloader.py:57 in public function `get_download_files_by_regexp`:
        D403: First word of the first line should be properly capitalized ('Dload', not 'dload')
./cernopendata_client/downloader.py:72 in public function `get_download_files_by_range`:
        D205: 1 blank line required between summary line and description (found 0)
./cernopendata_client/downloader.py:72 in public function `get_download_files_by_range`:
        D400: First line should end with a period (not ')')
./cernopendata_client/downloader.py:72 in public function `get_download_files_by_range`:
        D403: First word of the first line should be properly capitalized ('Dload', not 'dload')
./cernopendata_client/validator.py:1 at module level:
        D100: Missing docstring in public module
./cernopendata_client/version.py:9 at module level:
        D205: 1 blank line required between summary line and description (found 0)
tiborsimko commented 4 years ago

Can be done in later 0.1.x updates.