-
-
Notifications
You must be signed in to change notification settings - Fork 599
Improve documentation #4467
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
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>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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
.. _cli_basic: | ||
|
||
.. include:: /rst_snippets/basic_options.rst | ||
|
||
---- | ||
|
||
.. include:: /rst_snippets/extract.rst |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure we want to remove these sections, they are pretty useful IMHO
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.
@@ -84,6 +84,20 @@ Comparing Progress Message Options | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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-json
optionRemoved 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