Page MenuHomeSoftware Heritage

Various user Experience improvement:
ClosedPublic

Authored by marmoute on Sep 27 2022, 12:22 AM.

Details

Summary
  • using a default directory to be scanned $PWD
  • document the --output-format value and meaning
  • add a "summary" output and use it the default.

Check individual commit message for details


scan: use the current directory as the default the target directory

This seems like a good default and smooth the first contact with the
tool.


scan: start documenting the --output-format option better

This is still quite short, but already better. This leave room for
expanding the format list and the associated description.


output: add a "summary" output

This is a small and minimal output to display some information without
overwhelming the user with a wall of text.

Example output:

Files:                     89
            known:         40   ( 44%)
directories:               11
      fully-known:          3   ( 27%)
  partially-known:          0   (  0%)

It can most probably be improved, but this can come later.


output: pick "summary" as the default

This should be less scary than "text" for a first contact.

Test Plan

Ran tox, and manually tested the changes

Diff Detail

Repository
rDTSCN Code scanner
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build is green

Patch application report for D8540 (id=30797)

Rebasing onto 90534ecae4...

Current branch diff-target is up to date.
Changes applied before test
commit 0fcecd6c4db648ec9e8a7ae876bdf3ca6518ec28
Author: Pierre-Yves David <pierre-yves.david@ens-lyon.org>
Date:   Mon Sep 26 17:23:40 2022 +0200

    output: pick "summary" as the default
    
    This should be less scary than "text" for a first contact.

commit eb62246d6ca347aeb9239ab6c0ef978284c4f593
Author: Pierre-Yves David <pierre-yves.david@ens-lyon.org>
Date:   Mon Sep 26 17:07:18 2022 +0200

    output: add a "summary" output
    
    This is a small and minimal output to display some information without
    overwhelming the user with a wall of text.
    
    Example output:
Files:                     89
            known:         40   ( 44%)
directories:               11
      fully-known:          3   ( 27%)
  partially-known:          0   (  0%)
```

It can most probably be improved, but this can come later.

commit 821873a035417ceb73a7973687d4745c774a3aee
Author: Pierre-Yves David <pierre-yves.david@ens-lyon.org>
Date: Fri Sep 23 22:10:38 2022 +0200

scan: start documenting the --output-format option better

This is still quite short, but already better. This leave room for
expanding the format list and the associated description.

commit b3b8ca5f0f5715f9ab470a0993d61d2cebdfb074
Author: Pierre-Yves David <pierre-yves.david@ens-lyon.org>
Date: Fri Sep 23 22:09:30 2022 +0200

scan: use the current directory as the default the target directory

This seems like a good default and smooth the first contact with the
tool.
See https://jenkins.softwareheritage.org/job/DTSCN/job/tests-on-diff/165/ for more details.
marmoute retitled this revision from Various user Experience improvement: - using a default directory to be scanned `$PWD` - document the --output-format value and meaning - add a "summary" output and use it the default. Check individual commit messag for default: --- scan: use... to Various user Experience improvement:.Sep 27 2022, 12:40 AM
marmoute edited the summary of this revision. (Show Details)

Build is green

Patch application report for D8540 (id=30800)

Rebasing onto 90534ecae4...

Current branch diff-target is up to date.
Changes applied before test
commit 1a417494dff6c76ec03c4dc2c849f8b35cdc9aff
Author: Pierre-Yves David <pierre-yves.david@ens-lyon.org>
Date:   Mon Sep 26 17:23:40 2022 +0200

    output: pick "summary" as the default
    
    This should be less scary than "text" for a first contact.

commit 31ba53e242327bb06bbdbebcf35337254774b82e
Author: Pierre-Yves David <pierre-yves.david@ens-lyon.org>
Date:   Mon Sep 26 17:07:18 2022 +0200

    output: add a "summary" output
    
    This is a small and minimal output to display some information without
    overwhelming the user with a wall of text.
    
    Example output:
Files:                     89
            known:         40   ( 44%)
directories:               11
      fully-known:          3   ( 27%)
  partially-known:          0   (  0%)
```

It can most probably be improved, but this can come later.

commit 821873a035417ceb73a7973687d4745c774a3aee
Author: Pierre-Yves David <pierre-yves.david@ens-lyon.org>
Date: Fri Sep 23 22:10:38 2022 +0200

scan: start documenting the --output-format option better

This is still quite short, but already better. This leave room for
expanding the format list and the associated description.

commit b3b8ca5f0f5715f9ab470a0993d61d2cebdfb074
Author: Pierre-Yves David <pierre-yves.david@ens-lyon.org>
Date: Fri Sep 23 22:09:30 2022 +0200

scan: use the current directory as the default the target directory

This seems like a good default and smooth the first contact with the
tool.
See https://jenkins.softwareheritage.org/job/DTSCN/job/tests-on-diff/168/ for more details.
vlorentz added a subscriber: vlorentz.
vlorentz added inline comments.
swh/scanner/output.py
135–142 ↗(On Diff #30800)

why not like this?

This revision is now accepted and ready to land.Sep 27 2022, 6:57 PM
swh/scanner/output.py
135–142 ↗(On Diff #30800)

This mostly evolve from a pre-f"…" version… and your suggestion make much more sense now.

gathered relevant string as poitned by valentin

Build has FAILED

Patch application report for D8540 (id=30888)

Rebasing onto 90534ecae4...

Current branch diff-target is up to date.
Changes applied before test
commit 232b4a6fd92b83da1f89147c795fdcc61b141048
Author: Pierre-Yves David <pierre-yves.david@ens-lyon.org>
Date:   Mon Sep 26 17:23:40 2022 +0200

    output: pick "summary" as the default
    
    This should be less scary than "text" for a first contact.

commit ed7a417ad12e62daa01ff5a82567c70cecf58456
Author: Pierre-Yves David <pierre-yves.david@ens-lyon.org>
Date:   Mon Sep 26 17:07:18 2022 +0200

    output: add a "summary" output
    
    This is a small and minimal output to display some information without
    overwhelming the user with a wall of text.
    
    Example output:
Files:                     89
            known:         40   ( 44%)
directories:               11
      fully-known:          3   ( 27%)
  partially-known:          0   (  0%)
```

It can most probably be improved, but this can come later.

commit 821873a035417ceb73a7973687d4745c774a3aee
Author: Pierre-Yves David <pierre-yves.david@ens-lyon.org>
Date: Fri Sep 23 22:10:38 2022 +0200

scan: start documenting the --output-format option better

This is still quite short, but already better. This leave room for
expanding the format list and the associated description.

commit b3b8ca5f0f5715f9ab470a0993d61d2cebdfb074
Author: Pierre-Yves David <pierre-yves.david@ens-lyon.org>
Date: Fri Sep 23 22:09:30 2022 +0200

scan: use the current directory as the default the target directory

This seems like a good default and smooth the first contact with the
tool.
Link to build: https://jenkins.softwareheritage.org/job/DTSCN/job/tests-on-diff/173/
See console output for more information: https://jenkins.softwareheritage.org/job/DTSCN/job/tests-on-diff/173/console

Build is green

Patch application report for D8540 (id=30889)

Rebasing onto 90534ecae4...

Current branch diff-target is up to date.
Changes applied before test
commit 380bbd93d9390c6c10358be940aabb9fbb2e5b99
Author: Pierre-Yves David <pierre-yves.david@ens-lyon.org>
Date:   Mon Sep 26 17:23:40 2022 +0200

    output: pick "summary" as the default
    
    This should be less scary than "text" for a first contact.

commit 7df5daaf352ca57c4f39abef97f79eb756768f3b
Author: Pierre-Yves David <pierre-yves.david@ens-lyon.org>
Date:   Mon Sep 26 17:07:18 2022 +0200

    output: add a "summary" output
    
    This is a small and minimal output to display some information without
    overwhelming the user with a wall of text.
    
    Example output:
Files:                     89
            known:         40   ( 44%)
directories:               11
      fully-known:          3   ( 27%)
  partially-known:          0   (  0%)
```

It can most probably be improved, but this can come later.

commit 821873a035417ceb73a7973687d4745c774a3aee
Author: Pierre-Yves David <pierre-yves.david@ens-lyon.org>
Date: Fri Sep 23 22:10:38 2022 +0200

scan: start documenting the --output-format option better

This is still quite short, but already better. This leave room for
expanding the format list and the associated description.

commit b3b8ca5f0f5715f9ab470a0993d61d2cebdfb074
Author: Pierre-Yves David <pierre-yves.david@ens-lyon.org>
Date: Fri Sep 23 22:09:30 2022 +0200

scan: use the current directory as the default the target directory

This seems like a good default and smooth the first contact with the
tool.
See https://jenkins.softwareheritage.org/job/DTSCN/job/tests-on-diff/174/ for more details.

Build is green

Patch application report for D8540 (id=30890)

Rebasing onto 90534ecae4...

Current branch diff-target is up to date.
Changes applied before test
commit f4f091776951fbbbcdb46d6593715b5883a88f41
Author: Pierre-Yves David <pierre-yves.david@ens-lyon.org>
Date:   Mon Sep 26 17:23:40 2022 +0200

    output: pick "summary" as the default
    
    This should be less scary than "text" for a first contact.

commit 6e3a0bbee9732f530fdfa529b98275b37a7cfa43
Author: Pierre-Yves David <pierre-yves.david@ens-lyon.org>
Date:   Mon Sep 26 17:07:18 2022 +0200

    output: add a "summary" output
    
    This is a small and minimal output to display some information without
    overwhelming the user with a wall of text.
    
    Example output:
Files:                     89
            known:         40   ( 44%)
directories:               11
      fully-known:          3   ( 27%)
  partially-known:          0   (  0%)
```

It can most probably be improved, but this can come later.

commit 821873a035417ceb73a7973687d4745c774a3aee
Author: Pierre-Yves David <pierre-yves.david@ens-lyon.org>
Date: Fri Sep 23 22:10:38 2022 +0200

scan: start documenting the --output-format option better

This is still quite short, but already better. This leave room for
expanding the format list and the associated description.

commit b3b8ca5f0f5715f9ab470a0993d61d2cebdfb074
Author: Pierre-Yves David <pierre-yves.david@ens-lyon.org>
Date: Fri Sep 23 22:09:30 2022 +0200

scan: use the current directory as the default the target directory

This seems like a good default and smooth the first contact with the
tool.
See https://jenkins.softwareheritage.org/job/DTSCN/job/tests-on-diff/175/ for more details.