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

Add license policies tutorial in documentation #337

Closed
tdruez opened this issue Oct 4, 2021 · 1 comment · Fixed by #348
Closed

Add license policies tutorial in documentation #337

tdruez opened this issue Oct 4, 2021 · 1 comment · Fixed by #348
Labels
documentation Improvements or additions to documentation

Comments

@tdruez
Copy link
Contributor

tdruez commented Oct 4, 2021

A suggested by @Atharex in #335 (comment), that feature is not well presented and hidden deep in the settings.

Paragraphs ideas for the tutorial:

  1. General explanation about license policies and compliance alert
  2. How to create a policies file, details about the format
  3. Define the location of the policies file in the settings
  4. How the compliance alert ok/warning/error/missing works
ok = self.Compliance.OK
error = self.Compliance.ERROR
warning = self.Compliance.WARNING
missing = self.Compliance.MISSING

 if error in alerts:
     return error
 elif warning in alerts:
     return warning
 elif missing in alerts:
     return missing
 return ok
  1. Run a pipeline and look at the policies results
@tdruez tdruez added the documentation Improvements or additions to documentation label Oct 4, 2021
@tdruez tdruez added this to the Task queue improvements milestone Oct 4, 2021
@tdruez tdruez removed this from the Task queue improvements milestone Oct 4, 2021
@ddmesh
Copy link

ddmesh commented Oct 15, 2021

Sometimes there are files that are licensed under several licenses. So the user may choose the needed licences.
If such a case was detected I find those licenses listed in the table. in case I have gpl license and also a lgpl
license for one file, the compliance alert will show error.
Question: is there a way to set such a case to "warning" instead of "error" because a GPL was found.

The policies.yml file that I currently have, specifies GPL as error and LGPL as Warning.
Is there a way to let compliance alert being "Warning" if a file has a conflicting/multiple choice license?

Idea: specify a conditional logic within policies.yml

tdruez added a commit that referenced this issue Nov 15, 2021
Signed-off-by: Thomas Druez <tdruez@nexb.com>
tdruez added a commit that referenced this issue Nov 15, 2021
Signed-off-by: Thomas Druez <tdruez@nexb.com>
tdruez added a commit that referenced this issue Nov 15, 2021
Signed-off-by: Thomas Druez <tdruez@nexb.com>
tdruez added a commit that referenced this issue Nov 15, 2021
* Add the license policies tutorial
    • Update the index file
Signed-off-by: Hanan Younes hyounes4560@conestogac.on.ca

* Add the license policies tutorial
    • Update the index file
Signed-off-by: Hanan Younes <hyounes4560@conestogac.on.ca>

* Add an example output
Signed-off-by: Hanan Younes <hyounes4560@conestogac.on.ca>

* Add a minor update
Signed-off-by: Hanan Younes <hyounes4560@conestogac.on.ca>

* Fix a grammar issue
Signed-off-by: Hanan Younes <hyounes4560@conestogac.on.ca>

* Re-add the policies tutorial file
Signed-off-by: Hanan Younes <hyounes4560@conestogac.on.ca>

* Fix a broken link
Signed-off-by: Hanan Younes <hyounes4560@conestogac.on.ca>

* Add minor fixes

Signed-off-by: Hanan Younes <hyounes4560@conestogac.on.ca>

* Refine the license policies tutorial #337

Signed-off-by: Thomas Druez <tdruez@nexb.com>

* Fix JSON output formatting #337

Signed-off-by: Thomas Druez <tdruez@nexb.com>

* Add CHANGELOG entry #337

Signed-off-by: Thomas Druez <tdruez@nexb.com>

Co-authored-by: Hanan Younes <hyounes@clearpath.ai>
Co-authored-by: Thomas Druez <tdruez@nexb.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants