Skip to content

Instantly share code, notes, and snippets.

@mbijon
Created December 21, 2025 20:59
Show Gist options
  • Select an option

  • Save mbijon/5b35dad0e91cfc7825e9f16ebe44997b to your computer and use it in GitHub Desktop.

Select an option

Save mbijon/5b35dad0e91cfc7825e9f16ebe44997b to your computer and use it in GitHub Desktop.
CI version check on python package versions
###
# 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