Skip to content

Move licence check into pytest#1442

Merged
tjtg merged 4 commits intometoppv:masterfrom
tjtg:licensepy
Apr 8, 2021
Merged

Move licence check into pytest#1442
tjtg merged 4 commits intometoppv:masterfrom
tjtg:licensepy

Conversation

@tjtg
Copy link
Contributor

@tjtg tjtg commented Apr 7, 2021

Move the licence header check from bin/improver-tests into pytest. This avoids needing to run a separate tool for this task and also makes the licence check run as part of CI on Github Actions.

Resolves #1416

Testing:

  • Ran tests and they passed OK
  • Added new tests for the new feature(s)

@codecov
Copy link

codecov bot commented Apr 7, 2021

Codecov Report

Merging #1442 (d618048) into master (b56379f) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1442   +/-   ##
=======================================
  Coverage   97.71%   97.71%           
=======================================
  Files         100      100           
  Lines        8271     8271           
=======================================
  Hits         8082     8082           
  Misses        189      189           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b56379f...d618048. Read the comment docs.

dmentipl
dmentipl previously approved these changes Apr 7, 2021
Copy link
Contributor

@dmentipl dmentipl left a comment

Choose a reason for hiding this comment

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

Looks good. I've tested this by removing parts of the licence and seeing pytest fail (otherwise it passes).

One other option (perhaps for a future PR) would be to have the licence text in a separate non-code file and read it in in the test. Then add a MANIFEST.in file to make sure it's packaged with the source code.

Copy link
Contributor

@neilCrosswaite neilCrosswaite left a comment

Choose a reason for hiding this comment

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

Looks good, tested with removing some of the license and all of the license.

@tjtg tjtg merged commit 6acaf27 into metoppv:master Apr 8, 2021
@tjtg tjtg deleted the licensepy branch July 23, 2021 00:05
MoseleyS pushed a commit to MoseleyS/improver that referenced this pull request Aug 22, 2024
* Add licence check inside pytest

* Remove licence check from improver-tests shell script

* Expand comment

* Simplify licence finding code
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.

License check not included in CI tests

3 participants