Skip to content

#835 replace test copyright headers with ruff rule CPY#836

Open
mo-jareddrayton wants to merge 3 commits intomainfrom
835-replace-test_copyright_headers-with-ruff-rule-cpy
Open

#835 replace test copyright headers with ruff rule CPY#836
mo-jareddrayton wants to merge 3 commits intomainfrom
835-replace-test_copyright_headers-with-ruff-rule-cpy

Conversation

@mo-jareddrayton
Copy link
Collaborator

Closes #835

As noted by @mo-gill the existing test_coding_standards.py doesn't actually test coding standards anymore and only checks for the copyright/license header. This PR replaces those tests in cdds and mip_convert with the ruff rule CPY (see https://docs.astral.sh/ruff/rules/#flake8-copyright-cpy)

A couple other changes include the removal of some spurious shebang lines and enabling the preview mode on ruff for the CPY rule.

Copy link
Collaborator

@matthew-mizielinski matthew-mizielinski left a comment

Choose a reason for hiding this comment

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

LGTM and makes this test a lot easier.

@mo-gill
Copy link
Collaborator

mo-gill commented Mar 5, 2026

I take it that if we go ahead with this change we're just going to have to be aware from now on that it doesn't check non python files as opposed to the previous copyright checker which checked all of them?

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.

Replace test_copyright_headers with ruff rule CPY

3 participants