Repository navigation
Add set_license.py to keep licenses.yml in step with scheme changes - #892
Merged
Merged
Conversation
Owner
|
Thanks! The TT sync now includes the license yaml updates, too! |
Contributor
Author
|
@mbadolato Thank you for merging it. Great to hear the terminalthemes.com sync picks up the licence entries now too. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #891
This adds
tools/set_license.pyso a script that adds, renames or removes schemes (the daily sync from Terminal Themes) can updatelicenses.ymlin the same run, instead of the check failing until someone edits the file by hand.setadds an entry or replaces an existing one. The licence must be onecheck_licenses.pyaccepts (a listed SPDX identifier,unknownornonfree) and the source must be a URL or empty.--noteis optional.For the sync, the change would be one
setcall per theme it adds, with the licence it already writes to the PR body and the theme's Terminal Themes page as the source, plusrenameorremovewhen a theme changes name or goes away. Runningpython3 tools/check_licenses.pyafterwards confirms nothing was missed.Also in this PR:
tools/test_set_license.py: six tests, including one that splits and rejoins the reallicenses.ymland checks it comes back unchanged.Locally
python3 tools/check_licenses.py, both test files and a realsetthenremoveonlicenses.yml(which leaves the file identical) all pass.