dazzlecmd 0.2.1a0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
dazzlecmd/__init__.py ADDED
@@ -0,0 +1,3 @@
1
+ """dazzlecmd - Unified CLI for the DazzleTools collection."""
2
+
3
+ from dazzlecmd._version import __version__, __app_name__, DISPLAY_VERSION
dazzlecmd/__main__.py ADDED
@@ -0,0 +1,8 @@
1
+ """Allow running as: python -m dazzlecmd"""
2
+
3
+ import sys
4
+
5
+ from dazzlecmd.cli import main
6
+
7
+ if __name__ == "__main__":
8
+ sys.exit(main())
dazzlecmd/_version.py ADDED
@@ -0,0 +1,94 @@
1
+ """
2
+ Version information for dazzlecmd.
3
+
4
+ This file is the canonical source for version numbers.
5
+ The __version__ string is automatically updated by git hooks
6
+ with build metadata (branch, build number, date, commit hash).
7
+
8
+ Format: MAJOR.MINOR.PATCH[-PHASE]_BRANCH_BUILD-YYYYMMDD-COMMITHASH
9
+ Example: 0.1.0_main_4-20260211-a1b2c3d4
10
+
11
+ To manually update: ./scripts/update-version.sh
12
+ To bump version: edit MAJOR, MINOR, PATCH below
13
+
14
+ Version levels:
15
+ PROJECT_PHASE: Global project maturity (prealpha -> alpha -> beta -> stable).
16
+ Changes rarely, when the overall project hits a threshold.
17
+ PHASE: Per-MINOR feature set maturity (alpha -> beta -> None).
18
+ Drops when a MINOR's feature set is complete.
19
+ Example: BETA 0.5.1-alpha = project is beta, 0.5.x features in progress.
20
+ """
21
+
22
+ # Version components - edit these for version bumps
23
+ MAJOR = 0
24
+ MINOR = 2
25
+ PATCH = 1
26
+ PHASE = "alpha" # Per-MINOR feature set: None, "alpha", "beta", "rc1", etc.
27
+ PROJECT_PHASE = "prealpha" # Project-wide: "prealpha", "alpha", "beta", "stable"
28
+
29
+ # Auto-updated by git hooks - do not edit manually
30
+ __version__ = "0.2.1-alpha_main_12-20260316-b15ec326"
31
+ __app_name__ = "dazzlecmd"
32
+
33
+
34
+ def get_version():
35
+ """Return the full version string including branch and build info."""
36
+ return __version__
37
+
38
+
39
+ def get_display_version():
40
+ """Return a human-friendly version string with project phase.
41
+
42
+ Example: 'PREALPHA 0.1.0-alpha' or 'BETA 0.5.1' or '1.0.0'
43
+ """
44
+ base = get_base_version()
45
+ if PROJECT_PHASE and PROJECT_PHASE != "stable":
46
+ return f"{PROJECT_PHASE.upper()} {base}"
47
+ return base
48
+
49
+
50
+ def get_base_version():
51
+ """Return the semantic version string (MAJOR.MINOR.PATCH[-PHASE])."""
52
+ if "_" in __version__:
53
+ return __version__.split("_")[0]
54
+ base = f"{MAJOR}.{MINOR}.{PATCH}"
55
+ if PHASE:
56
+ base = f"{base}-{PHASE}"
57
+ return base
58
+
59
+
60
+ def get_pip_version():
61
+ """
62
+ Return PEP 440 compliant version for pip/setuptools.
63
+
64
+ Converts our version format to PEP 440:
65
+ - Main branch: 0.1.2-alpha_main_6-20260212-hash -> 0.1.2a0
66
+ - Dev branch: 0.1.2-alpha_dev_6-20260212-hash -> 0.1.2a0.dev6
67
+ - Feature branch: 0.1.2_feature_6-20260212-hash -> 0.1.2.dev6+feature
68
+ """
69
+ base = f"{MAJOR}.{MINOR}.{PATCH}"
70
+
71
+ # Map phase to PEP 440 pre-release segment
72
+ phase_map = {"alpha": "a0", "beta": "b0"}
73
+ if PHASE:
74
+ base += phase_map.get(PHASE, PHASE)
75
+
76
+ if "_" not in __version__:
77
+ return base
78
+
79
+ parts = __version__.split("_")
80
+ branch = parts[1] if len(parts) > 1 else "unknown"
81
+
82
+ if branch == "main":
83
+ return base
84
+ else:
85
+ build_info = "_".join(parts[2:]) if len(parts) > 2 else ""
86
+ build_num = build_info.split("-")[0] if "-" in build_info else "0"
87
+ return f"{base}.dev{build_num}"
88
+
89
+
90
+ # For convenience in imports
91
+ VERSION = get_version()
92
+ BASE_VERSION = get_base_version()
93
+ PIP_VERSION = get_pip_version()
94
+ DISPLAY_VERSION = get_display_version()