Files
skill-seekers-reference/src/skill_seekers/_version.py
yusyus f7117c35a9 chore: bump version to 3.1.0 and update CHANGELOG
- pyproject.toml: version 3.0.0 → 3.1.0
- src/skill_seekers/_version.py: update hardcoded fallback to 3.1.0
- CHANGELOG.md: comprehensive [3.1.0] release notes covering all
  features and fixes since v3.0.0 (unified create command, workflow
  presets, RST parser, smart enhance dispatcher, CLI flag parity,
  60 new workflow YAMLs, test suite improvements)
- Deprecation messages: update "removed in v3.0.0" → "v4.0.0" across
  analyze_presets.py, codebase_scraper.py, mcp/server.py
- tests/test_cli_paths.py: update version assertion to 3.1.0
- tests/test_package_structure.py: update __version__ assertions to 3.1.0
- tests/test_preset_system.py: update deprecation message version to v4.0.0

All 2267 tests passing.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-22 21:52:04 +03:00

53 lines
1.3 KiB
Python

"""
Single source of truth for skill-seekers version.
This module dynamically reads the version from pyproject.toml to avoid
version mismatches across multiple files.
"""
import sys
from pathlib import Path
# Use tomllib (built-in) for Python 3.11+, tomli (package) for earlier versions
if sys.version_info >= (3, 11):
import tomllib
else:
try:
import tomli as tomllib
except ImportError:
# Fallback if tomli not available
tomllib = None
def get_version() -> str:
"""
Read version from pyproject.toml.
Returns:
Version string (e.g., "3.0.0")
"""
if tomllib is None:
# Fallback if TOML library not available
return "3.1.0" # Hardcoded fallback
try:
# Get path to pyproject.toml (3 levels up from this file)
repo_root = Path(__file__).parent.parent.parent
pyproject_path = repo_root / "pyproject.toml"
if not pyproject_path.exists():
# Fallback for installed package
return "3.1.0" # Hardcoded fallback
with open(pyproject_path, "rb") as f:
pyproject_data = tomllib.load(f)
return pyproject_data["project"]["version"]
except Exception:
# Fallback if anything goes wrong
return "3.1.0" # Hardcoded fallback
__version__ = get_version()