Created
December 21, 2025 20:59
-
-
Save mbijon/5b35dad0e91cfc7825e9f16ebe44997b to your computer and use it in GitHub Desktop.
CI version check on python package versions
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
| ### | |
| # CI check to prevent version regression | |
| # Fail builds if NLTK is below the fixed version. | |
| ### | |
| import nltk | |
| from packaging.version import Version | |
| MIN_SAFE = Version("X.Y.Z") # set to your validated fixed version | |
| if Version(nltk.__version__) < MIN_SAFE: | |
| raise SystemExit(f"NLTK too old: {nltk.__version__} < {MIN_SAFE}") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment