Commit c8b9f20
committed
Derive __version__ from installed package metadata
Previously openkb/__init__.py had a hand-written __version__ = "0.1.0"
that drifted out of sync with pyproject.toml's version = "0.1.0.dev0",
and the chat REPL had a three-level try/except fallback to paper over
which string it would actually read. Make pyproject.toml the single
source of truth by having __init__.py pull its __version__ from the
installed package metadata via importlib.metadata, and simplify
_openkb_version in chat.py to just import __version__.1 parent 95011fb commit c8b9f20
2 files changed
Lines changed: 9 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
| 90 | + | |
| 91 | + | |
99 | 92 | | |
100 | 93 | | |
101 | 94 | | |
| |||
0 commit comments