Skip to content
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

Design the new user experience for primary/declared data summaries in SCTK #2842

Closed
pombredanne opened this issue Feb 2, 2022 · 6 comments
Closed

Comments

@pombredanne
Copy link
Member

We have many related options and we want to design a new, better approach to get primary, declared licensing and package data. What would it be?

This is the current set of options:

    --consolidate            Group resources by Packages or license and
                             copyright holder and return those groupings as a
                             list of consolidated packages and a list of
                             consolidated components. This requires the scan to
                             have/be run with the copyright, license, and
                             package options active
    --license-clarity-score  Compute a summary license clarity score at the
                             codebase level.
    --license-policy FILE    Load a License Policy file and apply it to the scan
                             at the Resource level.
    --summary                Summarize license, copyright and other scans at the
                             codebase level.
    --summary-by-facet       Summarize license, copyright and other scans and
                             group the results by facet.
    --summary-key-files      Summarize license, copyright and other scans for
                             key, top-level files. Key files are top-level
                             codebase files such as COPYING, README and package
                             manifests as reported by the --classify option
                             "is_legal", "is_readme", "is_manifest" and
                             "is_top_level" flags.
    --summary-with-details   Summarize license, copyright and other scans at the
                             codebase level, keeping intermediate details at the
                             file and directory level.
@pombredanne
Copy link
Member Author

pombredanne commented Feb 16, 2022

Here is consensus from some chat and discussions: deprecate and remove in the version after next all these options

  • consolidate
  • license-clarity-score
  • summary
  • summary-by-facet
  • summary-key-files
  • summary-with-details

The new "primary", may be reusing code from summary-key-files is tracked in #2065 and will be always ON in the default JSON/YAML output.

The new license clarity scoring is tracked in #2861 and will be always ON in the default JSON/YAML output.

So the key is clarity and primary becomes standard, non opt-in, always on options

@pombredanne
Copy link
Member Author

And the --classify option should become default too implicitly to support the above

JonoYang added a commit that referenced this issue Mar 4, 2022
Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Mar 4, 2022
    * Refactor check_for_license_ambiguity to return a primary license expression

Signed-off-by: Jono Yang <jyang@nexb.com>
pombredanne pushed a commit that referenced this issue Mar 9, 2022
Signed-off-by: Jono Yang <jyang@nexb.com>
pombredanne pushed a commit that referenced this issue Mar 9, 2022
    * Refactor check_for_license_ambiguity to return a primary license expression

Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Mar 9, 2022
Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Mar 9, 2022
Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Mar 9, 2022
    * Refactor check_for_license_ambiguity to return a primary license expression

Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Mar 9, 2022
Signed-off-by: Jono Yang <jyang@nexb.com>
pombredanne added a commit that referenced this issue Mar 10, 2022
Otherwise the variable may not exist and may not be provided to another
plugin if not True.

Reference: #2842
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
pombredanne added a commit that referenced this issue Mar 11, 2022
Instead use a function that preserves original order.

Reference: #2842
Reference: #2861
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
pombredanne added a commit that referenced this issue Mar 11, 2022
Reference: #2842
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
pombredanne added a commit that referenced this issue Mar 11, 2022
Reference: #2842
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
pombredanne added a commit that referenced this issue Mar 11, 2022
Using option dependencies is cleaner than chaning how an option
is enabled.

Reference: #2842
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
pombredanne added a commit that referenced this issue Mar 11, 2022
Reference: #2842
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
@pombredanne
Copy link
Member Author

We now have a new --summary2 option by @JonoYang that gets a decent primary license for a whole codebase. What we do not have yet is the surfacing the primary license in a package.

JonoYang added a commit that referenced this issue Mar 24, 2022
Reference: #2842

Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Mar 28, 2022
Reference: #2842

Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Mar 28, 2022
    * Set summary2 to be new summary plugin
    * Update tests

Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Apr 1, 2022
Reference: #2842

Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Apr 2, 2022
    * Remove declared values from license_expressions, holders, programming_language summary lists and then call those lists `other_license_expressions, `other_holders`, and `other_programming_languages`, respectivly.

Reference: #2842

Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Apr 5, 2022
    * Move old summarizer code to legacy_summarizer.py

Reference: #2842
Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Apr 5, 2022
    * Remove summarizer2.py

Reference: #2842
Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Apr 7, 2022
    * Update summarizer test cases using codebases of real code

Reference: #2842
Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Apr 8, 2022
Reference: #2842
Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Apr 8, 2022
Reference: #2842
Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Apr 9, 2022
Reference: #2842
Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Apr 9, 2022
    * Add new simple test for scan summarizer
    * Rename previous simple test to package

Reference: #2842
Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Apr 9, 2022
    * Add new summarizer tests for license ambiguity, conflicting license categories
    * Rename previous simple test to package
    * Remove full and copyright test

Reference: #2842
Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Apr 11, 2022
Reference: #2842
Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Apr 13, 2022
Reference: #2842
Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Apr 13, 2022
Reference: #2842
Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Apr 14, 2022
Reference: #2842
Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Apr 14, 2022
    * Combine all detected origin info from multiple package data and use the resulting values in the summary
    * Create new test for multiple package data summarization

Reference: #2842
Signed-off-by: Jono Yang <jyang@nexb.com>
@pombredanne
Copy link
Member Author

The latest approach is going to keep the old --summary and rename it as --tallies and the new summary is replacing it and --consolidate will be deprecated.

JonoYang added a commit that referenced this issue Apr 14, 2022
    * Remove redundant code in summarizer.py

Reference: #2842
Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Apr 14, 2022
    * Remove all references to summarization in tallies tests

Reference: #2842
Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Apr 14, 2022
    * Remove all references to summarization in tallies tests

Reference: #2842
Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Apr 14, 2022
    * Remove copyright_summary.py
    * Update summarizer help text

Reference: #2842
Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Apr 15, 2022
Reference: #2842
Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Apr 15, 2022
Reference: #2842
Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Apr 15, 2022
    * This allows us to more effectivly remove declared holders from the other holders list
    * Update holders summarization tests

Reference: #2842
Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Apr 15, 2022
Reference: #2842
Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Apr 19, 2022
    * Do not rename summaries to tallies

Reference: #2842
Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Apr 20, 2022
    * Do not rename summaries to tallies

Reference: #2842
Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Apr 20, 2022
    * Do not rename summaries to tallies

Reference: #2842
Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Apr 20, 2022
Reference: #2842
Signed-off-by: Jono Yang <jyang@nexb.com>
JonoYang added a commit that referenced this issue Apr 22, 2022
Reference: #2842
Signed-off-by: Jono Yang <jyang@nexb.com>
@JonoYang
Copy link
Member

We have updated the summary plugin with the new fields and scoring critera and merged the code in #2914

@AyanSinhaMahapatra
Copy link
Member

Btw, we have not made the options default (--classify/--summary/--license-clarity-score), yet. This is for the next release tentatively?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants