opendata.cern.ch icon indicating copy to clipboard operation
opendata.cern.ch copied to clipboard

ci: improve license checker to work only on certain files

Open tiborsimko opened this issue 10 months ago • 0 comments

Current behaviour

The license checker by default checks all the fixture files during its execution and the CI run. This is perfectly fine, since it is rather fast (about 2 seconds).

However, if we enrich the metadata checker script in order to check other fields as well -- see #3714 -- then it may become worth improving the script so that it could operate only on certain desired files.

Possible improvements

  • Instead of working over all the JSON files, the script could take CLI arguments of file paths, and perform checks only on those.

  • When the script is run in the CI for a pull request, the script could detect which files have been changed in the pull request over the base branch, and perform checks only on those modified files.

  • Ditto locally, if I'm on a certain branch, make a git diff master --numstat and run the controlled vocabulary checks only on the added or modified files.

tiborsimko avatar Jan 06 '25 13:01 tiborsimko