Improve documentation#4467
Conversation
Signed-off-by: Chin Yeung Li <tli@nexb.com>
The `extractcode` and `scancode-reindex-licenses` are already in the "Other available CLIs" section. Signed-off-by: Chin Yeung Li <tli@nexb.com>
Signed-off-by: Chin Yeung Li <tli@nexb.com>
AyanSinhaMahapatra
left a comment
There was a problem hiding this comment.
Thanks @chinyeungli looks good.
See my comments for your consideration
|
|
||
| .. note:: | ||
|
|
||
| For optimal performance, it's recommended to set the `-n, --processes` |
There was a problem hiding this comment.
@chinyeungli this was merged as default with #4104
See also docs above which was changed:
[Default: (number of CPUs)-1]
This explanation is nice, but we need to modify this a bit.
We could also say it's safer to use (number of CPUs)-2 for local machines with other applications (browser/IDEs/chatrooms etc) open, or even less after looking at current CPU usage.
We should probably have a seperate section on performance and explanations, but this can be done a bit more explicitly as a sub-task of #4069 eith detailed explanations and recommendations on CPU/memory
|
|
||
| ---- | ||
|
|
||
| .. include:: /rst_snippets/extract.rst |
There was a problem hiding this comment.
I'm not sure we want to remove these sections, they are pretty useful IMHO
There was a problem hiding this comment.
@AyanSinhaMahapatra I'm removing this from the list-options since extract.rst is already included in other-commands.rst. Having it in both places seem redundant.
| This inputs the scan results from ``sample.json``, runs the post-scan plugin ``--classify`` and | ||
| outputs the results for this scan to ``sample_2.json``. | ||
|
|
||
| You can also convert the input .json file to other output format |
There was a problem hiding this comment.
| You can also convert the input .json file to other output format | |
| You can also convert the input ``.json`` file to other output format |
|
|
||
| .. note:: | ||
|
|
||
| This only works for options that require only the input JSON file; |
There was a problem hiding this comment.
Generally the post-scan options (like --summary, --todo) are configured to just operate on the codebase (with top-level licenses/packages etc and all resource level results) and this should work fine with --from-json
The core scan options (like --license --info) and pre-scan options cannot be run here. There are some post-scan options which have required options as dependencies, so those also need to be there in the loaded scan if those options are being specified.
There was a problem hiding this comment.
@AyanSinhaMahapatra I am wondering is it true that all the "Pre-Scan" options cannot be run with --from-json?
https://scancode-toolkit.readthedocs.io/en/latest/cli-reference/list-options.html#all-pre-scan-options
It seems to be the "--ignore" and "--include" don't really need the code files to have it work (I didn't look at the source code to verify it). Also, https://scancode-toolkit.readthedocs.io/en/latest/cli-reference/core-options.html#from-json-option , the current --from-json` is usung --classify`` as a sample.
For the post-scans, I want to verify that if an option's dependencies are missing, the command still executes without errors, it just won’t return results related to the missing dependencies, correct?
Signed-off-by: Chin Yeung Li <tli@nexb.com>
Signed-off-by: Chin Yeung Li <tli@nexb.com>
Fixes
#2980 Added note on recommended process number for optimal performance
#2562 Enhance description of the
--from-jsonoptionRemoved duplicate content from "All Available Options"
Tasks
Run tests locally to check for errors.
The failing tests don't related to the documentation update.
Signed-off-by: Chin Yeung Li tli@nexb.com