fmtr.tools 1.3.9__tar.gz → 1.3.11__tar.gz
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-1.3.9 → fmtr_tools-1.3.11}/PKG-INFO +46 -51
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/__init__.py +19 -18
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/api_tools.py +2 -2
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/constants.py +6 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/dns_tools/server.py +2 -2
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/environment_tools.py +1 -1
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/logging_tools.py +12 -8
- fmtr_tools-1.3.11/fmtr/tools/version +1 -0
- fmtr_tools-1.3.11/fmtr/tools/version_tools/__init__.py +12 -0
- fmtr_tools-1.3.11/fmtr/tools/version_tools/version_tools.py +51 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/yaml_tools.py +1 -1
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr.tools.egg-info/PKG-INFO +46 -51
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr.tools.egg-info/SOURCES.txt +5 -3
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr.tools.egg-info/requires.txt +45 -49
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/setup.py +2 -1
- fmtr_tools-1.3.9/fmtr/tools/version +0 -1
- fmtr_tools-1.3.9/fmtr/tools/version_tools.py +0 -62
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/LICENSE +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/README.md +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/ai_tools/__init__.py +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/ai_tools/agentic_tools.py +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/ai_tools/inference_tools.py +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/async_tools.py +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/augmentation_tools.py +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/caching_tools.py +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/data_modelling_tools.py +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/dataclass_tools.py +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/datatype_tools.py +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/debugging_tools.py +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/dns_tools/__init__.py +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/dns_tools/client.py +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/dns_tools/dm.py +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/dns_tools/proxy.py +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/docker_tools.py +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/entrypoints/__init__.py +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/entrypoints/cache_hfh.py +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/entrypoints/ep_test.py +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/entrypoints/install_yamlscript.py +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/entrypoints/remote_debug_test.py +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/entrypoints/shell_debug.py +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/function_tools.py +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/google_api_tools.py +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/hash_tools.py +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/hfh_tools.py +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/html_tools.py +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/http_tools.py +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/import_tools.py +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/inspection_tools.py +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/interface_tools.py +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/iterator_tools.py +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/json_fix_tools.py +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/json_tools.py +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/merging_tools.py +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/metric_tools.py +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/name_tools.py +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/netrc_tools.py +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/openai_tools.py +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/packaging_tools.py +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/parallel_tools.py +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/path_tools/__init__.py +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/path_tools/app_path_tools.py +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/path_tools/path_tools.py +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/path_tools/type_path_tools.py +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/pattern_tools.py +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/pdf_tools.py +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/platform_tools.py +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/process_tools.py +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/profiling_tools.py +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/random_tools.py +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/semantic_tools.py +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/settings_tools.py +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/setup_tools/__init__.py +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/setup_tools/setup_tools.py +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/spaces_tools.py +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/string_tools.py +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/tabular_tools.py +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/tests/__init__.py +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/tests/conftest.py +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/tests/helpers.py +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/tests/test_datatype.py +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/tests/test_environment.py +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/tests/test_json.py +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/tests/test_path.py +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/tests/test_yaml.py +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/tokenization_tools.py +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/tools.py +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr/tools/unicode_tools.py +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr.tools.egg-info/dependency_links.txt +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr.tools.egg-info/entry_points.txt +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/fmtr.tools.egg-info/top_level.txt +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/pyproject.toml +0 -0
- {fmtr_tools-1.3.9 → fmtr_tools-1.3.11}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fmtr.tools
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.11
|
|
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
|
|
@@ -15,7 +15,6 @@ Requires-Dist: yamlscript; extra == "yaml"
|
|
|
15
15
|
Requires-Dist: pyyaml; extra == "yaml"
|
|
16
16
|
Provides-Extra: logging
|
|
17
17
|
Requires-Dist: logfire; extra == "logging"
|
|
18
|
-
Requires-Dist: semver; extra == "logging"
|
|
19
18
|
Provides-Extra: parallel
|
|
20
19
|
Requires-Dist: dask[bag]; extra == "parallel"
|
|
21
20
|
Requires-Dist: distributed; extra == "parallel"
|
|
@@ -27,7 +26,6 @@ Requires-Dist: faker; extra == "augmentation"
|
|
|
27
26
|
Requires-Dist: sre_yield; extra == "augmentation"
|
|
28
27
|
Provides-Extra: process
|
|
29
28
|
Requires-Dist: logfire; extra == "process"
|
|
30
|
-
Requires-Dist: semver; extra == "process"
|
|
31
29
|
Provides-Extra: profiling
|
|
32
30
|
Requires-Dist: contexttimer; extra == "profiling"
|
|
33
31
|
Provides-Extra: docker-api
|
|
@@ -35,7 +33,8 @@ Requires-Dist: docker; extra == "docker-api"
|
|
|
35
33
|
Provides-Extra: unicode
|
|
36
34
|
Requires-Dist: Unidecode; extra == "unicode"
|
|
37
35
|
Provides-Extra: version
|
|
38
|
-
|
|
36
|
+
Provides-Extra: version-dev
|
|
37
|
+
Requires-Dist: semver; extra == "version-dev"
|
|
39
38
|
Provides-Extra: spaces
|
|
40
39
|
Requires-Dist: tinynetrc; extra == "spaces"
|
|
41
40
|
Provides-Extra: netrc
|
|
@@ -48,7 +47,6 @@ Provides-Extra: api
|
|
|
48
47
|
Requires-Dist: fastapi; extra == "api"
|
|
49
48
|
Requires-Dist: uvicorn[standard]; extra == "api"
|
|
50
49
|
Requires-Dist: logfire; extra == "api"
|
|
51
|
-
Requires-Dist: semver; extra == "api"
|
|
52
50
|
Requires-Dist: pydantic; extra == "api"
|
|
53
51
|
Requires-Dist: logfire[fastapi]; extra == "api"
|
|
54
52
|
Provides-Extra: ai
|
|
@@ -63,7 +61,6 @@ Provides-Extra: openai-api
|
|
|
63
61
|
Requires-Dist: openai; extra == "openai-api"
|
|
64
62
|
Provides-Extra: ai-client
|
|
65
63
|
Requires-Dist: logfire; extra == "ai-client"
|
|
66
|
-
Requires-Dist: semver; extra == "ai-client"
|
|
67
64
|
Requires-Dist: pydantic; extra == "ai-client"
|
|
68
65
|
Requires-Dist: openai; extra == "ai-client"
|
|
69
66
|
Requires-Dist: pydantic-ai[logfire,openai]; extra == "ai-client"
|
|
@@ -118,7 +115,6 @@ Requires-Dist: dnspython[doh]; extra == "dns"
|
|
|
118
115
|
Requires-Dist: httpx; extra == "dns"
|
|
119
116
|
Requires-Dist: httpx_retries; extra == "dns"
|
|
120
117
|
Requires-Dist: logfire; extra == "dns"
|
|
121
|
-
Requires-Dist: semver; extra == "dns"
|
|
122
118
|
Requires-Dist: logfire[httpx]; extra == "dns"
|
|
123
119
|
Provides-Extra: patterns
|
|
124
120
|
Requires-Dist: regex; extra == "patterns"
|
|
@@ -126,66 +122,65 @@ Provides-Extra: http
|
|
|
126
122
|
Requires-Dist: httpx; extra == "http"
|
|
127
123
|
Requires-Dist: httpx_retries; extra == "http"
|
|
128
124
|
Requires-Dist: logfire; extra == "http"
|
|
129
|
-
Requires-Dist: semver; extra == "http"
|
|
130
125
|
Requires-Dist: logfire[httpx]; extra == "http"
|
|
131
126
|
Provides-Extra: setup
|
|
132
127
|
Requires-Dist: setuptools; extra == "setup"
|
|
133
128
|
Provides-Extra: all
|
|
134
|
-
Requires-Dist:
|
|
135
|
-
Requires-Dist: json_repair; extra == "all"
|
|
136
|
-
Requires-Dist: httpx; extra == "all"
|
|
137
|
-
Requires-Dist: openai; extra == "all"
|
|
138
|
-
Requires-Dist: openpyxl; extra == "all"
|
|
139
|
-
Requires-Dist: flet[all]; extra == "all"
|
|
140
|
-
Requires-Dist: regex; extra == "all"
|
|
141
|
-
Requires-Dist: tabulate; extra == "all"
|
|
129
|
+
Requires-Dist: setuptools; extra == "all"
|
|
142
130
|
Requires-Dist: tinynetrc; extra == "all"
|
|
143
|
-
Requires-Dist:
|
|
144
|
-
Requires-Dist:
|
|
145
|
-
Requires-Dist: yamlscript; extra == "all"
|
|
146
|
-
Requires-Dist: tokenizers; extra == "all"
|
|
147
|
-
Requires-Dist: deepmerge; extra == "all"
|
|
148
|
-
Requires-Dist: sre_yield; extra == "all"
|
|
149
|
-
Requires-Dist: diskcache; extra == "all"
|
|
131
|
+
Requires-Dist: contexttimer; extra == "all"
|
|
132
|
+
Requires-Dist: tabulate; extra == "all"
|
|
150
133
|
Requires-Dist: transformers[sentencepiece]; extra == "all"
|
|
151
|
-
Requires-Dist:
|
|
134
|
+
Requires-Dist: peft; extra == "all"
|
|
135
|
+
Requires-Dist: html2text; extra == "all"
|
|
136
|
+
Requires-Dist: pymupdf; extra == "all"
|
|
137
|
+
Requires-Dist: torchvision; extra == "all"
|
|
138
|
+
Requires-Dist: docker; extra == "all"
|
|
139
|
+
Requires-Dist: openai; extra == "all"
|
|
140
|
+
Requires-Dist: json_repair; extra == "all"
|
|
141
|
+
Requires-Dist: semver; extra == "all"
|
|
152
142
|
Requires-Dist: Unidecode; extra == "all"
|
|
153
|
-
Requires-Dist:
|
|
154
|
-
Requires-Dist: logfire; extra == "all"
|
|
155
|
-
Requires-Dist: logfire[fastapi]; extra == "all"
|
|
143
|
+
Requires-Dist: httpx_retries; extra == "all"
|
|
156
144
|
Requires-Dist: pydantic; extra == "all"
|
|
157
|
-
Requires-Dist:
|
|
158
|
-
Requires-Dist: dnspython[doh]; extra == "all"
|
|
159
|
-
Requires-Dist: pydevd-pycharm~=251.25410.159; extra == "all"
|
|
160
|
-
Requires-Dist: google-auth-httplib2; extra == "all"
|
|
145
|
+
Requires-Dist: pyyaml; extra == "all"
|
|
161
146
|
Requires-Dist: pymupdf4llm; extra == "all"
|
|
162
|
-
Requires-Dist:
|
|
163
|
-
Requires-Dist:
|
|
147
|
+
Requires-Dist: regex; extra == "all"
|
|
148
|
+
Requires-Dist: bokeh; extra == "all"
|
|
149
|
+
Requires-Dist: sre_yield; extra == "all"
|
|
164
150
|
Requires-Dist: pydantic-settings; extra == "all"
|
|
151
|
+
Requires-Dist: distributed; extra == "all"
|
|
152
|
+
Requires-Dist: openpyxl; extra == "all"
|
|
165
153
|
Requires-Dist: huggingface_hub; extra == "all"
|
|
166
|
-
Requires-Dist:
|
|
167
|
-
Requires-Dist:
|
|
168
|
-
Requires-Dist: pymupdf; extra == "all"
|
|
154
|
+
Requires-Dist: filetype; extra == "all"
|
|
155
|
+
Requires-Dist: yamlscript; extra == "all"
|
|
169
156
|
Requires-Dist: fastapi; extra == "all"
|
|
170
|
-
Requires-Dist: logfire[httpx]; extra == "all"
|
|
171
|
-
Requires-Dist: contexttimer; extra == "all"
|
|
172
|
-
Requires-Dist: httpx_retries; extra == "all"
|
|
173
|
-
Requires-Dist: dask[bag]; extra == "all"
|
|
174
|
-
Requires-Dist: peft; extra == "all"
|
|
175
|
-
Requires-Dist: distributed; extra == "all"
|
|
176
|
-
Requires-Dist: docker; extra == "all"
|
|
177
|
-
Requires-Dist: faker; extra == "all"
|
|
178
|
-
Requires-Dist: cachetools; extra == "all"
|
|
179
157
|
Requires-Dist: torchaudio; extra == "all"
|
|
180
|
-
Requires-Dist:
|
|
181
|
-
Requires-Dist:
|
|
182
|
-
Requires-Dist:
|
|
158
|
+
Requires-Dist: google-api-python-client; extra == "all"
|
|
159
|
+
Requires-Dist: dask[bag]; extra == "all"
|
|
160
|
+
Requires-Dist: google-auth; extra == "all"
|
|
161
|
+
Requires-Dist: pydevd-pycharm~=251.25410.159; extra == "all"
|
|
183
162
|
Requires-Dist: flet-video; extra == "all"
|
|
163
|
+
Requires-Dist: sentence_transformers; extra == "all"
|
|
164
|
+
Requires-Dist: ollama; extra == "all"
|
|
165
|
+
Requires-Dist: google-auth-httplib2; extra == "all"
|
|
166
|
+
Requires-Dist: cachetools; extra == "all"
|
|
167
|
+
Requires-Dist: deepmerge; extra == "all"
|
|
168
|
+
Requires-Dist: google-auth-oauthlib; extra == "all"
|
|
184
169
|
Requires-Dist: flet-webview; extra == "all"
|
|
185
|
-
Requires-Dist:
|
|
170
|
+
Requires-Dist: logfire[httpx]; extra == "all"
|
|
171
|
+
Requires-Dist: logfire[fastapi]; extra == "all"
|
|
172
|
+
Requires-Dist: dnspython[doh]; extra == "all"
|
|
173
|
+
Requires-Dist: httpx; extra == "all"
|
|
174
|
+
Requires-Dist: faker; extra == "all"
|
|
186
175
|
Requires-Dist: pandas; extra == "all"
|
|
187
|
-
Requires-Dist:
|
|
188
|
-
Requires-Dist:
|
|
176
|
+
Requires-Dist: diskcache; extra == "all"
|
|
177
|
+
Requires-Dist: tokenizers; extra == "all"
|
|
178
|
+
Requires-Dist: pydantic-ai[logfire,openai]; extra == "all"
|
|
179
|
+
Requires-Dist: appdirs; extra == "all"
|
|
180
|
+
Requires-Dist: flet[all]; extra == "all"
|
|
181
|
+
Requires-Dist: uvicorn[standard]; extra == "all"
|
|
182
|
+
Requires-Dist: pytest-cov; extra == "all"
|
|
183
|
+
Requires-Dist: logfire; extra == "all"
|
|
189
184
|
Dynamic: author
|
|
190
185
|
Dynamic: author-email
|
|
191
186
|
Dynamic: description
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
__version__ = version.read()
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import fmtr.tools.async_tools as asyncio
|
|
6
2
|
import fmtr.tools.dataclass_tools as dataclass
|
|
7
3
|
import fmtr.tools.datatype_tools as datatype
|
|
8
4
|
import fmtr.tools.environment_tools as env
|
|
@@ -12,26 +8,22 @@ import fmtr.tools.hash_tools as hash
|
|
|
12
8
|
import fmtr.tools.import_tools as import_
|
|
13
9
|
import fmtr.tools.iterator_tools as iterator
|
|
14
10
|
import fmtr.tools.json_tools as json
|
|
11
|
+
import fmtr.tools.logging_tools as logging
|
|
12
|
+
import fmtr.tools.name_tools as name
|
|
13
|
+
import fmtr.tools.packaging_tools as packaging
|
|
15
14
|
import fmtr.tools.path_tools as path
|
|
16
15
|
import fmtr.tools.platform_tools as platform
|
|
17
16
|
import fmtr.tools.random_tools as random
|
|
17
|
+
import fmtr.tools.setup_tools as setup
|
|
18
18
|
import fmtr.tools.string_tools as string
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
import fmtr.tools.packaging_tools as packaging
|
|
23
|
-
from fmtr.tools.logging_tools import logger
|
|
24
|
-
|
|
25
|
-
from fmtr.tools.import_tools import MissingExtraMockModule
|
|
26
|
-
|
|
19
|
+
from fmtr.tools import ai_tools as ai
|
|
20
|
+
from fmtr.tools import dns_tools as dns
|
|
21
|
+
from fmtr.tools import version_tools as version
|
|
27
22
|
from fmtr.tools.constants import Constants
|
|
28
|
-
|
|
23
|
+
from fmtr.tools.import_tools import MissingExtraMockModule
|
|
24
|
+
from fmtr.tools.logging_tools import logger
|
|
29
25
|
# Submodules
|
|
30
26
|
from fmtr.tools.path_tools import Path, PackagePaths, AppPaths
|
|
31
|
-
from fmtr.tools import ai_tools as ai
|
|
32
|
-
from fmtr.tools import dns_tools as dns
|
|
33
|
-
|
|
34
|
-
import fmtr.tools.setup_tools as setup
|
|
35
27
|
from fmtr.tools.setup_tools import Setup, SetupPaths, Dependencies, Tools
|
|
36
28
|
|
|
37
29
|
try:
|
|
@@ -178,3 +170,12 @@ try:
|
|
|
178
170
|
from fmtr.tools.http_tools import Client
|
|
179
171
|
except ImportError as exception:
|
|
180
172
|
http = Client = MissingExtraMockModule('http', exception)
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
def get_version():
|
|
176
|
+
"""
|
|
177
|
+
|
|
178
|
+
Defer reading version
|
|
179
|
+
|
|
180
|
+
"""
|
|
181
|
+
return version.read()
|
|
@@ -3,7 +3,7 @@ from dataclasses import dataclass
|
|
|
3
3
|
from fastapi import FastAPI, Request
|
|
4
4
|
from typing import Callable, List, Optional, Union
|
|
5
5
|
|
|
6
|
-
from fmtr.tools
|
|
6
|
+
from fmtr.tools import environment_tools
|
|
7
7
|
from fmtr.tools.iterator_tools import enlist
|
|
8
8
|
from fmtr.tools.logging_tools import logger
|
|
9
9
|
|
|
@@ -57,7 +57,7 @@ class ApiBase:
|
|
|
57
57
|
for endpoint in self.get_endpoints():
|
|
58
58
|
self.add_endpoint(endpoint)
|
|
59
59
|
|
|
60
|
-
if
|
|
60
|
+
if environment_tools.IS_DEV:
|
|
61
61
|
self.app.exception_handler(Exception)(self.handle_exception)
|
|
62
62
|
|
|
63
63
|
def get_endpoints(self) -> List[Endpoint]:
|
|
@@ -17,6 +17,7 @@ class Constants:
|
|
|
17
17
|
ARROW = '→'
|
|
18
18
|
ARROW_SEP = f' {ARROW} '
|
|
19
19
|
|
|
20
|
+
FMTR_DEV_KEY = 'FMTR_DEV'
|
|
20
21
|
FMTR_LOG_LEVEL_KEY = 'FMTR_LOG_LEVEL'
|
|
21
22
|
FMTR_OBS_API_KEY_KEY = 'FMTR_OBS_API_KEY'
|
|
22
23
|
FMTR_OBS_HOST = 'obs.sv.fmtr.dev'
|
|
@@ -43,3 +44,8 @@ class Constants:
|
|
|
43
44
|
ENTRYPOINTS_DIR = 'entrypoints'
|
|
44
45
|
PACKAGE_EXCLUDE_DIRS = {'data', 'build', 'dist', '.*', '*egg-info*'}
|
|
45
46
|
INIT_FILENAME = '__init__.py'
|
|
47
|
+
|
|
48
|
+
DEVELOPMENT = "development"
|
|
49
|
+
PRODUCTION = "production"
|
|
50
|
+
|
|
51
|
+
INFRA = 'infra'
|
|
@@ -88,7 +88,7 @@ class Plain:
|
|
|
88
88
|
exchange = self.resolve(exchange)
|
|
89
89
|
exchange.response.is_complete = True
|
|
90
90
|
|
|
91
|
-
|
|
91
|
+
self.cache[exchange.key] = exchange.response
|
|
92
92
|
|
|
93
|
-
|
|
93
|
+
logger.info(f'Resolution complete {request.message.id=} {exchange.response.answer=}')
|
|
94
94
|
return exchange
|
|
@@ -76,4 +76,4 @@ get_date = get_getter(date.fromisoformat)
|
|
|
76
76
|
get_datetime = get_getter(datetime.fromisoformat)
|
|
77
77
|
get_path = get_getter(Path)
|
|
78
78
|
|
|
79
|
-
|
|
79
|
+
IS_DEV = get_bool(Constants.FMTR_DEV_KEY, default=False)
|
|
@@ -4,23 +4,26 @@ import os
|
|
|
4
4
|
from fmtr.tools import environment_tools
|
|
5
5
|
from fmtr.tools.constants import Constants
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
if environment_tools.IS_DEV:
|
|
8
|
+
STREAM_DEFAULT = ENVIRONMENT_DEFAULT = Constants.DEVELOPMENT
|
|
9
|
+
else:
|
|
10
|
+
STREAM_DEFAULT = None
|
|
11
|
+
ENVIRONMENT_DEFAULT = Constants.PRODUCTION
|
|
11
12
|
|
|
12
|
-
|
|
13
|
+
IS_DEBUG = environment_tools.get(Constants.FMTR_LOG_LEVEL_KEY, None, converter=str.upper) == 'DEBUG'
|
|
14
|
+
LEVEL_DEFAULT = logging.DEBUG if IS_DEBUG else logging.INFO
|
|
13
15
|
|
|
14
16
|
|
|
15
17
|
def get_logger(name, version=None, host=Constants.FMTR_OBS_HOST, key=None, org=Constants.ORG_NAME,
|
|
16
|
-
stream=STREAM_DEFAULT,
|
|
17
|
-
environment=ENVIRONMENT_DEFAULT, level=LEVEL_DEFAULT):
|
|
18
|
+
stream=STREAM_DEFAULT, environment=ENVIRONMENT_DEFAULT, level=LEVEL_DEFAULT):
|
|
18
19
|
"""
|
|
19
20
|
|
|
20
21
|
Get a pre-configured logfire logger, if dependency is present, otherwise default to native logger.
|
|
21
22
|
|
|
22
23
|
"""
|
|
23
24
|
|
|
25
|
+
stream = stream or name
|
|
26
|
+
|
|
24
27
|
try:
|
|
25
28
|
import logfire
|
|
26
29
|
except ImportError:
|
|
@@ -65,7 +68,8 @@ def get_logger(name, version=None, host=Constants.FMTR_OBS_HOST, key=None, org=C
|
|
|
65
68
|
)
|
|
66
69
|
|
|
67
70
|
if key is None:
|
|
68
|
-
|
|
71
|
+
msg = f'Observability dependencies installed, but "{Constants.FMTR_OBS_API_KEY_KEY}" not set. Cloud observability will be disabled.'
|
|
72
|
+
logger.warning(msg)
|
|
69
73
|
|
|
70
74
|
return logger
|
|
71
75
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
1.3.11
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
from fmtr.tools.import_tools import MissingExtraMockModule
|
|
2
|
+
|
|
3
|
+
from fmtr.tools.version_tools.version_tools import read, read_path, get
|
|
4
|
+
|
|
5
|
+
try:
|
|
6
|
+
import semver
|
|
7
|
+
|
|
8
|
+
semver = semver
|
|
9
|
+
parse = semver.VersionInfo.parse
|
|
10
|
+
|
|
11
|
+
except ImportError as exception:
|
|
12
|
+
semver = parse = MissingExtraMockModule('version.dev', exception)
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
from fmtr.tools import environment_tools as env
|
|
2
|
+
from fmtr.tools.constants import Constants
|
|
3
|
+
from fmtr.tools.inspection_tools import get_call_path
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def read() -> str:
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
Read a generic version file from the calling package path.
|
|
10
|
+
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
path = get_call_path(offset=2).parent / Constants.FILENAME_VERSION
|
|
14
|
+
return read_path(path)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def read_path(path) -> str:
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
Read in version from specified path
|
|
21
|
+
|
|
22
|
+
"""
|
|
23
|
+
from fmtr.tools.tools import Constants
|
|
24
|
+
text = path.read_text(encoding=Constants.ENCODING).strip()
|
|
25
|
+
|
|
26
|
+
text = get(text)
|
|
27
|
+
return text
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def get(text) -> str:
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
Optionally add dev build info to raw version string.
|
|
34
|
+
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
if not env.IS_DEV:
|
|
38
|
+
return text
|
|
39
|
+
|
|
40
|
+
import datetime
|
|
41
|
+
from fmtr.tools.tools import Constants
|
|
42
|
+
from fmtr.tools.version_tools import parse
|
|
43
|
+
|
|
44
|
+
timestamp = datetime.datetime.now(datetime.timezone.utc).strftime(Constants.DATETIME_SEMVER_BUILD_FORMAT)
|
|
45
|
+
|
|
46
|
+
version = parse(text)
|
|
47
|
+
version = version.bump_patch()
|
|
48
|
+
version = version.replace(prerelease=Constants.DEVELOPMENT, build=timestamp)
|
|
49
|
+
text = str(version)
|
|
50
|
+
|
|
51
|
+
return text
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fmtr.tools
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.11
|
|
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
|
|
@@ -15,7 +15,6 @@ Requires-Dist: yamlscript; extra == "yaml"
|
|
|
15
15
|
Requires-Dist: pyyaml; extra == "yaml"
|
|
16
16
|
Provides-Extra: logging
|
|
17
17
|
Requires-Dist: logfire; extra == "logging"
|
|
18
|
-
Requires-Dist: semver; extra == "logging"
|
|
19
18
|
Provides-Extra: parallel
|
|
20
19
|
Requires-Dist: dask[bag]; extra == "parallel"
|
|
21
20
|
Requires-Dist: distributed; extra == "parallel"
|
|
@@ -27,7 +26,6 @@ Requires-Dist: faker; extra == "augmentation"
|
|
|
27
26
|
Requires-Dist: sre_yield; extra == "augmentation"
|
|
28
27
|
Provides-Extra: process
|
|
29
28
|
Requires-Dist: logfire; extra == "process"
|
|
30
|
-
Requires-Dist: semver; extra == "process"
|
|
31
29
|
Provides-Extra: profiling
|
|
32
30
|
Requires-Dist: contexttimer; extra == "profiling"
|
|
33
31
|
Provides-Extra: docker-api
|
|
@@ -35,7 +33,8 @@ Requires-Dist: docker; extra == "docker-api"
|
|
|
35
33
|
Provides-Extra: unicode
|
|
36
34
|
Requires-Dist: Unidecode; extra == "unicode"
|
|
37
35
|
Provides-Extra: version
|
|
38
|
-
|
|
36
|
+
Provides-Extra: version-dev
|
|
37
|
+
Requires-Dist: semver; extra == "version-dev"
|
|
39
38
|
Provides-Extra: spaces
|
|
40
39
|
Requires-Dist: tinynetrc; extra == "spaces"
|
|
41
40
|
Provides-Extra: netrc
|
|
@@ -48,7 +47,6 @@ Provides-Extra: api
|
|
|
48
47
|
Requires-Dist: fastapi; extra == "api"
|
|
49
48
|
Requires-Dist: uvicorn[standard]; extra == "api"
|
|
50
49
|
Requires-Dist: logfire; extra == "api"
|
|
51
|
-
Requires-Dist: semver; extra == "api"
|
|
52
50
|
Requires-Dist: pydantic; extra == "api"
|
|
53
51
|
Requires-Dist: logfire[fastapi]; extra == "api"
|
|
54
52
|
Provides-Extra: ai
|
|
@@ -63,7 +61,6 @@ Provides-Extra: openai-api
|
|
|
63
61
|
Requires-Dist: openai; extra == "openai-api"
|
|
64
62
|
Provides-Extra: ai-client
|
|
65
63
|
Requires-Dist: logfire; extra == "ai-client"
|
|
66
|
-
Requires-Dist: semver; extra == "ai-client"
|
|
67
64
|
Requires-Dist: pydantic; extra == "ai-client"
|
|
68
65
|
Requires-Dist: openai; extra == "ai-client"
|
|
69
66
|
Requires-Dist: pydantic-ai[logfire,openai]; extra == "ai-client"
|
|
@@ -118,7 +115,6 @@ Requires-Dist: dnspython[doh]; extra == "dns"
|
|
|
118
115
|
Requires-Dist: httpx; extra == "dns"
|
|
119
116
|
Requires-Dist: httpx_retries; extra == "dns"
|
|
120
117
|
Requires-Dist: logfire; extra == "dns"
|
|
121
|
-
Requires-Dist: semver; extra == "dns"
|
|
122
118
|
Requires-Dist: logfire[httpx]; extra == "dns"
|
|
123
119
|
Provides-Extra: patterns
|
|
124
120
|
Requires-Dist: regex; extra == "patterns"
|
|
@@ -126,66 +122,65 @@ Provides-Extra: http
|
|
|
126
122
|
Requires-Dist: httpx; extra == "http"
|
|
127
123
|
Requires-Dist: httpx_retries; extra == "http"
|
|
128
124
|
Requires-Dist: logfire; extra == "http"
|
|
129
|
-
Requires-Dist: semver; extra == "http"
|
|
130
125
|
Requires-Dist: logfire[httpx]; extra == "http"
|
|
131
126
|
Provides-Extra: setup
|
|
132
127
|
Requires-Dist: setuptools; extra == "setup"
|
|
133
128
|
Provides-Extra: all
|
|
134
|
-
Requires-Dist:
|
|
135
|
-
Requires-Dist: json_repair; extra == "all"
|
|
136
|
-
Requires-Dist: httpx; extra == "all"
|
|
137
|
-
Requires-Dist: openai; extra == "all"
|
|
138
|
-
Requires-Dist: openpyxl; extra == "all"
|
|
139
|
-
Requires-Dist: flet[all]; extra == "all"
|
|
140
|
-
Requires-Dist: regex; extra == "all"
|
|
141
|
-
Requires-Dist: tabulate; extra == "all"
|
|
129
|
+
Requires-Dist: setuptools; extra == "all"
|
|
142
130
|
Requires-Dist: tinynetrc; extra == "all"
|
|
143
|
-
Requires-Dist:
|
|
144
|
-
Requires-Dist:
|
|
145
|
-
Requires-Dist: yamlscript; extra == "all"
|
|
146
|
-
Requires-Dist: tokenizers; extra == "all"
|
|
147
|
-
Requires-Dist: deepmerge; extra == "all"
|
|
148
|
-
Requires-Dist: sre_yield; extra == "all"
|
|
149
|
-
Requires-Dist: diskcache; extra == "all"
|
|
131
|
+
Requires-Dist: contexttimer; extra == "all"
|
|
132
|
+
Requires-Dist: tabulate; extra == "all"
|
|
150
133
|
Requires-Dist: transformers[sentencepiece]; extra == "all"
|
|
151
|
-
Requires-Dist:
|
|
134
|
+
Requires-Dist: peft; extra == "all"
|
|
135
|
+
Requires-Dist: html2text; extra == "all"
|
|
136
|
+
Requires-Dist: pymupdf; extra == "all"
|
|
137
|
+
Requires-Dist: torchvision; extra == "all"
|
|
138
|
+
Requires-Dist: docker; extra == "all"
|
|
139
|
+
Requires-Dist: openai; extra == "all"
|
|
140
|
+
Requires-Dist: json_repair; extra == "all"
|
|
141
|
+
Requires-Dist: semver; extra == "all"
|
|
152
142
|
Requires-Dist: Unidecode; extra == "all"
|
|
153
|
-
Requires-Dist:
|
|
154
|
-
Requires-Dist: logfire; extra == "all"
|
|
155
|
-
Requires-Dist: logfire[fastapi]; extra == "all"
|
|
143
|
+
Requires-Dist: httpx_retries; extra == "all"
|
|
156
144
|
Requires-Dist: pydantic; extra == "all"
|
|
157
|
-
Requires-Dist:
|
|
158
|
-
Requires-Dist: dnspython[doh]; extra == "all"
|
|
159
|
-
Requires-Dist: pydevd-pycharm~=251.25410.159; extra == "all"
|
|
160
|
-
Requires-Dist: google-auth-httplib2; extra == "all"
|
|
145
|
+
Requires-Dist: pyyaml; extra == "all"
|
|
161
146
|
Requires-Dist: pymupdf4llm; extra == "all"
|
|
162
|
-
Requires-Dist:
|
|
163
|
-
Requires-Dist:
|
|
147
|
+
Requires-Dist: regex; extra == "all"
|
|
148
|
+
Requires-Dist: bokeh; extra == "all"
|
|
149
|
+
Requires-Dist: sre_yield; extra == "all"
|
|
164
150
|
Requires-Dist: pydantic-settings; extra == "all"
|
|
151
|
+
Requires-Dist: distributed; extra == "all"
|
|
152
|
+
Requires-Dist: openpyxl; extra == "all"
|
|
165
153
|
Requires-Dist: huggingface_hub; extra == "all"
|
|
166
|
-
Requires-Dist:
|
|
167
|
-
Requires-Dist:
|
|
168
|
-
Requires-Dist: pymupdf; extra == "all"
|
|
154
|
+
Requires-Dist: filetype; extra == "all"
|
|
155
|
+
Requires-Dist: yamlscript; extra == "all"
|
|
169
156
|
Requires-Dist: fastapi; extra == "all"
|
|
170
|
-
Requires-Dist: logfire[httpx]; extra == "all"
|
|
171
|
-
Requires-Dist: contexttimer; extra == "all"
|
|
172
|
-
Requires-Dist: httpx_retries; extra == "all"
|
|
173
|
-
Requires-Dist: dask[bag]; extra == "all"
|
|
174
|
-
Requires-Dist: peft; extra == "all"
|
|
175
|
-
Requires-Dist: distributed; extra == "all"
|
|
176
|
-
Requires-Dist: docker; extra == "all"
|
|
177
|
-
Requires-Dist: faker; extra == "all"
|
|
178
|
-
Requires-Dist: cachetools; extra == "all"
|
|
179
157
|
Requires-Dist: torchaudio; extra == "all"
|
|
180
|
-
Requires-Dist:
|
|
181
|
-
Requires-Dist:
|
|
182
|
-
Requires-Dist:
|
|
158
|
+
Requires-Dist: google-api-python-client; extra == "all"
|
|
159
|
+
Requires-Dist: dask[bag]; extra == "all"
|
|
160
|
+
Requires-Dist: google-auth; extra == "all"
|
|
161
|
+
Requires-Dist: pydevd-pycharm~=251.25410.159; extra == "all"
|
|
183
162
|
Requires-Dist: flet-video; extra == "all"
|
|
163
|
+
Requires-Dist: sentence_transformers; extra == "all"
|
|
164
|
+
Requires-Dist: ollama; extra == "all"
|
|
165
|
+
Requires-Dist: google-auth-httplib2; extra == "all"
|
|
166
|
+
Requires-Dist: cachetools; extra == "all"
|
|
167
|
+
Requires-Dist: deepmerge; extra == "all"
|
|
168
|
+
Requires-Dist: google-auth-oauthlib; extra == "all"
|
|
184
169
|
Requires-Dist: flet-webview; extra == "all"
|
|
185
|
-
Requires-Dist:
|
|
170
|
+
Requires-Dist: logfire[httpx]; extra == "all"
|
|
171
|
+
Requires-Dist: logfire[fastapi]; extra == "all"
|
|
172
|
+
Requires-Dist: dnspython[doh]; extra == "all"
|
|
173
|
+
Requires-Dist: httpx; extra == "all"
|
|
174
|
+
Requires-Dist: faker; extra == "all"
|
|
186
175
|
Requires-Dist: pandas; extra == "all"
|
|
187
|
-
Requires-Dist:
|
|
188
|
-
Requires-Dist:
|
|
176
|
+
Requires-Dist: diskcache; extra == "all"
|
|
177
|
+
Requires-Dist: tokenizers; extra == "all"
|
|
178
|
+
Requires-Dist: pydantic-ai[logfire,openai]; extra == "all"
|
|
179
|
+
Requires-Dist: appdirs; extra == "all"
|
|
180
|
+
Requires-Dist: flet[all]; extra == "all"
|
|
181
|
+
Requires-Dist: uvicorn[standard]; extra == "all"
|
|
182
|
+
Requires-Dist: pytest-cov; extra == "all"
|
|
183
|
+
Requires-Dist: logfire; extra == "all"
|
|
189
184
|
Dynamic: author
|
|
190
185
|
Dynamic: author-email
|
|
191
186
|
Dynamic: description
|
|
@@ -49,7 +49,6 @@ setup.py
|
|
|
49
49
|
./fmtr/tools/tools.py
|
|
50
50
|
./fmtr/tools/unicode_tools.py
|
|
51
51
|
./fmtr/tools/version
|
|
52
|
-
./fmtr/tools/version_tools.py
|
|
53
52
|
./fmtr/tools/yaml_tools.py
|
|
54
53
|
./fmtr/tools/ai_tools/__init__.py
|
|
55
54
|
./fmtr/tools/ai_tools/agentic_tools.py
|
|
@@ -79,6 +78,8 @@ setup.py
|
|
|
79
78
|
./fmtr/tools/tests/test_json.py
|
|
80
79
|
./fmtr/tools/tests/test_path.py
|
|
81
80
|
./fmtr/tools/tests/test_yaml.py
|
|
81
|
+
./fmtr/tools/version_tools/__init__.py
|
|
82
|
+
./fmtr/tools/version_tools/version_tools.py
|
|
82
83
|
fmtr.tools.egg-info/PKG-INFO
|
|
83
84
|
fmtr.tools.egg-info/SOURCES.txt
|
|
84
85
|
fmtr.tools.egg-info/dependency_links.txt
|
|
@@ -132,7 +133,6 @@ fmtr/tools/tokenization_tools.py
|
|
|
132
133
|
fmtr/tools/tools.py
|
|
133
134
|
fmtr/tools/unicode_tools.py
|
|
134
135
|
fmtr/tools/version
|
|
135
|
-
fmtr/tools/version_tools.py
|
|
136
136
|
fmtr/tools/yaml_tools.py
|
|
137
137
|
fmtr/tools/ai_tools/__init__.py
|
|
138
138
|
fmtr/tools/ai_tools/agentic_tools.py
|
|
@@ -161,4 +161,6 @@ fmtr/tools/tests/test_datatype.py
|
|
|
161
161
|
fmtr/tools/tests/test_environment.py
|
|
162
162
|
fmtr/tools/tests/test_json.py
|
|
163
163
|
fmtr/tools/tests/test_path.py
|
|
164
|
-
fmtr/tools/tests/test_yaml.py
|
|
164
|
+
fmtr/tools/tests/test_yaml.py
|
|
165
|
+
fmtr/tools/version_tools/__init__.py
|
|
166
|
+
fmtr/tools/version_tools/version_tools.py
|
|
@@ -8,74 +8,72 @@ pydantic
|
|
|
8
8
|
|
|
9
9
|
[ai.client]
|
|
10
10
|
logfire
|
|
11
|
-
semver
|
|
12
11
|
pydantic
|
|
13
12
|
openai
|
|
14
13
|
pydantic-ai[logfire,openai]
|
|
15
14
|
ollama
|
|
16
15
|
|
|
17
16
|
[all]
|
|
18
|
-
|
|
19
|
-
json_repair
|
|
20
|
-
httpx
|
|
21
|
-
openai
|
|
22
|
-
openpyxl
|
|
23
|
-
flet[all]
|
|
24
|
-
regex
|
|
25
|
-
tabulate
|
|
17
|
+
setuptools
|
|
26
18
|
tinynetrc
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
yamlscript
|
|
30
|
-
tokenizers
|
|
31
|
-
deepmerge
|
|
32
|
-
sre_yield
|
|
33
|
-
diskcache
|
|
19
|
+
contexttimer
|
|
20
|
+
tabulate
|
|
34
21
|
transformers[sentencepiece]
|
|
35
|
-
|
|
22
|
+
peft
|
|
23
|
+
html2text
|
|
24
|
+
pymupdf
|
|
25
|
+
torchvision
|
|
26
|
+
docker
|
|
27
|
+
openai
|
|
28
|
+
json_repair
|
|
29
|
+
semver
|
|
36
30
|
Unidecode
|
|
37
|
-
|
|
38
|
-
logfire
|
|
39
|
-
logfire[fastapi]
|
|
31
|
+
httpx_retries
|
|
40
32
|
pydantic
|
|
41
|
-
|
|
42
|
-
dnspython[doh]
|
|
43
|
-
pydevd-pycharm~=251.25410.159
|
|
44
|
-
google-auth-httplib2
|
|
33
|
+
pyyaml
|
|
45
34
|
pymupdf4llm
|
|
46
|
-
|
|
47
|
-
|
|
35
|
+
regex
|
|
36
|
+
bokeh
|
|
37
|
+
sre_yield
|
|
48
38
|
pydantic-settings
|
|
39
|
+
distributed
|
|
40
|
+
openpyxl
|
|
49
41
|
huggingface_hub
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
pymupdf
|
|
42
|
+
filetype
|
|
43
|
+
yamlscript
|
|
53
44
|
fastapi
|
|
54
|
-
logfire[httpx]
|
|
55
|
-
contexttimer
|
|
56
|
-
httpx_retries
|
|
57
|
-
dask[bag]
|
|
58
|
-
peft
|
|
59
|
-
distributed
|
|
60
|
-
docker
|
|
61
|
-
faker
|
|
62
|
-
cachetools
|
|
63
45
|
torchaudio
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
46
|
+
google-api-python-client
|
|
47
|
+
dask[bag]
|
|
48
|
+
google-auth
|
|
49
|
+
pydevd-pycharm~=251.25410.159
|
|
67
50
|
flet-video
|
|
51
|
+
sentence_transformers
|
|
52
|
+
ollama
|
|
53
|
+
google-auth-httplib2
|
|
54
|
+
cachetools
|
|
55
|
+
deepmerge
|
|
56
|
+
google-auth-oauthlib
|
|
68
57
|
flet-webview
|
|
69
|
-
|
|
58
|
+
logfire[httpx]
|
|
59
|
+
logfire[fastapi]
|
|
60
|
+
dnspython[doh]
|
|
61
|
+
httpx
|
|
62
|
+
faker
|
|
70
63
|
pandas
|
|
71
|
-
|
|
72
|
-
|
|
64
|
+
diskcache
|
|
65
|
+
tokenizers
|
|
66
|
+
pydantic-ai[logfire,openai]
|
|
67
|
+
appdirs
|
|
68
|
+
flet[all]
|
|
69
|
+
uvicorn[standard]
|
|
70
|
+
pytest-cov
|
|
71
|
+
logfire
|
|
73
72
|
|
|
74
73
|
[api]
|
|
75
74
|
fastapi
|
|
76
75
|
uvicorn[standard]
|
|
77
76
|
logfire
|
|
78
|
-
semver
|
|
79
77
|
pydantic
|
|
80
78
|
logfire[fastapi]
|
|
81
79
|
|
|
@@ -98,7 +96,6 @@ dnspython[doh]
|
|
|
98
96
|
httpx
|
|
99
97
|
httpx_retries
|
|
100
98
|
logfire
|
|
101
|
-
semver
|
|
102
99
|
logfire[httpx]
|
|
103
100
|
|
|
104
101
|
[docker.api]
|
|
@@ -120,7 +117,6 @@ html2text
|
|
|
120
117
|
httpx
|
|
121
118
|
httpx_retries
|
|
122
119
|
logfire
|
|
123
|
-
semver
|
|
124
120
|
logfire[httpx]
|
|
125
121
|
|
|
126
122
|
[interface]
|
|
@@ -134,7 +130,6 @@ json_repair
|
|
|
134
130
|
|
|
135
131
|
[logging]
|
|
136
132
|
logfire
|
|
137
|
-
semver
|
|
138
133
|
|
|
139
134
|
[merging]
|
|
140
135
|
deepmerge
|
|
@@ -171,7 +166,6 @@ pymupdf4llm
|
|
|
171
166
|
|
|
172
167
|
[process]
|
|
173
168
|
logfire
|
|
174
|
-
semver
|
|
175
169
|
|
|
176
170
|
[profiling]
|
|
177
171
|
contexttimer
|
|
@@ -209,6 +203,8 @@ tokenizers
|
|
|
209
203
|
Unidecode
|
|
210
204
|
|
|
211
205
|
[version]
|
|
206
|
+
|
|
207
|
+
[version.dev]
|
|
212
208
|
semver
|
|
213
209
|
|
|
214
210
|
[yaml]
|
|
@@ -12,7 +12,8 @@ DEPENDENCIES = {
|
|
|
12
12
|
'profiling': ['contexttimer'],
|
|
13
13
|
'docker.api': ['docker'],
|
|
14
14
|
'unicode': ['Unidecode'],
|
|
15
|
-
'version': [
|
|
15
|
+
'version': [],
|
|
16
|
+
'version.dev': ['semver'],
|
|
16
17
|
'spaces': ['netrc'],
|
|
17
18
|
'netrc': ['tinynetrc'],
|
|
18
19
|
'hfh': ['huggingface_hub'],
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
1.3.9
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
from fmtr.tools.import_tools import MissingExtraMockModule
|
|
2
|
-
from fmtr.tools.inspection_tools import get_call_path
|
|
3
|
-
|
|
4
|
-
try:
|
|
5
|
-
import semver
|
|
6
|
-
|
|
7
|
-
semver = semver
|
|
8
|
-
parse = semver.VersionInfo.parse
|
|
9
|
-
except ImportError as exception:
|
|
10
|
-
# Special case to allow module import.
|
|
11
|
-
# Should be slit out into separate version.dev subpackage
|
|
12
|
-
parse = MissingExtraMockModule('version', exception)
|
|
13
|
-
semver = MissingExtraMockModule('version', exception)
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
def read() -> str:
|
|
17
|
-
"""
|
|
18
|
-
|
|
19
|
-
Read a generic version file from the calling package path.
|
|
20
|
-
|
|
21
|
-
"""
|
|
22
|
-
|
|
23
|
-
path = get_call_path(offset=2).parent / 'version'
|
|
24
|
-
return read_path(path)
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
def read_path(path) -> str:
|
|
28
|
-
"""
|
|
29
|
-
|
|
30
|
-
Read in version from specified path
|
|
31
|
-
|
|
32
|
-
"""
|
|
33
|
-
from fmtr.tools.tools import Constants
|
|
34
|
-
text = path.read_text(encoding=Constants.ENCODING).strip()
|
|
35
|
-
|
|
36
|
-
text = get(text)
|
|
37
|
-
return text
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
def get(text) -> str:
|
|
41
|
-
"""
|
|
42
|
-
|
|
43
|
-
Optionally add dev build info to raw version string.
|
|
44
|
-
|
|
45
|
-
"""
|
|
46
|
-
import os
|
|
47
|
-
from fmtr.tools import datatype_tools
|
|
48
|
-
|
|
49
|
-
is_dev = datatype_tools.to_bool(os.getenv('FMTR_DEV', default=False))
|
|
50
|
-
|
|
51
|
-
if is_dev:
|
|
52
|
-
import datetime
|
|
53
|
-
from fmtr.tools.tools import Constants
|
|
54
|
-
|
|
55
|
-
timestamp = datetime.datetime.now(datetime.timezone.utc).strftime(Constants.DATETIME_SEMVER_BUILD_FORMAT)
|
|
56
|
-
|
|
57
|
-
version = parse(text)
|
|
58
|
-
version = version.bump_patch()
|
|
59
|
-
version = version.replace(prerelease='dev', build=timestamp)
|
|
60
|
-
text = str(version)
|
|
61
|
-
|
|
62
|
-
return text
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|