File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ __version__ = "0.2.10"
Original file line number Diff line number Diff line change 1- client_version : " 0.2.10"
2-
31error_messages :
42 template_not_found :
53 message : |
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44
55[project ]
66name = " codeplain"
7- version = " 0.2.10 "
7+ dynamic = [ " version " ]
88description = " Transform plain language specifications into working code"
99readme = " README.md"
1010requires-python = " ==3.11"
@@ -40,6 +40,9 @@ dev = [
4040[project .scripts ]
4141codeplain = " plain2code:main"
4242
43+ [tool .hatch .version ]
44+ path = " _version.py"
45+
4346[tool .hatch .build .targets .wheel ]
4447include = [
4548 " *.py" ,
Original file line number Diff line number Diff line change 33
44import yaml
55
6+ from _version import __version__
67from plain2code_console import console
78
89
@@ -11,12 +12,10 @@ class SystemConfig:
1112
1213 def __init__ (self ):
1314 self .config = self ._load_config ()
14- if "client_version" not in self .config :
15- raise KeyError ("Missing 'client_version' in system_config.yaml" )
1615 if "error_messages" not in self .config :
1716 raise KeyError ("Missing 'error_messages' section in system_config.yaml" )
1817
19- self .client_version = self . config [ "client_version" ]
18+ self .client_version = __version__
2019 self .error_messages = self .config ["error_messages" ]
2120
2221 def _load_config (self ):
You can’t perform that action at this time.
0 commit comments