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

Implementing license header checking in CI #184

Merged
merged 4 commits into from
Sep 3, 2024

Conversation

john-science
Copy link
Contributor

Purpose

  • To implement license header checking in CI

Proposed Changes

What does this PR add, remove or fix?

I have added one GitHub Action CI (to check that every Python file has a Copyright header at the top). And I had to add one metadata file to the root of the repo, to make this CI action run properly.

Issues

Testing

  • How was it tested, what were the results?

This is it's own CI, so it is self-testing. After running it the first time, I found three __init__.py files that were lacking the header. Kind of an oddity, but looking around at some other open-source projects that have this license header rule (e.g. armi, this appears to be the standard, so I went with it.

@maciejmajek
Copy link
Member

maciejmajek commented Sep 2, 2024

Hi, Thank you! I don't think this is mentioned in the readmes, we use pre-commit for code formatting. Please run the following:

pre-commit run -a

@adamdbrw
Copy link
Member

adamdbrw commented Sep 2, 2024

Thank you for this contribution!

@john-science
Copy link
Contributor Author

Hi, Thank you! I don't think this is mentioned in the readmes, we use pre-commit for code formatting. Please run the following:

pre-commit run -a

Oh, sorry about that.

Okay, I ran precommit run -a and it came back clean. (After I fixed the linting errors.)

Copy link
Member

@adamdbrw adamdbrw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checker suggestions

.licenserc.json Outdated Show resolved Hide resolved
Thanks to @adamdbrw for the correction; I was only looking at the Python code.

Co-authored-by: Adam Dąbrowski <adam.dabrowski@robotec.ai>
Copy link
Member

@maciejmajek maciejmajek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please run the pre-commit 🙇🏼‍♂️, otherwise LGTM

@john-science
Copy link
Contributor Author

Please run the pre-commit 🙇🏼‍♂️, otherwise LGTM

Okay, linter came back clean.

Copy link
Member

@maciejmajek maciejmajek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

@maciejmajek maciejmajek merged commit 7e5bbc5 into RobotecAI:development Sep 3, 2024
3 checks passed
@john-science john-science deleted the licence_checker_ci branch September 4, 2024 02:13
maciejmajek pushed a commit that referenced this pull request Sep 18, 2024
Co-authored-by: Adam Dąbrowski <adam.dabrowski@robotec.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement license header checking in CI
3 participants