fmtr.tools 1.1.19__py3-none-any.whl → 1.1.21__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/__init__.py +2 -1
- fmtr/tools/path_tools/path_tools.py +8 -2
- fmtr/tools/setup_tools.py +21 -25
- fmtr/tools/version +1 -1
- {fmtr_tools-1.1.19.dist-info → fmtr_tools-1.1.21.dist-info}/METADATA +43 -43
- {fmtr_tools-1.1.19.dist-info → fmtr_tools-1.1.21.dist-info}/RECORD +10 -10
- {fmtr_tools-1.1.19.dist-info → fmtr_tools-1.1.21.dist-info}/WHEEL +0 -0
- {fmtr_tools-1.1.19.dist-info → fmtr_tools-1.1.21.dist-info}/entry_points.txt +0 -0
- {fmtr_tools-1.1.19.dist-info → fmtr_tools-1.1.21.dist-info}/licenses/LICENSE +0 -0
- {fmtr_tools-1.1.19.dist-info → fmtr_tools-1.1.21.dist-info}/top_level.txt +0 -0
fmtr/tools/__init__.py
CHANGED
|
@@ -177,5 +177,6 @@ except ImportError as exception:
|
|
|
177
177
|
|
|
178
178
|
try:
|
|
179
179
|
from fmtr.tools import setup_tools as setup
|
|
180
|
+
from fmtr.tools.setup_tools import Setup, SetupPaths, Dependencies
|
|
180
181
|
except ImportError as exception:
|
|
181
|
-
setup = MissingExtraMockModule('setup', exception)
|
|
182
|
+
setup = Setup = SetupPaths = Dependencies = MissingExtraMockModule('setup', exception)
|
|
@@ -177,8 +177,14 @@ class Path(type(Path())):
|
|
|
177
177
|
kind = path.guess(str(self.absolute()))
|
|
178
178
|
return kind
|
|
179
179
|
|
|
180
|
+
@property
|
|
181
|
+
def children(self):
|
|
182
|
+
if not self.is_dir():
|
|
183
|
+
return None
|
|
184
|
+
return sorted(self.iterdir(), key=lambda x: x.is_dir(), reverse=True)
|
|
185
|
+
|
|
180
186
|
|
|
181
|
-
class
|
|
187
|
+
class FromCallerMixin:
|
|
182
188
|
"""
|
|
183
189
|
|
|
184
190
|
|
|
@@ -190,7 +196,7 @@ class PathsBase:
|
|
|
190
196
|
return path
|
|
191
197
|
|
|
192
198
|
|
|
193
|
-
class PackagePaths(
|
|
199
|
+
class PackagePaths(FromCallerMixin):
|
|
194
200
|
"""
|
|
195
201
|
|
|
196
202
|
Canonical paths for a package.
|
fmtr/tools/setup_tools.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
from datetime import datetime
|
|
2
|
+
from fnmatch import fnmatch
|
|
2
3
|
from functools import cached_property
|
|
3
4
|
from itertools import chain
|
|
4
5
|
from typing import List, Dict
|
|
@@ -7,17 +8,17 @@ from setuptools import find_namespace_packages, find_packages, setup
|
|
|
7
8
|
|
|
8
9
|
from fmtr.tools.constants import Constants
|
|
9
10
|
from fmtr.tools.path_tools import Path
|
|
10
|
-
from fmtr.tools.path_tools.path_tools import
|
|
11
|
+
from fmtr.tools.path_tools.path_tools import FromCallerMixin
|
|
11
12
|
|
|
12
13
|
|
|
13
|
-
class SetupPaths(
|
|
14
|
+
class SetupPaths(FromCallerMixin):
|
|
14
15
|
"""
|
|
15
16
|
|
|
16
17
|
Canonical paths for a package.
|
|
17
18
|
|
|
18
19
|
"""
|
|
19
20
|
|
|
20
|
-
SKIP_DIRS = {'data'}
|
|
21
|
+
SKIP_DIRS = {'data', 'build', 'dist', '.*', '*egg-info*'}
|
|
21
22
|
|
|
22
23
|
def __init__(self, path=None):
|
|
23
24
|
|
|
@@ -51,12 +52,13 @@ class SetupPaths(PathsBase):
|
|
|
51
52
|
|
|
52
53
|
directories = [
|
|
53
54
|
dir for dir in self.repo.iterdir()
|
|
54
|
-
if dir.is_dir()
|
|
55
|
+
if dir.is_dir()
|
|
56
|
+
and not any(fnmatch(dir.name, pattern) for pattern in self.SKIP_DIRS)
|
|
55
57
|
]
|
|
56
58
|
|
|
57
59
|
if len(directories) != 1:
|
|
58
60
|
dirs_str = ', '.join([str(dir) for dir in directories])
|
|
59
|
-
raise ValueError(f'Expected exactly one directory in
|
|
61
|
+
raise ValueError(f'Expected exactly one directory in {self.repo}, found {dirs_str}')
|
|
60
62
|
|
|
61
63
|
target = next(iter(directories))
|
|
62
64
|
|
|
@@ -83,20 +85,28 @@ class SetupPaths(PathsBase):
|
|
|
83
85
|
return name
|
|
84
86
|
|
|
85
87
|
|
|
86
|
-
class Setup:
|
|
88
|
+
class Setup(FromCallerMixin):
|
|
87
89
|
AUTHOR = 'Frontmatter'
|
|
88
90
|
AUTHOR_EMAIL = 'innovative.fowler@mask.pro.fmtr.dev'
|
|
89
91
|
|
|
90
|
-
def __init__(self,
|
|
91
|
-
|
|
92
|
+
def __init__(self, dependencies, paths=None, console_scripts=None, client=None, do_setup=True, **kwargs):
|
|
92
93
|
|
|
93
94
|
self.kwargs = kwargs
|
|
95
|
+
|
|
96
|
+
if type(dependencies) is not Dependencies:
|
|
97
|
+
dependencies = Dependencies(**dependencies)
|
|
94
98
|
self.dependencies = dependencies
|
|
99
|
+
|
|
100
|
+
if not paths:
|
|
101
|
+
paths = SetupPaths(path=self.from_caller())
|
|
95
102
|
self.paths = paths
|
|
96
103
|
|
|
97
104
|
self.client = client
|
|
98
105
|
self.console_scripts = console_scripts
|
|
99
106
|
|
|
107
|
+
if do_setup:
|
|
108
|
+
self.setup()
|
|
109
|
+
|
|
100
110
|
def get_entrypoint_path(self, key, value):
|
|
101
111
|
if value:
|
|
102
112
|
return f'{self.name}.{value}:{key}'
|
|
@@ -164,7 +174,8 @@ class Setup:
|
|
|
164
174
|
def url(self):
|
|
165
175
|
return f'https://github.com/{self.paths.org}/{self.paths.name}'
|
|
166
176
|
|
|
167
|
-
|
|
177
|
+
@property
|
|
178
|
+
def data(self):
|
|
168
179
|
return dict(
|
|
169
180
|
name=self.name,
|
|
170
181
|
version=self.version,
|
|
@@ -183,25 +194,10 @@ class Setup:
|
|
|
183
194
|
) | self.kwargs
|
|
184
195
|
|
|
185
196
|
def setup(self):
|
|
186
|
-
return setup(**self.get_data_setup())
|
|
187
197
|
|
|
188
|
-
|
|
189
|
-
ALL = 'all'
|
|
190
|
-
INSTALL = 'install'
|
|
198
|
+
return setup(**self.data)
|
|
191
199
|
|
|
192
|
-
def __init__(self, console_scripts=None, **kwargs):
|
|
193
|
-
self.kwargs = kwargs
|
|
194
|
-
self._console_scripts = console_scripts
|
|
195
|
-
|
|
196
|
-
@property
|
|
197
|
-
def console_scripts(self):
|
|
198
|
-
return [f'{key} = {value}:{key}' for key, value in self._console_scripts.items()]
|
|
199
200
|
|
|
200
|
-
@property
|
|
201
|
-
def data(self):
|
|
202
|
-
return dict(
|
|
203
|
-
console_scripts=self.console_scripts,
|
|
204
|
-
) | self.kwargs
|
|
205
201
|
|
|
206
202
|
|
|
207
203
|
class Dependencies:
|
fmtr/tools/version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.1.
|
|
1
|
+
1.1.21
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fmtr.tools
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.21
|
|
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
|
|
@@ -9,60 +9,60 @@ License: Copyright © 2025 Frontmatter. All rights reserved.
|
|
|
9
9
|
Description-Content-Type: text/markdown
|
|
10
10
|
License-File: LICENSE
|
|
11
11
|
Provides-Extra: test
|
|
12
|
+
Requires-Dist: tinynetrc; extra == "test"
|
|
13
|
+
Requires-Dist: fastapi; extra == "test"
|
|
14
|
+
Requires-Dist: httpx_retries; extra == "test"
|
|
15
|
+
Requires-Dist: setuptools; extra == "test"
|
|
16
|
+
Requires-Dist: filetype; extra == "test"
|
|
17
|
+
Requires-Dist: faker; extra == "test"
|
|
18
|
+
Requires-Dist: pydevd-pycharm; extra == "test"
|
|
19
|
+
Requires-Dist: pyyaml; extra == "test"
|
|
20
|
+
Requires-Dist: logfire[fastapi]; extra == "test"
|
|
21
|
+
Requires-Dist: google-auth-httplib2; extra == "test"
|
|
22
|
+
Requires-Dist: openai; extra == "test"
|
|
23
|
+
Requires-Dist: diskcache; extra == "test"
|
|
12
24
|
Requires-Dist: bokeh; extra == "test"
|
|
13
|
-
Requires-Dist:
|
|
14
|
-
Requires-Dist: torchvision; extra == "test"
|
|
25
|
+
Requires-Dist: sentence_transformers; extra == "test"
|
|
15
26
|
Requires-Dist: pymupdf4llm; extra == "test"
|
|
16
|
-
Requires-Dist:
|
|
27
|
+
Requires-Dist: distributed; extra == "test"
|
|
28
|
+
Requires-Dist: huggingface_hub; extra == "test"
|
|
29
|
+
Requires-Dist: deepmerge; extra == "test"
|
|
30
|
+
Requires-Dist: transformers[sentencepiece]; extra == "test"
|
|
17
31
|
Requires-Dist: google-auth-oauthlib; extra == "test"
|
|
18
|
-
Requires-Dist:
|
|
19
|
-
Requires-Dist:
|
|
20
|
-
Requires-Dist: uvicorn[standard]; extra == "test"
|
|
21
|
-
Requires-Dist: peft; extra == "test"
|
|
22
|
-
Requires-Dist: torchaudio; extra == "test"
|
|
23
|
-
Requires-Dist: sentence_transformers; extra == "test"
|
|
32
|
+
Requires-Dist: logfire[httpx]; extra == "test"
|
|
33
|
+
Requires-Dist: pydantic; extra == "test"
|
|
24
34
|
Requires-Dist: dask[bag]; extra == "test"
|
|
25
35
|
Requires-Dist: Unidecode; extra == "test"
|
|
26
|
-
Requires-Dist:
|
|
27
|
-
Requires-Dist:
|
|
28
|
-
Requires-Dist:
|
|
29
|
-
Requires-Dist:
|
|
30
|
-
Requires-Dist: json_repair; extra == "test"
|
|
31
|
-
Requires-Dist: google-auth-httplib2; extra == "test"
|
|
36
|
+
Requires-Dist: docker; extra == "test"
|
|
37
|
+
Requires-Dist: google-auth; extra == "test"
|
|
38
|
+
Requires-Dist: contexttimer; extra == "test"
|
|
39
|
+
Requires-Dist: peft; extra == "test"
|
|
32
40
|
Requires-Dist: semver; extra == "test"
|
|
33
|
-
Requires-Dist:
|
|
34
|
-
Requires-Dist:
|
|
35
|
-
Requires-Dist:
|
|
36
|
-
Requires-Dist: dnspython[doh]; extra == "test"
|
|
41
|
+
Requires-Dist: regex; extra == "test"
|
|
42
|
+
Requires-Dist: logfire; extra == "test"
|
|
43
|
+
Requires-Dist: pytest-cov; extra == "test"
|
|
37
44
|
Requires-Dist: yamlscript; extra == "test"
|
|
38
|
-
Requires-Dist:
|
|
45
|
+
Requires-Dist: pandas; extra == "test"
|
|
39
46
|
Requires-Dist: ollama; extra == "test"
|
|
40
|
-
Requires-Dist:
|
|
41
|
-
Requires-Dist:
|
|
42
|
-
Requires-Dist:
|
|
43
|
-
Requires-Dist:
|
|
44
|
-
Requires-Dist:
|
|
45
|
-
Requires-Dist:
|
|
46
|
-
Requires-Dist:
|
|
47
|
-
Requires-Dist: huggingface_hub; extra == "test"
|
|
47
|
+
Requires-Dist: openpyxl; extra == "test"
|
|
48
|
+
Requires-Dist: appdirs; extra == "test"
|
|
49
|
+
Requires-Dist: html2text; extra == "test"
|
|
50
|
+
Requires-Dist: flet-video; extra == "test"
|
|
51
|
+
Requires-Dist: flet[all]; extra == "test"
|
|
52
|
+
Requires-Dist: google-api-python-client; extra == "test"
|
|
53
|
+
Requires-Dist: dnspython[doh]; extra == "test"
|
|
48
54
|
Requires-Dist: pymupdf; extra == "test"
|
|
49
|
-
Requires-Dist: httpx; extra == "test"
|
|
50
|
-
Requires-Dist: filetype; extra == "test"
|
|
51
|
-
Requires-Dist: faker; extra == "test"
|
|
52
|
-
Requires-Dist: httpx_retries; extra == "test"
|
|
53
55
|
Requires-Dist: sre_yield; extra == "test"
|
|
54
|
-
Requires-Dist:
|
|
55
|
-
Requires-Dist: html2text; extra == "test"
|
|
56
|
+
Requires-Dist: pydantic-settings; extra == "test"
|
|
56
57
|
Requires-Dist: tabulate; extra == "test"
|
|
57
|
-
Requires-Dist:
|
|
58
|
-
Requires-Dist:
|
|
59
|
-
Requires-Dist:
|
|
60
|
-
Requires-Dist:
|
|
61
|
-
Requires-Dist:
|
|
58
|
+
Requires-Dist: flet-webview; extra == "test"
|
|
59
|
+
Requires-Dist: httpx; extra == "test"
|
|
60
|
+
Requires-Dist: tokenizers; extra == "test"
|
|
61
|
+
Requires-Dist: torchvision; extra == "test"
|
|
62
|
+
Requires-Dist: json_repair; extra == "test"
|
|
62
63
|
Requires-Dist: pydantic-ai[logfire,openai]; extra == "test"
|
|
63
|
-
Requires-Dist:
|
|
64
|
-
Requires-Dist:
|
|
65
|
-
Requires-Dist: openpyxl; extra == "test"
|
|
64
|
+
Requires-Dist: torchaudio; extra == "test"
|
|
65
|
+
Requires-Dist: uvicorn[standard]; extra == "test"
|
|
66
66
|
Provides-Extra: yaml
|
|
67
67
|
Requires-Dist: yamlscript; extra == "yaml"
|
|
68
68
|
Requires-Dist: pyyaml; extra == "yaml"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
fmtr/tools/__init__.py,sha256=
|
|
1
|
+
fmtr/tools/__init__.py,sha256=v4XtEHm35sT7Z7-kKdFdBPXw_yFtxF0GOCx4q4y5Qg4,5790
|
|
2
2
|
fmtr/tools/api_tools.py,sha256=w8Zrp_EwN5KlUghwLoTCXo4z1irg5tAsReCqDLjASfE,2133
|
|
3
3
|
fmtr/tools/async_tools.py,sha256=ewz757WcveQJd-G5SVr2JDOQVbdLGecCgl-tsBGVZz4,284
|
|
4
4
|
fmtr/tools/augmentation_tools.py,sha256=-6ESbO4CDlKqVOV1J1V6qBeoBMzbFIinkDHRHnCBej0,55
|
|
@@ -39,14 +39,14 @@ fmtr/tools/profiling_tools.py,sha256=jpXVjaNKPydTasEQVNXvxzGtMhXPit08AnJddkU8uIc
|
|
|
39
39
|
fmtr/tools/random_tools.py,sha256=4VlQdk5THbR8ka4pZaLbk_ZO_4yy6PF_lHZes_rgenY,2223
|
|
40
40
|
fmtr/tools/semantic_tools.py,sha256=cxY9NSAHWj4nEc6Oj4qA1omR3dWbl2OuH7_PkINc6_E,1386
|
|
41
41
|
fmtr/tools/settings_tools.py,sha256=o11W3T60UZSvCTkh_eEQq1Mx74GycQ6JxUr0plBDbsk,2356
|
|
42
|
-
fmtr/tools/setup_tools.py,sha256=
|
|
42
|
+
fmtr/tools/setup_tools.py,sha256=uaT8Ejc2yBLATTHR_51vGIoU8yDOBgXLmFnxY5c23V4,7041
|
|
43
43
|
fmtr/tools/spaces_tools.py,sha256=D_he3mve6DruB3OPS6QyzqD05ChHnRTb4buViKPe7To,1099
|
|
44
44
|
fmtr/tools/string_tools.py,sha256=mjO7NSqhtYMtnX7fKb8eXZ7MO2lXWGMl0kXxnZznupM,3764
|
|
45
45
|
fmtr/tools/tabular_tools.py,sha256=tpIpZzYku1HcJrHZJL6BC39LmN3WUWVhFbK2N7nDVmE,120
|
|
46
46
|
fmtr/tools/tokenization_tools.py,sha256=me-IBzSLyNYejLybwjO9CNB6Mj2NYfKPaOVThXyaGNg,4268
|
|
47
47
|
fmtr/tools/tools.py,sha256=CAsApa1YwVdNE6H66Vjivs_mXYvOas3rh7fPELAnTpk,795
|
|
48
48
|
fmtr/tools/unicode_tools.py,sha256=yS_9wpu8ogNoiIL7s1G_8bETFFO_YQlo4LNPv1NLDeY,52
|
|
49
|
-
fmtr/tools/version,sha256=
|
|
49
|
+
fmtr/tools/version,sha256=Q9bVQ4J5J33dityoULiym-dEvZSY9uBJ10Hd83OP8yY,6
|
|
50
50
|
fmtr/tools/version_tools.py,sha256=yNs_CGqWpqE4jbK9wsPIi14peJVXYbhIcMqHAFOw3yE,1480
|
|
51
51
|
fmtr/tools/yaml_tools.py,sha256=9kuYChqJelWQIjGlSnK4iDdOWWH06P0gp9jIcRrC3UI,1903
|
|
52
52
|
fmtr/tools/ai_tools/__init__.py,sha256=JZrLuOFNV1A3wvJgonxOgz_4WS-7MfCuowGWA5uYCjs,372
|
|
@@ -54,7 +54,7 @@ fmtr/tools/ai_tools/agentic_tools.py,sha256=YebH7R9ovVo3GzfWAZxY49e2fNt13APDMe29
|
|
|
54
54
|
fmtr/tools/ai_tools/inference_tools.py,sha256=2UP2gXEyOJUjyyV6zmFIYmIxUsh1rXkRH0IbFvr2bRs,11908
|
|
55
55
|
fmtr/tools/path_tools/__init__.py,sha256=v5CpmzXq5Ii90FtcmxAJKiLxmguZMrPnQ_HdT872Np0,443
|
|
56
56
|
fmtr/tools/path_tools/app_path_tools.py,sha256=JrJvtTDd_gkCKcZtBCDTMktsM77PZwGV_hzQX0g5GU8,1722
|
|
57
|
-
fmtr/tools/path_tools/path_tools.py,sha256=
|
|
57
|
+
fmtr/tools/path_tools/path_tools.py,sha256=8WBzNctpds5tVT1-FcizAORrBCGlkUbPcfOel-Js7ps,7878
|
|
58
58
|
fmtr/tools/path_tools/type_path_tools.py,sha256=Zgs-ek-GXRKDIlVDGdg3muB0PIxTg2ba0NeHw6y8FWQ,40
|
|
59
59
|
fmtr/tools/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
60
60
|
fmtr/tools/tests/conftest.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -64,9 +64,9 @@ fmtr/tools/tests/test_environment.py,sha256=iHaiMQfECYZPkPKwfuIZV9uHuWe3aE-p_dN_
|
|
|
64
64
|
fmtr/tools/tests/test_json.py,sha256=IeSP4ziPvRcmS8kq7k9tHonC9rN5YYq9GSNT2ul6Msk,287
|
|
65
65
|
fmtr/tools/tests/test_path.py,sha256=AkZQa6_8BQ-VaCyL_J-iKmdf2ZaM-xFYR37Kun3k4_g,2188
|
|
66
66
|
fmtr/tools/tests/test_yaml.py,sha256=jc0TwwKu9eC0LvFGNMERdgBue591xwLxYXFbtsRwXVM,287
|
|
67
|
-
fmtr_tools-1.1.
|
|
68
|
-
fmtr_tools-1.1.
|
|
69
|
-
fmtr_tools-1.1.
|
|
70
|
-
fmtr_tools-1.1.
|
|
71
|
-
fmtr_tools-1.1.
|
|
72
|
-
fmtr_tools-1.1.
|
|
67
|
+
fmtr_tools-1.1.21.dist-info/licenses/LICENSE,sha256=FW9aa6vVN5IjRQWLT43hs4_koYSmpcbIovlKeAJ0_cI,10757
|
|
68
|
+
fmtr_tools-1.1.21.dist-info/METADATA,sha256=-dnzZwvyXt4n6SBqztBZt1MAO_qWBXrbBvU6EMxUZ3s,15735
|
|
69
|
+
fmtr_tools-1.1.21.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
70
|
+
fmtr_tools-1.1.21.dist-info/entry_points.txt,sha256=e-eOW1Ml13tbxHC6Er1MnVOEDePeWw7DKwlE-l-gCY0,205
|
|
71
|
+
fmtr_tools-1.1.21.dist-info/top_level.txt,sha256=LXem9xCgNOD72tE2gRKESdiQTL902mfFkwWb6-dlwEE,5
|
|
72
|
+
fmtr_tools-1.1.21.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|