winipedia-utils 0.4.46__py3-none-any.whl → 0.6.12__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: winipedia-utils
3
- Version: 0.4.46
3
+ Version: 0.6.12
4
4
  Summary: A package with many utility functions
5
5
  License-Expression: MIT
6
6
  License-File: LICENSE
@@ -79,7 +79,8 @@ git clone https://github.com/owner/repo.git
79
79
  poetry init # or poetry new
80
80
  # 4: Poetry will ask you some stuff when you run poetry init.
81
81
  # First author name must be equal to the GitHub repository owner (username).
82
- # The repository name must be equal to the package/project name.
82
+ # The repository name must be equal to the package/project name.
83
+ # (- instead of _ is fine, but only as the project name in pyproject.toml, folder names should all be _)
83
84
 
84
85
  # 5: Add winipedia-utils to your project
85
86
  poetry add winipedia-utils
@@ -104,7 +105,7 @@ The setup creates the following configuration files:
104
105
  - `.pre-commit-config.yaml` - Pre-commit hook configuration
105
106
  - `.gitignore` - Git ignore rules (assumes you added one on GitHub before.)
106
107
  - `pyproject.toml` - Project configuration with Poetry settings
107
- - `.github/workflows/health_check.yaml` - Health check workflow (Runs on every push and pull request, all workfows run on the latest possible python version in pyproject.toml)
108
+ - `.github/workflows/health_check.yaml` - Health check workflow (Runs on every push and pull request using a matrix strategy to test across multiple operating systems and Python versions)
108
109
  - `.github/workflows/release.yaml` - Release workflow (Creates a release on GitHub when the same actions as in health check pass and commits are pushed to main)
109
110
  - `.github/workflows/publish.yaml` - Publishing workflow (Publishes to PyPI when a release is created by the release workflow, if you use this workflow, you need to add a PYPI_TOKEN (named PYPI_TOKEN) to your GitHub secrets that has write access to the package on PyPI.)
110
111
  - `py.typed` - PEP 561 marker for type hints
@@ -113,27 +114,60 @@ The setup creates the following configuration files:
113
114
  - `conftest.py` - Pytest configuration file
114
115
  - `.python-version` - Python version file for pyenv (if you use pyenv, puts in the lowest supported python version in pyproject.toml opposed to the latest possible python version in workflows)
115
116
 
117
+ ### GitHub Workflows and Matrix Strategy
118
+
119
+ The project uses GitHub Actions workflows with a **matrix strategy** to ensure cross-platform compatibility:
120
+
121
+ #### Matrix Configuration
122
+
123
+ The health check and release workflows test your code across:
124
+ - **Operating Systems**: Ubuntu (latest), Windows (latest), macOS (latest)
125
+ - **Python Versions**: All versions specified in your `pyproject.toml` (e.g., 3.12, 3.13, 3.14)
126
+
127
+ This matrix strategy ensures your code works reliably across different environments before merging or releasing.
128
+
129
+ #### Workflow Structure
130
+
131
+ The health check workflow consists of two jobs:
132
+
133
+ 1. **Matrix Job** (`health_check_matrix`) - Runs all checks in parallel across the matrix of OS and Python versions:
134
+ - Checkout repository
135
+ - Setup Git, Python, and Poetry
136
+ - Add Poetry to PATH (Windows-specific step)
137
+ - Install dependencies
138
+ - Setup CI keyring
139
+ - Protect repository (applies branch protection rules and repository settings)
140
+ - Run pre-commit hooks (linting, formatting, type checking, security, tests)
141
+
142
+ 2. **Aggregation Job** (`health_check`) - Aggregates matrix results into a single status check:
143
+ - Required for branch protection compatibility
144
+ - Only runs after all matrix jobs complete successfully
145
+ - Provides a single status check that can be marked as required in branch protection rules
146
+
147
+ The release workflow extends the health check workflow and adds a release job that runs after all health checks pass.
148
+ A build job is added before the release job if a script src/artifacts/build.py exists. This script is created by the setup command and can be modified to create build artifacts for your project. This script then just needs to create artifacts in a folder called artifacts and those will be uploaded as artifacts to the release.
149
+
116
150
  ### Pre-commit Hook Workflow
117
151
 
118
152
  When you commit code using `git commit`, the following checks run automatically:
119
153
 
120
154
  Info: If git commit fails bc of ModuleNotFoundError or smth similar, you need to run `poetry run git commit` instead.
121
155
  winipedia_utils hook is a python script that depends on winipedia_utils being installed. Poetry is needed to install winipedia_utils.
122
- Usually VSCode or other IDEs activates the venv automatically when opening the terminal but if not you need to activate it manually or run `poetry run git commit` instead.
123
-
124
- 1. Patch version (poetry version patch)
125
- 2. Add version patch to git (git add pyproject.toml)
126
- 3. Update package manager (poetry self update)
127
- 4. Install packages (poetry install --with dev)
128
- 5. Update packages (poetry update --with dev (winipedia_utils forces all dependencies with * to be updated to latest compatible version))
129
- 6. Lock dependencies (poetry lock)
130
- 7. Check package manager configs (poetry check --strict)
131
- 8. Create tests (python -m winipedia_utils.testing.create_tests)
132
- 9. Lint code (ruff check --fix)
133
- 10. Format code (ruff format)
134
- 11. Check static types (mypy)
135
- 12. Check security (bandit -c pyproject.toml -r .)
136
- 13. Run tests (pytest (uses pyproject.toml as config))
156
+ Usually VSCode or other IDEs activates the venv automatically when opening the terminal but if not you need to activate it manually or run `poetry run git commit` instead. It fails fast, so if one hook in winipedia_utils hook fails, the others don't run bc sys.exit(1) is called.
157
+
158
+ Hooks run in the following order:
159
+
160
+ - Update package manager (poetry self update)
161
+ - Install packages (poetry install --with dev)
162
+ - Update packages (poetry update --with dev (winipedia_utils forces all dependencies with * to be updated to latest compatible version))
163
+ - Lock dependencies (poetry lock)
164
+ - Check package manager configs (poetry check --strict)
165
+ - Create tests (python -m winipedia_utils.testing.create_tests)
166
+ - Lint code (ruff check --fix)
167
+ - Format code (ruff format)
168
+ - Check static types (mypy)
169
+ - Check security (bandit -c pyproject.toml -r .)
170
+ - Run tests (pytest (uses pyproject.toml as config))
137
171
 
138
172
  ### Auto-generated Test Structure
139
173
 
@@ -202,8 +236,8 @@ A ruleset named `main protection` is created for the `main` branch with the foll
202
236
  - Requires review thread resolution (all comments in reviews must be resolved before merge)
203
237
  - Allowed merge methods: `squash` and `rebase` (no merge commits, keeps history clean)
204
238
  - **Required Status Checks:**
205
- - Strict mode enabled (all status checks must pass on the latest commit, not older ones (sets the health check as required status check))
206
- - Health check workflow must pass (the CI/CD pipeline must complete successfully)
239
+ - Strict mode enabled (all status checks must pass on the latest commit, not older ones)
240
+ - Health check workflow must pass (the aggregated `health_check` job ensures all matrix combinations passed successfully)
207
241
  - **Bypass Actors** - Repository admins can bypass all rules (for emergency situations)
208
242
 
209
243
  ## Utilities
@@ -1,4 +1,6 @@
1
1
  winipedia_utils/__init__.py,sha256=vOWZ8n-YemVIzDLd8eWw1HVPGH3jxuT6VtDKHbmxk_A,43
2
+ winipedia_utils/artifacts/__init__.py,sha256=XHsbmjiaGom-KX-S3leCY9cJD3aP9p_0X6xYMcdkHBU,23
3
+ winipedia_utils/artifacts/build.py,sha256=mYiAGrtNzl-Grl7rdmzl6yrc2Bas0vXyAUsMlHLF83U,2428
2
4
  winipedia_utils/concurrent/__init__.py,sha256=Tu0ig4gVCk_f1n74G35hDwH-WS3P3STVQGWjxTIbbo8,54
3
5
  winipedia_utils/concurrent/concurrent.py,sha256=h2vgxeDFsagZ10LnHKkswwF2bjY_L1hXKutejeJo48U,8648
4
6
  winipedia_utils/concurrent/multiprocessing.py,sha256=1pnAU-CS3crNOKlp68gCCvNbTvNJs0in_VASMpZ7M1c,4721
@@ -16,17 +18,17 @@ winipedia_utils/git/github/repo/protect.py,sha256=nOVjb5GVinGIClp7k9_qqgKnAl_gk1
16
18
  winipedia_utils/git/github/repo/repo.py,sha256=OqoOfqDhe_Iik71dNqi4h3fGrMno33hSjk0bpNg3eZk,7865
17
19
  winipedia_utils/git/github/workflows/__init__.py,sha256=BPdntTwFEyBMJ6MyT7gddPHswvRdH9tsRtfK72VSV7Y,57
18
20
  winipedia_utils/git/github/workflows/base/__init__.py,sha256=XHsbmjiaGom-KX-S3leCY9cJD3aP9p_0X6xYMcdkHBU,23
19
- winipedia_utils/git/github/workflows/base/base.py,sha256=t2jYHVpvhCaKpaZI9Yhr8YJEp-2D_G4VUJKVVYIUolc,9749
20
- winipedia_utils/git/github/workflows/health_check.py,sha256=cPjSJxNy9h0bKNK69crmcERACx4VGR2XytyZ1JM_wMQ,1567
21
- winipedia_utils/git/github/workflows/publish.py,sha256=TPbSp5QH2vVl55UdqE_kjf1HIkdubcgqWlkLjWFX5EA,1378
22
- winipedia_utils/git/github/workflows/release.py,sha256=hnMT12J17LmFpPCTzva-lW95MOFDQ-1bAOrTVCxeaR8,1301
21
+ winipedia_utils/git/github/workflows/base/base.py,sha256=FwdwlL3coObcHZ-5vZ_9t56XgHZVuZqE_PkAKyTM0lY,28319
22
+ winipedia_utils/git/github/workflows/health_check.py,sha256=YUCVQIrCDbXh_05jLdgkl5oOMSPkLMqdpNEGZuAgCwY,2167
23
+ winipedia_utils/git/github/workflows/publish.py,sha256=dNCcSBu7eTjmzomk3qX7BZpTzhwT5oM3Ap3hw22uoJE,1470
24
+ winipedia_utils/git/github/workflows/release.py,sha256=rQZOU5rny0Ex-KWv52SSjMLyTFyLgb6an7v-i5m1osY,2880
23
25
  winipedia_utils/git/gitignore/__init__.py,sha256=k-2E26JaZPkF69UUOJkpQl8T_PudrC7EYCIOxwgIQVU,57
24
26
  winipedia_utils/git/gitignore/config.py,sha256=Oi1gAf2mbR7vxMi0zsAFpCGzDaLNDd5S2vXEmA3eKg4,2595
25
27
  winipedia_utils/git/gitignore/gitignore.py,sha256=uE2MdynWgQuTG-y2YLR0FU5_giSE7s_TqSVQ6vnNOf8,2419
26
28
  winipedia_utils/git/pre_commit/__init__.py,sha256=gFLVGQRmS6abgy5MfPQy_GZiF1_hGxuXtcOHX95WL-A,58
27
- winipedia_utils/git/pre_commit/config.py,sha256=UagrtEp_TSb0THjmXZpvtl7agekEVOWnMmRPdWJ4kf4,1830
28
- winipedia_utils/git/pre_commit/hooks.py,sha256=HP1byMnHk8DhaHnPjp3ioKpXIAo4_9FbrehHSg9_xfs,4264
29
- winipedia_utils/git/pre_commit/run_hooks.py,sha256=UIz1k3Hx5sB6LcdIJaPNWL-YDZzbkWd7NHCsC41nczQ,1495
29
+ winipedia_utils/git/pre_commit/config.py,sha256=t0CETAbworS_1g3U4BijVsI1pzcArWTT2-WOexh8aVA,1822
30
+ winipedia_utils/git/pre_commit/hooks.py,sha256=MlIc6VI75rfwhFob-DLpPh6CNO7dte9QA3r34xEp0jQ,2475
31
+ winipedia_utils/git/pre_commit/run_hooks.py,sha256=pLdqV75-uvZZj0cYSC5pQ4VMv_8WwrhqSRJ_hw4H_gg,1769
30
32
  winipedia_utils/iterating/__init__.py,sha256=rlF9hzxbowq5yOfcXvOKOQdB-EQmfrislQpf659Zeu4,53
31
33
  winipedia_utils/iterating/iterate.py,sha256=k4U6qrnE4zij-GJhI5X0wM3pveSi8wtEsA1i8xQrfG0,3522
32
34
  winipedia_utils/logging/__init__.py,sha256=AMt1LwA_E7hexYjMpGzUempoyDdAF-dowWvq59wC5aM,51
@@ -34,21 +36,23 @@ winipedia_utils/logging/ansi.py,sha256=7Z-FITaUn5B1ZE0OUVARjNzuMui1V36iu4YTjlD6Q
34
36
  winipedia_utils/logging/config.py,sha256=sdC3GHMkJqlY-WwIsOMeTcy1bihthWV2LbvxLt9dhc4,2895
35
37
  winipedia_utils/logging/logger.py,sha256=NluvfRpY4SfJi6URjfV52l3cxeUYFMeCAJULK_PQXpQ,701
36
38
  winipedia_utils/modules/__init__.py,sha256=e3CFaC3FhK4ibknFOv1bqOZxA7XeVwmLqWX7oajUm78,51
37
- winipedia_utils/modules/class_.py,sha256=908MgZZzcJBPmlVmMPZCFssHnRzbQYOQlrF3GQhpWm4,5411
38
- winipedia_utils/modules/function.py,sha256=cjD6dXkZzhtCClUs4uiOLaDOURVASp64iwTwXmI3ICo,3217
39
- winipedia_utils/modules/module.py,sha256=s48epfMHKjEgEHRO7rGICIX0JaXppOfst2uT-jLQM6M,13766
40
- winipedia_utils/modules/package.py,sha256=ynGRQlhOYb6CX_waE5TkYW8Y4kGzoFU6oLbhFwaN6Sg,17428
39
+ winipedia_utils/modules/class_.py,sha256=LhhDoXh664h1ILP2lfxlF6M95lFoFNJhsTozxCQ0Myo,5655
40
+ winipedia_utils/modules/function.py,sha256=CvMosbeL2wyAu5eT3vjAvArn9j7aUPh_X3fGoIzwWBk,3479
41
+ winipedia_utils/modules/inspection.py,sha256=XPSJfLN6WnNmbXn-6z9D01cmqmPS-HrTPy6-B6C34tw,1821
42
+ winipedia_utils/modules/module.py,sha256=spyg4yI46BLMyhCrSSXIUbY1fHFjcpmRCdKQRUJB7pQ,12792
43
+ winipedia_utils/modules/package.py,sha256=adRj9zRiM_xw7H3itgePru9f5qhdDxvPPlRX3rfkt3o,17254
41
44
  winipedia_utils/oop/__init__.py,sha256=wGjsVwLbTVEQWOfDJvN9nlvC-3NmAi8Doc2xIrm6e78,47
42
45
  winipedia_utils/oop/mixins/__init__.py,sha256=PDK-cJcdRUfDUCz36qQ5pmMW07G133WtN49OpmILGNI,54
43
46
  winipedia_utils/oop/mixins/meta.py,sha256=0G4CzzzCoeP1Eas3vWe-uxvB5n5ncyw7Wc-sI9zmEBc,11150
44
47
  winipedia_utils/oop/mixins/mixin.py,sha256=S5y1IVRtkghxV7y0ttdmSYO439NHChRIFTOwlK7kmTo,1401
45
48
  winipedia_utils/os/__init__.py,sha256=cBRq8hWhaWvYeC3cSBYL6Y70kM9COQWHj8vVxxSadIg,46
46
- winipedia_utils/os/os.py,sha256=K_5FD1sC1h5aSdtqXAG0uq90sSweLYLkgkRPQS0Jfxg,1768
49
+ winipedia_utils/os/os.py,sha256=giBJDrWewOtxoSExNj6y_afOcxhpDAVGs2W93xUR96k,1777
47
50
  winipedia_utils/projects/__init__.py,sha256=_iYHzUcTPmutpsExPDcMF9OQDgnz-kTSuWens9iP9bI,52
48
51
  winipedia_utils/projects/poetry/__init__.py,sha256=tbvV3wYd3H39hjjlKbF84Irj4hYgv1A7KWyXdCQzFro,59
49
- winipedia_utils/projects/poetry/config.py,sha256=SFFWtY5JkKDpe1VZNmZYKIj4RvrlAZCmVnC9wz0464I,7925
50
- winipedia_utils/projects/poetry/poetry.py,sha256=CM-MKuYSITRIS95qngtCpDpjQS6tCe6joZOM03yEFdU,4033
51
- winipedia_utils/projects/project.py,sha256=rirg4xCIOTI6w7cLWufAVHAix7FGicvaCd9OnZQP8dA,521
52
+ winipedia_utils/projects/poetry/config.py,sha256=Nm2aU-FWHzcCwdxlbqeNA56_mbArYkFM13pQR-mSync,11045
53
+ winipedia_utils/projects/poetry/dev_deps.py,sha256=8QIunGKoqlNlq1Co5bT3UWzoxIiiEGpGP9si7xLI0P0,535
54
+ winipedia_utils/projects/poetry/poetry.py,sha256=e22_ltYXXF_y6UQbCwRX0NiQieyALkxDFfTLc2U9TSA,8478
55
+ winipedia_utils/projects/project.py,sha256=daLg3mwMjv2eLMM5B_0a6jPICjNwlY1camUIsNlf1sA,520
52
56
  winipedia_utils/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
53
57
  winipedia_utils/resources/__init__.py,sha256=XHsbmjiaGom-KX-S3leCY9cJD3aP9p_0X6xYMcdkHBU,23
54
58
  winipedia_utils/resources/svgs/__init__.py,sha256=XHsbmjiaGom-KX-S3leCY9cJD3aP9p_0X6xYMcdkHBU,23
@@ -64,12 +68,12 @@ winipedia_utils/resources/svgs/svg.py,sha256=uzlp4Rhnenvkq_YI409ZvR7JMTZmB5JpKsD
64
68
  winipedia_utils/security/__init__.py,sha256=HmGXOCROqIGHlBs2bEWRMkEX3rlXNsnA9Tef58AlCo4,52
65
69
  winipedia_utils/security/cryptography.py,sha256=5LMat3-9nDW2cQBr_dU7MFRdgbiK53zQqHyacs-Jq-s,793
66
70
  winipedia_utils/security/keyring.py,sha256=6kKgSTz1G80F6XeZ3Lskxdl2N6JgUH8gJdFYcGJuysU,2273
67
- winipedia_utils/setup.py,sha256=J80JAi2rYhf0N24DTO61AfUC6i9wPgYFakBFcTcaqdQ,1161
71
+ winipedia_utils/setup.py,sha256=W5GZsI8h-jZ7WQ-QHVYVEim6bgvW8J_m7OTOi558W6o,1472
68
72
  winipedia_utils/testing/__init__.py,sha256=kXhB5xw02ec5xpcW_KV--9CBKdyCjnuR-NZzAJ5tq0g,51
69
73
  winipedia_utils/testing/assertions.py,sha256=VoksKQKEXppY9e8Bk8d_WMAjRX5mDE8c5blBwzK6nWo,1494
70
74
  winipedia_utils/testing/config.py,sha256=Xtgu7Nsll6pIzHLUDsalzt-nPBNSNOs0JKCXWi5v36M,3508
71
75
  winipedia_utils/testing/convention.py,sha256=7vurpqS--awhN_FLSOviSKENGuFyY9Ejr1NKRm0MPsg,4833
72
- winipedia_utils/testing/create_tests.py,sha256=KJL23BtsnDsujUa9fwBA5AHo85vy61oxgRPSTztJT7k,9347
76
+ winipedia_utils/testing/create_tests.py,sha256=sr_j-0faeGWoIMFTdi8mLpkhUOqsgLdMkQ8MCHgF5j4,9389
73
77
  winipedia_utils/testing/fixtures.py,sha256=G8QIrZXndtud0uOk6PY3f8IIDoyX_ronogjeLAYGjrM,1033
74
78
  winipedia_utils/testing/skip.py,sha256=WpVk1J4DBISDfR6CXOKCEjP4MHy52DaGwPkmdDuM6Y0,486
75
79
  winipedia_utils/testing/tests/__init__.py,sha256=kL-1O6lAO5j4JPOqPdi3dHdbOQ_UXcgPFppj82HhrRU,57
@@ -86,9 +90,9 @@ winipedia_utils/testing/tests/base/utils/__init__.py,sha256=mC-8dCkp8xarqkQu2QQL
86
90
  winipedia_utils/testing/tests/base/utils/utils.py,sha256=D7N-PW4N8853nJ2m4eYjO3jBMByYB9oh1GK4Hl5Tbwg,2598
87
91
  winipedia_utils/testing/tests/conftest.py,sha256=BLgUJtLecOwuEsIyJ__0buqovd5AhiGvbMNk8CHgSQs,888
88
92
  winipedia_utils/text/__init__.py,sha256=j2bwtK6kyeHI6SnoBjpRju0C1W2n2paXBDlNjNtaUxA,48
89
- winipedia_utils/text/config.py,sha256=BPpuD4ywzzzt6Jz2M5Eln5d1NLlDp4r7CPwQOgHkxcg,7782
90
- winipedia_utils/text/string.py,sha256=yXmwOab5hXyVQG1NwlWDpy2prj0U7Vb2F5HKLT2Y77Q,3382
91
- winipedia_utils-0.4.46.dist-info/METADATA,sha256=HbApkj3FfKSRnBKjXOvSSpWrmHmX97TNjpuDK7FcSeM,14588
92
- winipedia_utils-0.4.46.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
93
- winipedia_utils-0.4.46.dist-info/licenses/LICENSE,sha256=o316mE2gGzd__JT69p7S_zlOmKiHh8YjpImCCcWyTvM,1066
94
- winipedia_utils-0.4.46.dist-info/RECORD,,
93
+ winipedia_utils/text/config.py,sha256=jjKmn-tSbyaK6jGL0FxFHSREP6A6V1ZSX3RuIgvQ4io,7794
94
+ winipedia_utils/text/string.py,sha256=8aFfr_HPojJf9ocyyV-TD2nWkAQdTEi7L-bf3L5__Ws,4420
95
+ winipedia_utils-0.6.12.dist-info/METADATA,sha256=cyC5UhlYKg7Xiy4FkRFiZgdgWEiCVRN-cR1O99h8NLo,16516
96
+ winipedia_utils-0.6.12.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
97
+ winipedia_utils-0.6.12.dist-info/licenses/LICENSE,sha256=o316mE2gGzd__JT69p7S_zlOmKiHh8YjpImCCcWyTvM,1066
98
+ winipedia_utils-0.6.12.dist-info/RECORD,,