fmtr.tools 1.1.24__py3-none-any.whl → 1.1.25__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 CHANGED
@@ -31,7 +31,7 @@ from fmtr.tools.path_tools import Path, PackagePaths, AppPaths
31
31
  from fmtr.tools import ai_tools as ai
32
32
 
33
33
  import fmtr.tools.setup_tools as setup
34
- from fmtr.tools.setup_tools import Setup, SetupPaths, Dependencies
34
+ from fmtr.tools.setup_tools import Setup, SetupPaths, Dependencies, Tools
35
35
 
36
36
  try:
37
37
  from fmtr.tools import augmentation_tools as augmentation
@@ -1,6 +1,6 @@
1
1
  from fmtr.tools.import_tools import MissingExtraMockModule
2
2
 
3
- from fmtr.tools.setup_tools.setup_tools import Setup, SetupPaths, Dependencies
3
+ from fmtr.tools.setup_tools.setup_tools import Setup, SetupPaths, Dependencies, Tools
4
4
 
5
5
  try:
6
6
  from setuptools import find_namespace_packages, find_packages, setup as setup_setuptools
@@ -21,7 +21,6 @@ class SetupPaths(FromCallerMixin):
21
21
  """
22
22
 
23
23
  Use calling module path as default path, if not otherwise specified.
24
- :param org:
25
24
 
26
25
  """
27
26
  if not path:
@@ -30,8 +29,6 @@ class SetupPaths(FromCallerMixin):
30
29
  self.org_name = org
31
30
  self.repo = Path(path)
32
31
 
33
-
34
-
35
32
  @property
36
33
  def readme(self):
37
34
  return self.repo / 'README.md'
@@ -43,12 +40,14 @@ class SetupPaths(FromCallerMixin):
43
40
  @cached_property
44
41
  def path(self):
45
42
 
43
+ from fmtr.tools import setup
44
+
46
45
  if self.org:
47
46
  base = self.org
48
47
  else:
49
48
  base = self.repo
50
49
 
51
- directories = [base / dir for dir in self.find(base)]
50
+ directories = [base / dir for dir in setup.find_packages(base)]
52
51
 
53
52
  if len(directories) != 1:
54
53
  dirs_str = ', '.join([str(dir) for dir in directories])
@@ -74,11 +73,6 @@ class SetupPaths(FromCallerMixin):
74
73
  def name(self) -> str:
75
74
  return self.path.stem
76
75
 
77
- @property
78
- def find(self):
79
- from fmtr.tools import setup
80
- return setup.find_packages
81
-
82
76
 
83
77
  class Setup(FromCallerMixin):
84
78
  AUTHOR = 'Frontmatter'
@@ -209,7 +203,7 @@ class Setup(FromCallerMixin):
209
203
 
210
204
  @property
211
205
  def data(self):
212
- return dict(
206
+ data = dict(
213
207
  name=self.name,
214
208
  version=self.version,
215
209
  author=self.author,
@@ -225,6 +219,7 @@ class Setup(FromCallerMixin):
225
219
  install_requires=self.dependencies.install,
226
220
  extras_require=self.dependencies.extras,
227
221
  ) | self.kwargs
222
+ return data
228
223
 
229
224
  def setup(self):
230
225
 
@@ -233,6 +228,16 @@ class Setup(FromCallerMixin):
233
228
  return setup.setup_setuptools(**self.data)
234
229
 
235
230
 
231
+ class Tools:
232
+ MASK = f'{Constants.LIBRARY_NAME}[{{extras}}]'
233
+
234
+ def __init__(self, *extras):
235
+ self.extras = extras
236
+
237
+ def __str__(self):
238
+ extras_str = ','.join(self.extras)
239
+ return self.MASK.format(extras=extras_str)
240
+
236
241
 
237
242
 
238
243
  class Dependencies:
@@ -254,7 +259,7 @@ class Dependencies:
254
259
  for value in values:
255
260
  if value == key or value not in self.dependencies:
256
261
  # Add the value directly if it references itself or is not a dependency key.
257
- values_resolved.append(value)
262
+ values_resolved.append(str(value))
258
263
  else:
259
264
  # Recurse into nested dependencies.
260
265
  values_resolved += self.resolve_values(value)
fmtr/tools/version CHANGED
@@ -1 +1 @@
1
- 1.1.24
1
+ 1.1.25
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fmtr.tools
3
- Version: 1.1.24
3
+ Version: 1.1.25
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: openpyxl; extra == "test"
13
- Requires-Dist: Unidecode; extra == "test"
14
- Requires-Dist: pyyaml; extra == "test"
15
- Requires-Dist: flet-video; extra == "test"
16
- Requires-Dist: dask[bag]; extra == "test"
17
- Requires-Dist: appdirs; extra == "test"
12
+ Requires-Dist: google-auth; extra == "test"
13
+ Requires-Dist: pandas; extra == "test"
14
+ Requires-Dist: sre_yield; extra == "test"
18
15
  Requires-Dist: semver; extra == "test"
16
+ Requires-Dist: dask[bag]; extra == "test"
17
+ Requires-Dist: torchaudio; extra == "test"
18
+ Requires-Dist: ollama; extra == "test"
19
+ Requires-Dist: sentence_transformers; extra == "test"
20
+ Requires-Dist: fastapi; extra == "test"
21
+ Requires-Dist: faker; extra == "test"
22
+ Requires-Dist: html2text; extra == "test"
19
23
  Requires-Dist: pymupdf; extra == "test"
20
- Requires-Dist: bokeh; extra == "test"
21
- Requires-Dist: tabulate; extra == "test"
24
+ Requires-Dist: pydantic-ai[logfire,openai]; extra == "test"
22
25
  Requires-Dist: uvicorn[standard]; extra == "test"
26
+ Requires-Dist: regex; extra == "test"
27
+ Requires-Dist: docker; extra == "test"
28
+ Requires-Dist: logfire[httpx]; extra == "test"
23
29
  Requires-Dist: transformers[sentencepiece]; extra == "test"
24
- Requires-Dist: google-auth-oauthlib; extra == "test"
25
- Requires-Dist: dnspython[doh]; extra == "test"
26
- Requires-Dist: sentence_transformers; extra == "test"
30
+ Requires-Dist: bokeh; extra == "test"
31
+ Requires-Dist: tokenizers; extra == "test"
32
+ Requires-Dist: httpx_retries; extra == "test"
33
+ Requires-Dist: huggingface_hub; extra == "test"
27
34
  Requires-Dist: pydantic-settings; extra == "test"
28
- Requires-Dist: deepmerge; extra == "test"
35
+ Requires-Dist: google-auth-oauthlib; extra == "test"
36
+ Requires-Dist: google-api-python-client; extra == "test"
29
37
  Requires-Dist: pydantic; extra == "test"
30
- Requires-Dist: httpx_retries; extra == "test"
31
- Requires-Dist: logfire; extra == "test"
32
- Requires-Dist: google-auth-httplib2; extra == "test"
33
- Requires-Dist: torchvision; extra == "test"
34
- Requires-Dist: pymupdf4llm; extra == "test"
35
- Requires-Dist: torchaudio; extra == "test"
36
- Requires-Dist: contexttimer; extra == "test"
38
+ Requires-Dist: tabulate; extra == "test"
37
39
  Requires-Dist: distributed; extra == "test"
38
- Requires-Dist: peft; extra == "test"
39
- Requires-Dist: httpx; extra == "test"
40
- Requires-Dist: regex; extra == "test"
41
- Requires-Dist: yamlscript; extra == "test"
42
- Requires-Dist: filetype; extra == "test"
43
- Requires-Dist: pydevd-pycharm; extra == "test"
44
- Requires-Dist: huggingface_hub; extra == "test"
45
- Requires-Dist: sre_yield; extra == "test"
40
+ Requires-Dist: logfire; extra == "test"
46
41
  Requires-Dist: flet-webview; extra == "test"
47
- Requires-Dist: json_repair; extra == "test"
48
- Requires-Dist: pytest-cov; extra == "test"
49
- Requires-Dist: fastapi; extra == "test"
50
42
  Requires-Dist: tinynetrc; extra == "test"
51
- Requires-Dist: google-api-python-client; extra == "test"
52
- Requires-Dist: ollama; extra == "test"
53
- Requires-Dist: tokenizers; extra == "test"
54
- Requires-Dist: diskcache; extra == "test"
55
- Requires-Dist: pydantic-ai[logfire,openai]; extra == "test"
56
- Requires-Dist: html2text; extra == "test"
57
- Requires-Dist: pandas; extra == "test"
43
+ Requires-Dist: deepmerge; extra == "test"
44
+ Requires-Dist: pyyaml; extra == "test"
45
+ Requires-Dist: contexttimer; extra == "test"
46
+ Requires-Dist: pytest-cov; extra == "test"
47
+ Requires-Dist: filetype; extra == "test"
58
48
  Requires-Dist: setuptools; extra == "test"
59
- Requires-Dist: faker; extra == "test"
49
+ Requires-Dist: flet[all]; extra == "test"
50
+ Requires-Dist: diskcache; extra == "test"
51
+ Requires-Dist: openpyxl; extra == "test"
52
+ Requires-Dist: dnspython[doh]; extra == "test"
60
53
  Requires-Dist: openai; extra == "test"
61
- Requires-Dist: logfire[httpx]; extra == "test"
62
- Requires-Dist: docker; extra == "test"
63
54
  Requires-Dist: logfire[fastapi]; extra == "test"
64
- Requires-Dist: flet[all]; extra == "test"
65
- Requires-Dist: google-auth; extra == "test"
55
+ Requires-Dist: httpx; extra == "test"
56
+ Requires-Dist: yamlscript; extra == "test"
57
+ Requires-Dist: pydevd-pycharm; extra == "test"
58
+ Requires-Dist: google-auth-httplib2; extra == "test"
59
+ Requires-Dist: appdirs; extra == "test"
60
+ Requires-Dist: Unidecode; extra == "test"
61
+ Requires-Dist: flet-video; extra == "test"
62
+ Requires-Dist: pymupdf4llm; extra == "test"
63
+ Requires-Dist: json_repair; extra == "test"
64
+ Requires-Dist: torchvision; extra == "test"
65
+ Requires-Dist: peft; 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=PeQKmb9q7xTaiDGy7TUa_5V2lh8k0rV0BJgjwf37udI,5571
1
+ fmtr/tools/__init__.py,sha256=SMYBulUmtwW27eKblcTq1GCZjSOQDPiZBUCd2mRcTGc,5578
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
@@ -45,7 +45,7 @@ fmtr/tools/tabular_tools.py,sha256=tpIpZzYku1HcJrHZJL6BC39LmN3WUWVhFbK2N7nDVmE,1
45
45
  fmtr/tools/tokenization_tools.py,sha256=me-IBzSLyNYejLybwjO9CNB6Mj2NYfKPaOVThXyaGNg,4268
46
46
  fmtr/tools/tools.py,sha256=CAsApa1YwVdNE6H66Vjivs_mXYvOas3rh7fPELAnTpk,795
47
47
  fmtr/tools/unicode_tools.py,sha256=yS_9wpu8ogNoiIL7s1G_8bETFFO_YQlo4LNPv1NLDeY,52
48
- fmtr/tools/version,sha256=fMaLB6rmZIaUWwd3AaKbbqQ2mgl-suriSc_QCo-bRSk,6
48
+ fmtr/tools/version,sha256=MXtcMHPDkm9DBt901I2qwVZouqD5wzakzj7n9M5gDCI,6
49
49
  fmtr/tools/version_tools.py,sha256=yNs_CGqWpqE4jbK9wsPIi14peJVXYbhIcMqHAFOw3yE,1480
50
50
  fmtr/tools/yaml_tools.py,sha256=9kuYChqJelWQIjGlSnK4iDdOWWH06P0gp9jIcRrC3UI,1903
51
51
  fmtr/tools/ai_tools/__init__.py,sha256=JZrLuOFNV1A3wvJgonxOgz_4WS-7MfCuowGWA5uYCjs,372
@@ -55,8 +55,8 @@ fmtr/tools/path_tools/__init__.py,sha256=v5CpmzXq5Ii90FtcmxAJKiLxmguZMrPnQ_HdT87
55
55
  fmtr/tools/path_tools/app_path_tools.py,sha256=JrJvtTDd_gkCKcZtBCDTMktsM77PZwGV_hzQX0g5GU8,1722
56
56
  fmtr/tools/path_tools/path_tools.py,sha256=8WBzNctpds5tVT1-FcizAORrBCGlkUbPcfOel-Js7ps,7878
57
57
  fmtr/tools/path_tools/type_path_tools.py,sha256=Zgs-ek-GXRKDIlVDGdg3muB0PIxTg2ba0NeHw6y8FWQ,40
58
- fmtr/tools/setup_tools/__init__.py,sha256=8HX-GvGxeCK3nIHH5PHkvhkH0MIt89AK8a5l6Vua2dQ,379
59
- fmtr/tools/setup_tools/setup_tools.py,sha256=bwx0fkmPqZz9j8kyqEjKM9xdr54_SoeR45OODuFXUl4,7613
58
+ fmtr/tools/setup_tools/__init__.py,sha256=fUCjzyE4JBPEOZhC4B--VPj_eOCkQb1QG5PIgiGj03U,386
59
+ fmtr/tools/setup_tools/setup_tools.py,sha256=A70uc80HrfvTh41LOizC14jQEY6N-ol4O-PkxYIJNBQ,7803
60
60
  fmtr/tools/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
61
61
  fmtr/tools/tests/conftest.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
62
62
  fmtr/tools/tests/helpers.py,sha256=N5sf9YoZV93a7tf_UxpLeyQ9vp6Ec0teNIimFDvc054,1091
@@ -65,9 +65,9 @@ fmtr/tools/tests/test_environment.py,sha256=iHaiMQfECYZPkPKwfuIZV9uHuWe3aE-p_dN_
65
65
  fmtr/tools/tests/test_json.py,sha256=IeSP4ziPvRcmS8kq7k9tHonC9rN5YYq9GSNT2ul6Msk,287
66
66
  fmtr/tools/tests/test_path.py,sha256=AkZQa6_8BQ-VaCyL_J-iKmdf2ZaM-xFYR37Kun3k4_g,2188
67
67
  fmtr/tools/tests/test_yaml.py,sha256=jc0TwwKu9eC0LvFGNMERdgBue591xwLxYXFbtsRwXVM,287
68
- fmtr_tools-1.1.24.dist-info/licenses/LICENSE,sha256=FW9aa6vVN5IjRQWLT43hs4_koYSmpcbIovlKeAJ0_cI,10757
69
- fmtr_tools-1.1.24.dist-info/METADATA,sha256=NGiex3myYBSC4501v0wDzpfy-ueqwqf8-MZim1ZOXKM,15735
70
- fmtr_tools-1.1.24.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
71
- fmtr_tools-1.1.24.dist-info/entry_points.txt,sha256=e-eOW1Ml13tbxHC6Er1MnVOEDePeWw7DKwlE-l-gCY0,205
72
- fmtr_tools-1.1.24.dist-info/top_level.txt,sha256=LXem9xCgNOD72tE2gRKESdiQTL902mfFkwWb6-dlwEE,5
73
- fmtr_tools-1.1.24.dist-info/RECORD,,
68
+ fmtr_tools-1.1.25.dist-info/licenses/LICENSE,sha256=FW9aa6vVN5IjRQWLT43hs4_koYSmpcbIovlKeAJ0_cI,10757
69
+ fmtr_tools-1.1.25.dist-info/METADATA,sha256=4suZ_4qo32TLcy5mPDvTPyr-4ewe_ygsW92UYBbqzDs,15735
70
+ fmtr_tools-1.1.25.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
71
+ fmtr_tools-1.1.25.dist-info/entry_points.txt,sha256=e-eOW1Ml13tbxHC6Er1MnVOEDePeWw7DKwlE-l-gCY0,205
72
+ fmtr_tools-1.1.25.dist-info/top_level.txt,sha256=LXem9xCgNOD72tE2gRKESdiQTL902mfFkwWb6-dlwEE,5
73
+ fmtr_tools-1.1.25.dist-info/RECORD,,