winiutils 2.2.32__tar.gz → 2.3.14__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.
Files changed (39) hide show
  1. winiutils-2.3.14/LICENSE +21 -0
  2. winiutils-2.2.32/README.md → winiutils-2.3.14/PKG-INFO +41 -7
  3. winiutils-2.2.32/PKG-INFO → winiutils-2.3.14/README.md +21 -23
  4. {winiutils-2.2.32 → winiutils-2.3.14}/pyproject.toml +17 -15
  5. winiutils-2.3.14/winiutils/main.py +9 -0
  6. {winiutils-2.2.32 → winiutils-2.3.14}/winiutils/src/data/dataframe/cleaning.py +2 -2
  7. {winiutils-2.2.32 → winiutils-2.3.14}/winiutils/src/iterating/concurrent/concurrent.py +1 -1
  8. {winiutils-2.2.32 → winiutils-2.3.14}/winiutils/src/iterating/concurrent/multiprocessing.py +1 -1
  9. {winiutils-2.2.32 → winiutils-2.3.14}/winiutils/src/oop/mixins/meta.py +4 -3
  10. {winiutils-2.2.32 → winiutils-2.3.14}/winiutils/src/security/keyring.py +2 -2
  11. winiutils-2.2.32/winiutils/dev/tests/fixtures/__init__.py +0 -1
  12. winiutils-2.2.32/winiutils/main.py +0 -19
  13. {winiutils-2.2.32 → winiutils-2.3.14}/winiutils/__init__.py +0 -0
  14. {winiutils-2.2.32 → winiutils-2.3.14}/winiutils/dev/__init__.py +0 -0
  15. {winiutils-2.2.32/winiutils/dev/artifacts → winiutils-2.3.14/winiutils/dev/builders}/__init__.py +0 -0
  16. {winiutils-2.2.32/winiutils/dev/artifacts/builders → winiutils-2.3.14/winiutils/dev/cli}/__init__.py +0 -0
  17. {winiutils-2.2.32 → winiutils-2.3.14}/winiutils/dev/cli/subcommands.py +0 -0
  18. {winiutils-2.2.32/winiutils/dev/artifacts/resources → winiutils-2.3.14/winiutils/dev/configs}/__init__.py +0 -0
  19. {winiutils-2.2.32/winiutils/dev/cli → winiutils-2.3.14/winiutils/dev/tests}/__init__.py +0 -0
  20. {winiutils-2.2.32/winiutils/dev/configs → winiutils-2.3.14/winiutils/dev/tests/fixtures}/__init__.py +0 -0
  21. {winiutils-2.2.32 → winiutils-2.3.14}/winiutils/dev/tests/fixtures/fixtures.py +0 -0
  22. {winiutils-2.2.32 → winiutils-2.3.14}/winiutils/py.typed +0 -0
  23. {winiutils-2.2.32/winiutils/dev/tests → winiutils-2.3.14/winiutils/resources}/__init__.py +0 -0
  24. {winiutils-2.2.32 → winiutils-2.3.14}/winiutils/src/__init__.py +0 -0
  25. {winiutils-2.2.32 → winiutils-2.3.14}/winiutils/src/data/__init__.py +0 -0
  26. {winiutils-2.2.32 → winiutils-2.3.14}/winiutils/src/data/dataframe/__init__.py +0 -0
  27. {winiutils-2.2.32 → winiutils-2.3.14}/winiutils/src/data/structures/__init__.py +0 -0
  28. {winiutils-2.2.32 → winiutils-2.3.14}/winiutils/src/data/structures/dicts.py +0 -0
  29. {winiutils-2.2.32 → winiutils-2.3.14}/winiutils/src/data/structures/text/__init__.py +0 -0
  30. {winiutils-2.2.32 → winiutils-2.3.14}/winiutils/src/data/structures/text/string.py +0 -0
  31. {winiutils-2.2.32 → winiutils-2.3.14}/winiutils/src/iterating/__init__.py +0 -0
  32. {winiutils-2.2.32 → winiutils-2.3.14}/winiutils/src/iterating/concurrent/__init__.py +0 -0
  33. {winiutils-2.2.32 → winiutils-2.3.14}/winiutils/src/iterating/concurrent/multithreading.py +0 -0
  34. {winiutils-2.2.32 → winiutils-2.3.14}/winiutils/src/iterating/iterate.py +0 -0
  35. {winiutils-2.2.32 → winiutils-2.3.14}/winiutils/src/oop/__init__.py +0 -0
  36. {winiutils-2.2.32 → winiutils-2.3.14}/winiutils/src/oop/mixins/__init__.py +0 -0
  37. {winiutils-2.2.32 → winiutils-2.3.14}/winiutils/src/oop/mixins/mixin.py +0 -0
  38. {winiutils-2.2.32 → winiutils-2.3.14}/winiutils/src/security/__init__.py +0 -0
  39. {winiutils-2.2.32 → winiutils-2.3.14}/winiutils/src/security/cryptography.py +0 -0
@@ -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.14
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
- [![built with pyrig](https://img.shields.io/badge/built%20with-pyrig-3776AB?logo=python&logoColor=white)](https://github.com/Winipedia/pyrig)
4
- [![Python 3.12+](https://img.shields.io/badge/python-3.12+-blue.svg)](https://www.python.org/downloads/)
5
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6
- [![Code style: ruff](https://img.shields.io/badge/code%20style-ruff-000000.svg)](https://github.com/astral-sh/ruff)
7
- [![Type checked: mypy](https://img.shields.io/badge/type%20checked-mypy-blue.svg)](https://mypy-lang.org/)
23
+ <!-- tooling -->
24
+ [![pyrig](https://img.shields.io/badge/built%20with-pyrig-3776AB?logo=buildkite&logoColor=black)](https://github.com/Winipedia/pyrig)
25
+ [![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)](https://github.com/astral-sh/uv)
26
+ [![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://pre-commit.com/)
27
+ <!-- code-quality -->
28
+ [![ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
29
+ [![ty](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ty/main/assets/badge/v0.json)](https://github.com/astral-sh/ty)[![mypy](https://img.shields.io/badge/type%20checked-mypy-039dfc.svg)](https://mypy-lang.org/)
30
+ [![security: bandit](https://img.shields.io/badge/security-bandit-yellow.svg)](https://github.com/PyCQA/bandit)
31
+ [![pytest](https://img.shields.io/badge/tested%20with-pytest-46a2f1.svg?logo=pytest)](https://pytest.org/)
32
+ [![codecov](https://codecov.io/gh/Winipedia/winiutils/branch/main/graph/badge.svg)](https://codecov.io/gh/Winipedia/winiutils)
33
+ <!-- package-info -->
34
+ [![PyPI](https://img.shields.io/pypi/v/winiutils?logo=pypi&logoColor=white)](https://pypi.org/project/winiutils/)
35
+ [![Python](https://img.shields.io/badge/python-3.12|3.13|3.14-blue.svg?logo=python&logoColor=white)](https://www.python.org/)
36
+ [![License](https://img.shields.io/github/license/Winipedia/winiutils)](https://github.com/Winipedia/winiutils/blob/main/LICENSE)
37
+ <!-- ci/cd -->
38
+ [![CI](https://img.shields.io/github/actions/workflow/status/Winipedia/winiutils/health_check.yaml?label=CI&logo=github)](https://github.com/Winipedia/winiutils/actions/workflows/health_check.yaml)
39
+ [![CD](https://img.shields.io/github/actions/workflow/status/Winipedia/winiutils/release.yaml?label=CD&logo=github)](https://github.com/Winipedia/winiutils/actions/workflows/release.yaml)
40
+
8
41
 
9
- A comprehensive Python utility library providing production-ready tools for data processing, concurrent execution, security, and object-oriented programming patterns.
42
+ ---
10
43
 
11
- > Built with [pyrig](https://github.com/Winipedia/pyrig)
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
- [![built with pyrig](https://img.shields.io/badge/built%20with-pyrig-3776AB?logo=python&logoColor=white)](https://github.com/Winipedia/pyrig)
20
- [![Python 3.12+](https://img.shields.io/badge/python-3.12+-blue.svg)](https://www.python.org/downloads/)
21
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
22
- [![Code style: ruff](https://img.shields.io/badge/code%20style-ruff-000000.svg)](https://github.com/astral-sh/ruff)
23
- [![Type checked: mypy](https://img.shields.io/badge/type%20checked-mypy-blue.svg)](https://mypy-lang.org/)
3
+ <!-- tooling -->
4
+ [![pyrig](https://img.shields.io/badge/built%20with-pyrig-3776AB?logo=buildkite&logoColor=black)](https://github.com/Winipedia/pyrig)
5
+ [![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)](https://github.com/astral-sh/uv)
6
+ [![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://pre-commit.com/)
7
+ <!-- code-quality -->
8
+ [![ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
9
+ [![ty](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ty/main/assets/badge/v0.json)](https://github.com/astral-sh/ty)[![mypy](https://img.shields.io/badge/type%20checked-mypy-039dfc.svg)](https://mypy-lang.org/)
10
+ [![security: bandit](https://img.shields.io/badge/security-bandit-yellow.svg)](https://github.com/PyCQA/bandit)
11
+ [![pytest](https://img.shields.io/badge/tested%20with-pytest-46a2f1.svg?logo=pytest)](https://pytest.org/)
12
+ [![codecov](https://codecov.io/gh/Winipedia/winiutils/branch/main/graph/badge.svg)](https://codecov.io/gh/Winipedia/winiutils)
13
+ <!-- package-info -->
14
+ [![PyPI](https://img.shields.io/pypi/v/winiutils?logo=pypi&logoColor=white)](https://pypi.org/project/winiutils/)
15
+ [![Python](https://img.shields.io/badge/python-3.12|3.13|3.14-blue.svg?logo=python&logoColor=white)](https://www.python.org/)
16
+ [![License](https://img.shields.io/github/license/Winipedia/winiutils)](https://github.com/Winipedia/winiutils/blob/main/LICENSE)
17
+ <!-- ci/cd -->
18
+ [![CI](https://img.shields.io/github/actions/workflow/status/Winipedia/winiutils/health_check.yaml?label=CI&logo=github)](https://github.com/Winipedia/winiutils/actions/workflows/health_check.yaml)
19
+ [![CD](https://img.shields.io/github/actions/workflow/status/Winipedia/winiutils/release.yaml?label=CD&logo=github)](https://github.com/Winipedia/winiutils/actions/workflows/release.yaml)
20
+
24
21
 
25
- A comprehensive Python utility library providing production-ready tools for data processing, concurrent execution, security, and object-oriented programming patterns.
22
+ ---
26
23
 
27
- > Built with [pyrig](https://github.com/Winipedia/pyrig)
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.2.32"
4
- description = "A package with many utility functions"
3
+ version = "2.3.14"
4
+ description = "A utility library for Python development"
5
5
  license = "MIT"
6
6
  requires-python = ">=3.12"
7
7
  authors = [
8
- { name = "Winipedia"},
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"
@@ -24,18 +32,7 @@ winiutils = "pyrig.dev.cli.cli:main"
24
32
 
25
33
  [dependency-groups]
26
34
  dev = [
27
- "bandit",
28
- "mypy",
29
- "pre-commit",
30
- "pyinstaller",
31
- "pytest",
32
- "pytest-mock",
33
- "ruff",
34
- "types-defusedxml",
35
- "types-pyinstaller",
36
- "types-pyyaml",
37
- "types-setuptools",
38
- "types-tqdm",
35
+ "pyrig-dev",
39
36
  ]
40
37
 
41
38
  [build-system]
@@ -72,6 +69,9 @@ fixable = [
72
69
  "tests/**/*.py" = [
73
70
  "S101",
74
71
  ]
72
+ "**/tests/**/*.py" = [
73
+ "S101",
74
+ ]
75
75
 
76
76
  [tool.ruff.lint.pydocstyle]
77
77
  convention = "google"
@@ -86,6 +86,7 @@ files = "."
86
86
  testpaths = [
87
87
  "tests",
88
88
  ]
89
+ addopts = "--cov=winiutils --cov-report=term-missing --cov-fail-under=90"
89
90
 
90
91
  [tool.bandit]
91
92
  exclude_dirs = [
@@ -94,5 +95,6 @@ exclude_dirs = [
94
95
 
95
96
  [tool.bandit.assert_used]
96
97
  skips = [
98
+ "*/tests/*.py",
97
99
  "*test_*.py",
98
100
  ]
@@ -0,0 +1,9 @@
1
+ """Main entrypoint for the project."""
2
+
3
+
4
+ def main() -> None:
5
+ """Main entrypoint for the project."""
6
+
7
+
8
+ if __name__ == "__main__":
9
+ main()
@@ -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.__name__}: {missing_cols}"
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.__name__}",
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)
@@ -110,7 +110,7 @@ def cancel_on_timeout(seconds: float, message: str) -> Callable[..., Any]:
110
110
  except multiprocessing.TimeoutError:
111
111
  logger.warning(
112
112
  "%s -> Execution exceeded %s seconds: %s",
113
- func.__name__,
113
+ func,
114
114
  seconds,
115
115
  message,
116
116
  )
@@ -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 hasattr(method, "__name__") # must have a name
124
- and not method.__name__.startswith("__") # must not be a magic method
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.github.github import running_in_github_actions
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()