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

copyright.sh could use some improvement for open source project #30

Open
markstur opened this issue Sep 20, 2024 · 3 comments
Open

copyright.sh could use some improvement for open source project #30

markstur opened this issue Sep 20, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@markstur
Copy link
Contributor

Describe the bug

There are 3 (debatable) problems with automatic adding of copyright with copyright.sh.

  1. Using "IBM Corp." in the copyright is not very open source community friendly. There are many opinions, but a good Linux Foundation suggestion is "Copyright The XYZ Authors." where XYZ is the project name (https://www.linuxfoundation.org/blog/blog/copyright-notices-in-open-source-software-projects)
  2. The one-line SPDX-License-Identifier is becoming preferred over text blobs to reduce the slight variations that happen in text blobs (potentially significant rewording).
  3. I got an error because "jq" was not installed. We can avoid that (or else it should be documented dev setup somewhere).

Maybe this debate was already settled, but I'm suggestion we make those changes. It looks like this would affect our other repos (same script to change).

TBD: Whether to change existing copyrights. I don't like touching existing copyrights, so I'd focus on fixing this for added files, but the project is new enough that updating copyrights from IBM to project authors, but be a good thing to do.

To Reproduce
Steps to reproduce the behavior:

  1. Add a new file w/o copyright and license
  2. Commit it
  3. See the copyright/license header that was added (if you have jq)
  4. Also you could just look in our existing files already added

Expected behavior

  1. An open source community project should ideally have an open license and avoid individual person or company copyrights.
  2. A per-file license might be a best practice, but it can be abbreviated to be succinct and consistent
  3. New devs should not get "jq" not found errors when doing a commit (unless we add that to our contributing guide)

Screenshots / Code snippets
If applicable, add screenshots or code snippets to help explain your problem.

Set-up:

  • Bee version: [e.g. v0.0.3]
  • Model provider [e.g. watsonx]

Additional context
Add any other context about the problem here.

Feel free to have opinions on this. The current process was probably leveraged from other projects. There's more than one way.

@markstur markstur added the bug Something isn't working label Sep 20, 2024
@markstur
Copy link
Contributor Author

/assign me

markstur added a commit to markstur/bee-agent-framework that referenced this issue Sep 20, 2024
* Use open source project authors instead of company name in copyright.
  - New files only. No existing copyright changes in this commit.
* Use the SPDXID one-line form of Apache-2.0 instead of text blob.
  - Takes less space and is less likely to introduce license change creep.
* Remove the need for "jq" which is not documented as a project pre-req.

Closes: i-am-bee#30

Signed-off-by: Mark Sturdevant <mark.sturdevant@ibm.com>
@Tomas2D
Copy link
Member

Tomas2D commented Sep 21, 2024

We could switch to license-eye (installable via brew, written in Go).

Usage:

.licenserc.yaml

header:
  license:
    spdx-id: Apache-2.0
    copyright-owner: IBM Corp.
  paths: ["{src,dist,tests,scripts}/**.{ts,js}"]

Commands:

license-eye header check
license-eye header fix

From the next library, I would expect the following features:

  • easy to install
  • easy integration to the pre-commit check (CLI must exit with non-zero code if there is some file without appropriate header, unfortunately nwa does not support that - it always exits with zero code)
  • easy integration to GitHub Actions

@JanPokorny
Copy link
Contributor

Regarding jq and other required local tools (like nwa / license-eye) -- we could set up mise-en-place which is something like nvm but for everything (https://mise.jdx.dev/dev-tools/backends/). So one would only need brew install mise and then entering the folder would automatically put the correct set of tools into PATH (or prompt to install them).

For users who don't want to use mise, we would just document that they need to install the tools listed in .mise.toml in any way they like.

@Tomas2D Tomas2D added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed and removed bug Something isn't working labels Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants