moved non-cli code including imports out of cli module to scanner module
Depends on D3900
Differential D3931
refactor non-cli code out of cli in swh-scanner Authored by tenma on Sep 11 2020, 5:33 PM.
Details
moved non-cli code including imports out of cli module to scanner module Depends on D3900
Diff Detail
Event TimelineComment Actions Build is green Patch application report for D3931 (id=13857)Could not rebase; Attempt merge onto f838fed672... Updating f838fed..8ab1bc9 Fast-forward swh/scanner/cli.py | 106 ++++++++++++++++++-------------------- swh/scanner/scanner.py | 91 ++++++++++++++++++++++++++++---- swh/scanner/tests/test_cli.py | 16 ------ swh/scanner/tests/test_scanner.py | 23 +++++++-- 4 files changed, 147 insertions(+), 89 deletions(-) delete mode 100644 swh/scanner/tests/test_cli.py Changes applied before testcommit 8ab1bc99c170b423774fa885552a9777f62898bb
Author: tenma <tenma+swh@mailbox.org>
Date: Fri Sep 11 17:24:47 2020 +0200
refactor non-cli code out of cli in swh-scanner
moved non-cli code including imports out of cli module to scanner module
commit 95e0af65495bb3b1af3d6d6f31015ffef11bd4af
Author: tenma <tenma+swh@mailbox.org>
Date: Fri Sep 11 16:54:38 2020 +0200
Add standard config support and auth token for swh-scanner
- impl a full SWH config scheme, which loads config like the following
(descending priority):
- CLI switch for config path
- CLI envvar for component config path (click auto_envvar feature)
- CLI envvar for global config path
- default global config path under ~/.config/swh/global.yml
- merge loaded config with default specific config mapping
- for now the default config path is hardcoded but will move to swh.core.config later
- url and token config is namespaced with web-api to start having a
consistent hierarchical config model accross components
- added simple HTTP auth token support for requests to the SWH API,
without adding yet another dependency for a small middleware
Close T2572See https://jenkins.softwareheritage.org/job/DTSCN/job/tests-on-diff/48/ for more details. Comment Actions Just as small thing: please use imperative mood in the commit message. The subject is ok, but the "moved [...]" is not.
Comment Actions A message body is descriptive, the intent is different from the subject line, so it does not require imperative mood, as far as I know. |