Page MenuHomeSoftware Heritage

Improve cli documentation
AbandonedPublic

Authored by tenma on Sep 29 2020, 7:55 PM.

Details

Reviewers
None
Group Reviewers
Reviewers
Summary

The docstring was moved out of scanner docstring spot to work around a
bug in our current Python version. See https://bugs.python.org/issue28739

Depends on D4089

Diff Detail

Unit TestsFailed

TimeTest
2 msJenkins > .tox.py3.lib.python3.7.site-packages.swh.scanner.tests.test_cli::test_config_path_envvar_good
cli_runner = <click.testing.CliRunner object at 0x7fe419be2ba8> confpath_good = '/home/jenkins/.config/swh/global.yml' rootpath_good = '/usr/lib/python3/dist-packages/urllib3'
2 msJenkins > .tox.py3.lib.python3.7.site-packages.swh.scanner.tests.test_cli::test_config_path_option_envvar
cli_runner = <click.testing.CliRunner object at 0x7fe419c2a518> confpath_good = '/home/jenkins/.config/swh/global.yml' rootpath_good = '/usr/lib/python3/dist-packages/urllib3'
2 msJenkins > .tox.py3.lib.python3.7.site-packages.swh.scanner.tests.test_cli::test_root_path_good
cli_runner = <click.testing.CliRunner object at 0x7fe419c05b38> rootpath_good = '/usr/lib/python3/dist-packages/urllib3'
1 msJenkins > .tox.py3.lib.python3.7.site-packages.swh.scanner.tests.test_cli::test_config_path_envvar_bad
1 msJenkins > .tox.py3.lib.python3.7.site-packages.swh.scanner.tests.test_cli::test_config_path_option_bad
View Full Test Results (3 Failed · 24 Passed)

Event Timeline

Build has FAILED

Patch application report for D4090 (id=14423)

Could not rebase; Attempt merge onto ad23ee03c0...

Updating ad23ee0..1c8a302
Fast-forward
 swh/scanner/cli.py            | 57 +++++++++++++++++++----------
 swh/scanner/tests/test_cli.py | 83 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 121 insertions(+), 19 deletions(-)
 create mode 100644 swh/scanner/tests/test_cli.py
Changes applied before test
commit 1c8a302129e33704359d721cde805b8a3bbd647c
Author: tenma <tenma+swh@mailbox.org>
Date:   Tue Sep 29 19:47:54 2020 +0200

    Improve cli documentation
    
    The docstring was moved out of scanner docstring spot to work around a
    bug in our current Python version. See https://bugs.python.org/issue28739

commit d4e8857620cf95df324e47046337e7180b0d90f2
Author: tenma <tenma+swh@mailbox.org>
Date:   Tue Sep 29 19:22:24 2020 +0200

    Add tests and fix behavior of scanner cli
    
    - add smoke and unit tests
    - fix behavior of cli in case an invalid config file is specified via
    envvar

Link to build: https://jenkins.softwareheritage.org/job/DTSCN/job/tests-on-diff/54/
See console output for more information: https://jenkins.softwareheritage.org/job/DTSCN/job/tests-on-diff/54/console

vlorentz added inline comments.
swh/scanner/cli.py
40–45

I wonder if we shouldn't move some of this help message to swh-core...

Hm I submitted 2 times this commit, but the last one is D4130.
Sorry I will close this. Config related code will go to core.config, yes, when it will be ready for it.