winiutils 2.2.32__tar.gz → 2.3.13__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.
- winiutils-2.3.13/LICENSE +21 -0
- winiutils-2.2.32/README.md → winiutils-2.3.13/PKG-INFO +41 -7
- winiutils-2.2.32/PKG-INFO → winiutils-2.3.13/README.md +21 -23
- {winiutils-2.2.32 → winiutils-2.3.13}/pyproject.toml +25 -3
- winiutils-2.3.13/winiutils/main.py +9 -0
- {winiutils-2.2.32 → winiutils-2.3.13}/winiutils/src/data/dataframe/cleaning.py +2 -2
- {winiutils-2.2.32 → winiutils-2.3.13}/winiutils/src/iterating/concurrent/concurrent.py +1 -1
- {winiutils-2.2.32 → winiutils-2.3.13}/winiutils/src/iterating/concurrent/multiprocessing.py +1 -1
- {winiutils-2.2.32 → winiutils-2.3.13}/winiutils/src/oop/mixins/meta.py +4 -3
- {winiutils-2.2.32 → winiutils-2.3.13}/winiutils/src/security/keyring.py +2 -2
- winiutils-2.2.32/winiutils/dev/tests/fixtures/__init__.py +0 -1
- winiutils-2.2.32/winiutils/main.py +0 -19
- {winiutils-2.2.32 → winiutils-2.3.13}/winiutils/__init__.py +0 -0
- {winiutils-2.2.32 → winiutils-2.3.13}/winiutils/dev/__init__.py +0 -0
- {winiutils-2.2.32/winiutils/dev/artifacts → winiutils-2.3.13/winiutils/dev/builders}/__init__.py +0 -0
- {winiutils-2.2.32/winiutils/dev/artifacts/builders → winiutils-2.3.13/winiutils/dev/cli}/__init__.py +0 -0
- {winiutils-2.2.32 → winiutils-2.3.13}/winiutils/dev/cli/subcommands.py +0 -0
- {winiutils-2.2.32/winiutils/dev/artifacts/resources → winiutils-2.3.13/winiutils/dev/configs}/__init__.py +0 -0
- {winiutils-2.2.32/winiutils/dev/cli → winiutils-2.3.13/winiutils/dev/tests}/__init__.py +0 -0
- {winiutils-2.2.32/winiutils/dev/configs → winiutils-2.3.13/winiutils/dev/tests/fixtures}/__init__.py +0 -0
- {winiutils-2.2.32 → winiutils-2.3.13}/winiutils/dev/tests/fixtures/fixtures.py +0 -0
- {winiutils-2.2.32 → winiutils-2.3.13}/winiutils/py.typed +0 -0
- {winiutils-2.2.32/winiutils/dev/tests → winiutils-2.3.13/winiutils/resources}/__init__.py +0 -0
- {winiutils-2.2.32 → winiutils-2.3.13}/winiutils/src/__init__.py +0 -0
- {winiutils-2.2.32 → winiutils-2.3.13}/winiutils/src/data/__init__.py +0 -0
- {winiutils-2.2.32 → winiutils-2.3.13}/winiutils/src/data/dataframe/__init__.py +0 -0
- {winiutils-2.2.32 → winiutils-2.3.13}/winiutils/src/data/structures/__init__.py +0 -0
- {winiutils-2.2.32 → winiutils-2.3.13}/winiutils/src/data/structures/dicts.py +0 -0
- {winiutils-2.2.32 → winiutils-2.3.13}/winiutils/src/data/structures/text/__init__.py +0 -0
- {winiutils-2.2.32 → winiutils-2.3.13}/winiutils/src/data/structures/text/string.py +0 -0
- {winiutils-2.2.32 → winiutils-2.3.13}/winiutils/src/iterating/__init__.py +0 -0
- {winiutils-2.2.32 → winiutils-2.3.13}/winiutils/src/iterating/concurrent/__init__.py +0 -0
- {winiutils-2.2.32 → winiutils-2.3.13}/winiutils/src/iterating/concurrent/multithreading.py +0 -0
- {winiutils-2.2.32 → winiutils-2.3.13}/winiutils/src/iterating/iterate.py +0 -0
- {winiutils-2.2.32 → winiutils-2.3.13}/winiutils/src/oop/__init__.py +0 -0
- {winiutils-2.2.32 → winiutils-2.3.13}/winiutils/src/oop/mixins/__init__.py +0 -0
- {winiutils-2.2.32 → winiutils-2.3.13}/winiutils/src/oop/mixins/mixin.py +0 -0
- {winiutils-2.2.32 → winiutils-2.3.13}/winiutils/src/security/__init__.py +0 -0
- {winiutils-2.2.32 → winiutils-2.3.13}/winiutils/src/security/cryptography.py +0 -0
winiutils-2.3.13/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Winipedia
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -1,17 +1,51 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: winiutils
|
|
3
|
+
Version: 2.3.13
|
|
4
|
+
Summary: A utility library for Python development
|
|
5
|
+
Author: Winipedia
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
License-File: LICENSE
|
|
8
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
9
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
11
|
+
Requires-Dist: cryptography
|
|
12
|
+
Requires-Dist: defusedxml
|
|
13
|
+
Requires-Dist: keyring
|
|
14
|
+
Requires-Dist: keyrings-alt
|
|
15
|
+
Requires-Dist: polars
|
|
16
|
+
Requires-Dist: pyrig
|
|
17
|
+
Requires-Dist: tqdm
|
|
18
|
+
Requires-Python: >=3.12
|
|
19
|
+
Description-Content-Type: text/markdown
|
|
20
|
+
|
|
1
21
|
# winiutils
|
|
2
22
|
|
|
3
|
-
|
|
4
|
-
[](https://github.com/Winipedia/pyrig)
|
|
25
|
+
[](https://github.com/astral-sh/uv)
|
|
26
|
+
[](https://pre-commit.com/)
|
|
27
|
+
<!-- code-quality -->
|
|
28
|
+
[](https://github.com/astral-sh/ruff)
|
|
29
|
+
[](https://github.com/astral-sh/ty)[](https://mypy-lang.org/)
|
|
30
|
+
[](https://github.com/PyCQA/bandit)
|
|
31
|
+
[](https://pytest.org/)
|
|
32
|
+
[](https://codecov.io/gh/Winipedia/winiutils)
|
|
33
|
+
<!-- package-info -->
|
|
34
|
+
[](https://pypi.org/project/winiutils/)
|
|
35
|
+
[](https://www.python.org/)
|
|
36
|
+
[](https://github.com/Winipedia/winiutils/blob/main/LICENSE)
|
|
37
|
+
<!-- ci/cd -->
|
|
38
|
+
[](https://github.com/Winipedia/winiutils/actions/workflows/health_check.yaml)
|
|
39
|
+
[](https://github.com/Winipedia/winiutils/actions/workflows/release.yaml)
|
|
40
|
+
|
|
8
41
|
|
|
9
|
-
|
|
42
|
+
---
|
|
10
43
|
|
|
11
|
-
>
|
|
44
|
+
> A utility library for Python development
|
|
12
45
|
|
|
13
46
|
---
|
|
14
47
|
|
|
48
|
+
|
|
15
49
|
## Table of Contents
|
|
16
50
|
|
|
17
51
|
- [Features](#features)
|
|
@@ -1,33 +1,31 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: winiutils
|
|
3
|
-
Version: 2.2.32
|
|
4
|
-
Summary: A package with many utility functions
|
|
5
|
-
Author: Winipedia
|
|
6
|
-
License-Expression: MIT
|
|
7
|
-
Requires-Dist: cryptography
|
|
8
|
-
Requires-Dist: defusedxml
|
|
9
|
-
Requires-Dist: keyring
|
|
10
|
-
Requires-Dist: keyrings-alt
|
|
11
|
-
Requires-Dist: polars
|
|
12
|
-
Requires-Dist: pyrig
|
|
13
|
-
Requires-Dist: tqdm
|
|
14
|
-
Requires-Python: >=3.12
|
|
15
|
-
Description-Content-Type: text/markdown
|
|
16
|
-
|
|
17
1
|
# winiutils
|
|
18
2
|
|
|
19
|
-
|
|
20
|
-
[](https://github.com/Winipedia/pyrig)
|
|
5
|
+
[](https://github.com/astral-sh/uv)
|
|
6
|
+
[](https://pre-commit.com/)
|
|
7
|
+
<!-- code-quality -->
|
|
8
|
+
[](https://github.com/astral-sh/ruff)
|
|
9
|
+
[](https://github.com/astral-sh/ty)[](https://mypy-lang.org/)
|
|
10
|
+
[](https://github.com/PyCQA/bandit)
|
|
11
|
+
[](https://pytest.org/)
|
|
12
|
+
[](https://codecov.io/gh/Winipedia/winiutils)
|
|
13
|
+
<!-- package-info -->
|
|
14
|
+
[](https://pypi.org/project/winiutils/)
|
|
15
|
+
[](https://www.python.org/)
|
|
16
|
+
[](https://github.com/Winipedia/winiutils/blob/main/LICENSE)
|
|
17
|
+
<!-- ci/cd -->
|
|
18
|
+
[](https://github.com/Winipedia/winiutils/actions/workflows/health_check.yaml)
|
|
19
|
+
[](https://github.com/Winipedia/winiutils/actions/workflows/release.yaml)
|
|
20
|
+
|
|
24
21
|
|
|
25
|
-
|
|
22
|
+
---
|
|
26
23
|
|
|
27
|
-
>
|
|
24
|
+
> A utility library for Python development
|
|
28
25
|
|
|
29
26
|
---
|
|
30
27
|
|
|
28
|
+
|
|
31
29
|
## Table of Contents
|
|
32
30
|
|
|
33
31
|
- [Features](#features)
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "winiutils"
|
|
3
|
-
version = "2.
|
|
4
|
-
description = "A
|
|
3
|
+
version = "2.3.13"
|
|
4
|
+
description = "A utility library for Python development"
|
|
5
5
|
license = "MIT"
|
|
6
6
|
requires-python = ">=3.12"
|
|
7
7
|
authors = [
|
|
8
|
-
{
|
|
8
|
+
{name = "Winipedia"},
|
|
9
9
|
]
|
|
10
10
|
readme = "README.md"
|
|
11
11
|
dependencies = [
|
|
@@ -17,6 +17,14 @@ dependencies = [
|
|
|
17
17
|
"pyrig",
|
|
18
18
|
"tqdm",
|
|
19
19
|
]
|
|
20
|
+
classifiers = [
|
|
21
|
+
"Programming Language :: Python :: 3.12",
|
|
22
|
+
"Programming Language :: Python :: 3.13",
|
|
23
|
+
"Programming Language :: Python :: 3.14",
|
|
24
|
+
]
|
|
25
|
+
license-files = [
|
|
26
|
+
"LICENSE",
|
|
27
|
+
]
|
|
20
28
|
|
|
21
29
|
[project.scripts]
|
|
22
30
|
winipedia-utils = "pyrig.dev.cli.cli:main"
|
|
@@ -25,12 +33,21 @@ winiutils = "pyrig.dev.cli.cli:main"
|
|
|
25
33
|
[dependency-groups]
|
|
26
34
|
dev = [
|
|
27
35
|
"bandit",
|
|
36
|
+
"dotenv",
|
|
28
37
|
"mypy",
|
|
38
|
+
"pillow",
|
|
29
39
|
"pre-commit",
|
|
40
|
+
"pygithub",
|
|
30
41
|
"pyinstaller",
|
|
31
42
|
"pytest",
|
|
43
|
+
"pytest-cov",
|
|
32
44
|
"pytest-mock",
|
|
45
|
+
"pyyaml",
|
|
33
46
|
"ruff",
|
|
47
|
+
"setuptools",
|
|
48
|
+
"tenacity",
|
|
49
|
+
"tomlkit",
|
|
50
|
+
"ty",
|
|
34
51
|
"types-defusedxml",
|
|
35
52
|
"types-pyinstaller",
|
|
36
53
|
"types-pyyaml",
|
|
@@ -72,6 +89,9 @@ fixable = [
|
|
|
72
89
|
"tests/**/*.py" = [
|
|
73
90
|
"S101",
|
|
74
91
|
]
|
|
92
|
+
"**/tests/**/*.py" = [
|
|
93
|
+
"S101",
|
|
94
|
+
]
|
|
75
95
|
|
|
76
96
|
[tool.ruff.lint.pydocstyle]
|
|
77
97
|
convention = "google"
|
|
@@ -86,6 +106,7 @@ files = "."
|
|
|
86
106
|
testpaths = [
|
|
87
107
|
"tests",
|
|
88
108
|
]
|
|
109
|
+
addopts = "--cov=winiutils --cov-report=term-missing --cov-fail-under=90"
|
|
89
110
|
|
|
90
111
|
[tool.bandit]
|
|
91
112
|
exclude_dirs = [
|
|
@@ -94,5 +115,6 @@ exclude_dirs = [
|
|
|
94
115
|
|
|
95
116
|
[tool.bandit.assert_used]
|
|
96
117
|
skips = [
|
|
118
|
+
"*/tests/*.py",
|
|
97
119
|
"*test_*.py",
|
|
98
120
|
]
|
|
@@ -417,7 +417,7 @@ class CleaningDF(ABCLoggingMixin):
|
|
|
417
417
|
col_names = cls.get_col_names()
|
|
418
418
|
missing_cols = set(col_names) - set(map_func().keys())
|
|
419
419
|
if missing_cols:
|
|
420
|
-
msg = f"Missing columns in {map_func
|
|
420
|
+
msg = f"Missing columns in {map_func}: {missing_cols}"
|
|
421
421
|
raise KeyError(msg)
|
|
422
422
|
|
|
423
423
|
def rename_cols(self, temp_df: pl.DataFrame) -> pl.DataFrame:
|
|
@@ -512,7 +512,7 @@ class CleaningDF(ABCLoggingMixin):
|
|
|
512
512
|
converter, return_dtype=self.get_col_dtype_map()[col_name]
|
|
513
513
|
)
|
|
514
514
|
for col_name, converter in self.get_col_converter_map().items()
|
|
515
|
-
if converter.__name__ != self.skip_col_converter.__name__
|
|
515
|
+
if converter.__name__ != self.skip_col_converter.__name__ # ty:ignore[unresolved-attribute]
|
|
516
516
|
]
|
|
517
517
|
)
|
|
518
518
|
|
|
@@ -155,7 +155,7 @@ def get_multiprocess_results_with_tqdm(
|
|
|
155
155
|
results = tqdm(
|
|
156
156
|
results,
|
|
157
157
|
total=process_args_len,
|
|
158
|
-
desc=f"Multi{'threading' if threads else 'processing'} {process_func
|
|
158
|
+
desc=f"Multi{'threading' if threads else 'processing'} {process_func}",
|
|
159
159
|
unit=f" {'threads' if threads else 'processes'}",
|
|
160
160
|
)
|
|
161
161
|
results_list = list(results)
|
|
@@ -120,8 +120,9 @@ class ABCLoggingMeta(ABCMeta):
|
|
|
120
120
|
"""
|
|
121
121
|
return (
|
|
122
122
|
is_func(method) # must be a method-like attribute
|
|
123
|
-
and
|
|
124
|
-
|
|
123
|
+
and not getattr(method, "__name__", "__").startswith(
|
|
124
|
+
"__"
|
|
125
|
+
) # must not be a magic method
|
|
125
126
|
)
|
|
126
127
|
|
|
127
128
|
@staticmethod
|
|
@@ -159,7 +160,7 @@ class ABCLoggingMeta(ABCMeta):
|
|
|
159
160
|
# we only log if the time since the last call is greater than the threshold
|
|
160
161
|
# this is to avoid spamming the logs
|
|
161
162
|
|
|
162
|
-
func_name = func.__name__
|
|
163
|
+
func_name = func.__name__ # ty:ignore[unresolved-attribute]
|
|
163
164
|
|
|
164
165
|
threshold = 1
|
|
165
166
|
|
|
@@ -22,7 +22,7 @@ from collections.abc import Callable
|
|
|
22
22
|
import keyring
|
|
23
23
|
from cryptography.fernet import Fernet
|
|
24
24
|
from cryptography.hazmat.primitives.ciphers.aead import AESGCM
|
|
25
|
-
from pyrig.src.git.
|
|
25
|
+
from pyrig.src.git.git import running_in_github_actions
|
|
26
26
|
|
|
27
27
|
if running_in_github_actions():
|
|
28
28
|
from keyrings.alt.file import PlaintextKeyring # type: ignore[import-untyped]
|
|
@@ -164,4 +164,4 @@ def make_service_name[T](service_name: str, key_class: Callable[[bytes], T]) ->
|
|
|
164
164
|
>>> make_service_name("my_app", Fernet)
|
|
165
165
|
'my_app_Fernet'
|
|
166
166
|
"""
|
|
167
|
-
return f"{service_name}_{key_class.__name__}"
|
|
167
|
+
return f"{service_name}_{key_class.__name__}" # ty:ignore[unresolved-attribute]
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"""__init__ module."""
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"""Main entrypoint for the project."""
|
|
2
|
-
|
|
3
|
-
import pyrig
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
def main() -> None:
|
|
7
|
-
"""Main entrypoint for the project."""
|
|
8
|
-
msg = f"""Add your projects entrypoint code to this function.
|
|
9
|
-
This function is automatically added to your cli by {pyrig.__name__}.
|
|
10
|
-
You can call it with
|
|
11
|
-
`your-pkg-name main`
|
|
12
|
-
or via
|
|
13
|
-
`python -m your-pkg-name`.
|
|
14
|
-
"""
|
|
15
|
-
raise NotImplementedError(msg)
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
if __name__ == "__main__":
|
|
19
|
-
main()
|
|
File without changes
|
|
File without changes
|
{winiutils-2.2.32/winiutils/dev/artifacts → winiutils-2.3.13/winiutils/dev/builders}/__init__.py
RENAMED
|
File without changes
|
{winiutils-2.2.32/winiutils/dev/artifacts/builders → winiutils-2.3.13/winiutils/dev/cli}/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{winiutils-2.2.32/winiutils/dev/configs → winiutils-2.3.13/winiutils/dev/tests/fixtures}/__init__.py
RENAMED
|
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
|