fmtr.tools 1.0.28__py3-none-any.whl → 1.0.29__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.

Potentially problematic release.


This version of fmtr.tools might be problematic. Click here for more details.

fmtr/tools/version CHANGED
@@ -1 +1 @@
1
- 1.0.28
1
+ 1.0.29
@@ -14,19 +14,34 @@ except ImportError as exception:
14
14
  def read() -> str:
15
15
  """
16
16
 
17
- Read a generic version file from the calling package path. Optionally add dev build info.
17
+ Read a generic version file from the calling package path.
18
18
 
19
19
  """
20
- import os
20
+
21
21
  from fmtr.tools.tools import ToolsConfig
22
- from fmtr.tools import datatype_tools
22
+
23
23
  path = get_call_path(offset=2).parent / 'version'
24
24
  text = path.read_text(encoding=ToolsConfig.ENCODING).strip()
25
25
 
26
+ text = get(text)
27
+
28
+ return text
29
+
30
+
31
+ def get(text) -> str:
32
+ """
33
+
34
+ Optionally add dev build info.
35
+
36
+ """
37
+ import os
38
+ from fmtr.tools import datatype_tools
39
+
26
40
  is_dev = datatype_tools.to_bool(os.getenv('FMTR_DEV', default=False))
27
41
 
28
42
  if is_dev:
29
43
  import datetime
44
+ from fmtr.tools.tools import ToolsConfig
30
45
 
31
46
  timestamp = datetime.datetime.now(datetime.timezone.utc).strftime(ToolsConfig.DATETIME_SEMVER_BUILD_FORMAT)
32
47
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fmtr.tools
3
- Version: 1.0.28
3
+ Version: 1.0.29
4
4
  Summary: Collection of high-level tools to simplify everyday development tasks, with a focus on AI/ML
5
5
  Home-page: https://github.com/fmtr/fmtr.tools
6
6
  Author: Frontmatter
@@ -41,8 +41,8 @@ fmtr/tools/string_tools.py,sha256=w0lw70bgzJ8tAHj_4lMrjtMyefE5kELgpCBgGzGcalo,31
41
41
  fmtr/tools/tokenization_tools.py,sha256=9FP5vgPufWv0XA961eVKObFll0d_2mM0W3ut3rtZyeo,4329
42
42
  fmtr/tools/tools.py,sha256=xnfUrOnrT4OxFYez6vV5tAhydzCICJFiGVnviiZDEQo,796
43
43
  fmtr/tools/unicode_tools.py,sha256=yS_9wpu8ogNoiIL7s1G_8bETFFO_YQlo4LNPv1NLDeY,52
44
- fmtr/tools/version,sha256=Iu_wasRiREN9L8dG_z5ysyPXts7Bf3dsjcHw4OlWOd4,6
45
- fmtr/tools/version_tools.py,sha256=pHxD425tc5JhGfMjE3-lRLnJOVPpf63Y5FGha5ntiVY,1112
44
+ fmtr/tools/version,sha256=r5cU8l8pYQgZujnnsD1A4jo_nyItGJVBJVsrEWAZf60,6
45
+ fmtr/tools/version_tools.py,sha256=axzzHBS9V1n6YuSacsDKG3VfAvRqR8qr6aENCibR8vs,1248
46
46
  fmtr/tools/yaml_tools.py,sha256=Ol43ZwbnSXGnn1K98Uxx61KPGSqfC4axE-X2q1LKMwk,349
47
47
  fmtr/tools/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
48
48
  fmtr/tools/tests/conftest.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -52,9 +52,9 @@ fmtr/tools/tests/test_environment.py,sha256=iHaiMQfECYZPkPKwfuIZV9uHuWe3aE-p_dN_
52
52
  fmtr/tools/tests/test_json.py,sha256=IeSP4ziPvRcmS8kq7k9tHonC9rN5YYq9GSNT2ul6Msk,287
53
53
  fmtr/tools/tests/test_path.py,sha256=AkZQa6_8BQ-VaCyL_J-iKmdf2ZaM-xFYR37Kun3k4_g,2188
54
54
  fmtr/tools/tests/test_yaml.py,sha256=jc0TwwKu9eC0LvFGNMERdgBue591xwLxYXFbtsRwXVM,287
55
- fmtr.tools-1.0.28.dist-info/LICENSE,sha256=FW9aa6vVN5IjRQWLT43hs4_koYSmpcbIovlKeAJ0_cI,10757
56
- fmtr.tools-1.0.28.dist-info/METADATA,sha256=RKYOO4c1DwGFGHpHh031uBrScwLzhj6hZ02LYyT6slI,13049
57
- fmtr.tools-1.0.28.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
58
- fmtr.tools-1.0.28.dist-info/entry_points.txt,sha256=CEStVkwJ1mTFvhN1WV5RdW83SkNW1d5Syj-KZ6A19ng,72
59
- fmtr.tools-1.0.28.dist-info/top_level.txt,sha256=t5341a8ii3n4RFizwTeXGmcq_pf4GqL1h9ylE5LIWRk,12
60
- fmtr.tools-1.0.28.dist-info/RECORD,,
55
+ fmtr.tools-1.0.29.dist-info/LICENSE,sha256=FW9aa6vVN5IjRQWLT43hs4_koYSmpcbIovlKeAJ0_cI,10757
56
+ fmtr.tools-1.0.29.dist-info/METADATA,sha256=hdqacxInQqHRTwmWVf4xXdDsy8Ql-70mr5gRjkTX8CQ,13049
57
+ fmtr.tools-1.0.29.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
58
+ fmtr.tools-1.0.29.dist-info/entry_points.txt,sha256=CEStVkwJ1mTFvhN1WV5RdW83SkNW1d5Syj-KZ6A19ng,72
59
+ fmtr.tools-1.0.29.dist-info/top_level.txt,sha256=t5341a8ii3n4RFizwTeXGmcq_pf4GqL1h9ylE5LIWRk,12
60
+ fmtr.tools-1.0.29.dist-info/RECORD,,