stdl 0.6.3__tar.gz → 0.6.5__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.
- {stdl-0.6.3 → stdl-0.6.5}/.editorconfig +2 -1
- stdl-0.6.5/.github/workflows/lint.yml +23 -0
- {stdl-0.6.3 → stdl-0.6.5}/.github/workflows/publish.yml +9 -4
- stdl-0.6.3/.github/workflows/tests.yml → stdl-0.6.5/.github/workflows/test.yml +11 -4
- {stdl-0.6.3 → stdl-0.6.5}/.pre-commit-config.yaml +3 -3
- stdl-0.6.5/Justfile +62 -0
- {stdl-0.6.3 → stdl-0.6.5}/PKG-INFO +9 -9
- {stdl-0.6.3 → stdl-0.6.5}/README.md +1 -1
- {stdl-0.6.3 → stdl-0.6.5}/pyproject.toml +55 -49
- {stdl-0.6.3 → stdl-0.6.5}/stdl/color.py +383 -121
- {stdl-0.6.3 → stdl-0.6.5}/stdl/decorators.py +12 -8
- {stdl-0.6.3 → stdl-0.6.5}/stdl/dt.py +5 -5
- {stdl-0.6.3 → stdl-0.6.5}/stdl/fs.py +42 -21
- {stdl-0.6.3 → stdl-0.6.5}/stdl/import_lazy.py +9 -8
- {stdl-0.6.3 → stdl-0.6.5}/stdl/log.py +6 -6
- {stdl-0.6.3 → stdl-0.6.5}/stdl/net.py +4 -3
- {stdl-0.6.3 → stdl-0.6.5}/stdl/st.py +6 -6
- {stdl-0.6.3 → stdl-0.6.5}/tests/test_color.py +172 -132
- stdl-0.6.5/tests/test_pydantic_integration.py +131 -0
- stdl-0.6.5/uv.lock +690 -0
- stdl-0.6.3/.github/workflows/lint.yml +0 -17
- stdl-0.6.3/Justfile +0 -41
- stdl-0.6.3/uv.lock +0 -853
- {stdl-0.6.3 → stdl-0.6.5}/.gitignore +0 -0
- {stdl-0.6.3 → stdl-0.6.5}/.python-version +0 -0
- {stdl-0.6.3 → stdl-0.6.5}/.readthedocs.yml +0 -0
- {stdl-0.6.3 → stdl-0.6.5}/CONTRIBUTING.md +0 -0
- {stdl-0.6.3 → stdl-0.6.5}/LICENSE +0 -0
- {stdl-0.6.3 → stdl-0.6.5}/docs/index.md +0 -0
- {stdl-0.6.3 → stdl-0.6.5}/docs/reference/color.md +0 -0
- {stdl-0.6.3 → stdl-0.6.5}/docs/reference/decorators.md +0 -0
- {stdl-0.6.3 → stdl-0.6.5}/docs/reference/dt.md +0 -0
- {stdl-0.6.3 → stdl-0.6.5}/docs/reference/fs.md +0 -0
- {stdl-0.6.3 → stdl-0.6.5}/docs/reference/import_lazy.md +0 -0
- {stdl-0.6.3 → stdl-0.6.5}/docs/reference/log.md +0 -0
- {stdl-0.6.3 → stdl-0.6.5}/docs/reference/net.md +0 -0
- {stdl-0.6.3 → stdl-0.6.5}/docs/reference/st.md +0 -0
- {stdl-0.6.3 → stdl-0.6.5}/docs/requirements.txt +0 -0
- {stdl-0.6.3 → stdl-0.6.5}/mkdocs.yml +0 -0
- {stdl-0.6.3 → stdl-0.6.5}/stdl/__init__.py +0 -0
- {stdl-0.6.3 → stdl-0.6.5}/stdl/lst.py +0 -0
- {stdl-0.6.3 → stdl-0.6.5}/tests/test_decorators.py +0 -0
- {stdl-0.6.3 → stdl-0.6.5}/tests/test_dt.py +0 -0
- {stdl-0.6.3 → stdl-0.6.5}/tests/test_fs.py +0 -0
- {stdl-0.6.3 → stdl-0.6.5}/tests/test_lst.py +0 -0
- {stdl-0.6.3 → stdl-0.6.5}/tests/test_st.py +0 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
name: Lint
|
|
2
|
+
on: [push, pull_request]
|
|
3
|
+
|
|
4
|
+
jobs:
|
|
5
|
+
lint:
|
|
6
|
+
runs-on: ubuntu-latest
|
|
7
|
+
steps:
|
|
8
|
+
- uses: actions/checkout@v5
|
|
9
|
+
|
|
10
|
+
- name: Install uv
|
|
11
|
+
uses: astral-sh/setup-uv@v7
|
|
12
|
+
|
|
13
|
+
- name: Set up Python
|
|
14
|
+
run: uv python install 3.12
|
|
15
|
+
|
|
16
|
+
- name: Install dependencies
|
|
17
|
+
run: uv sync --extra dev --python 3.12
|
|
18
|
+
|
|
19
|
+
- name: Check formatting with Ruff
|
|
20
|
+
run: uv run --python 3.12 ruff format --check .
|
|
21
|
+
|
|
22
|
+
- name: Run Ruff lint
|
|
23
|
+
run: uv run --python 3.12 ruff check .
|
|
@@ -2,19 +2,24 @@ name: Upload Python Package
|
|
|
2
2
|
on:
|
|
3
3
|
release:
|
|
4
4
|
types: [published]
|
|
5
|
+
|
|
5
6
|
jobs:
|
|
6
7
|
deploy:
|
|
7
8
|
runs-on: ubuntu-latest
|
|
8
9
|
steps:
|
|
9
|
-
- uses: actions/checkout@
|
|
10
|
+
- uses: actions/checkout@v5
|
|
11
|
+
|
|
10
12
|
- name: Install uv
|
|
11
|
-
uses: astral-sh/setup-uv@
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
uses: astral-sh/setup-uv@v7
|
|
14
|
+
with:
|
|
15
|
+
python-version: 3.12
|
|
16
|
+
|
|
14
17
|
- name: Build and publish
|
|
15
18
|
env:
|
|
16
19
|
TWINE_USERNAME: __token__
|
|
20
|
+
|
|
17
21
|
TWINE_PASSWORD: ${{ secrets.TOKEN }}
|
|
22
|
+
|
|
18
23
|
run: |
|
|
19
24
|
uv build
|
|
20
25
|
uv run --with twine twine upload dist/*
|
|
@@ -1,24 +1,31 @@
|
|
|
1
1
|
name: Tests
|
|
2
2
|
on: [push, pull_request]
|
|
3
|
+
|
|
3
4
|
jobs:
|
|
4
5
|
tests:
|
|
5
|
-
runs-on: ubuntu-latest
|
|
6
6
|
strategy:
|
|
7
7
|
fail-fast: false
|
|
8
8
|
matrix:
|
|
9
|
+
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
9
10
|
python-version: [
|
|
10
11
|
"3.10",
|
|
11
12
|
"3.11",
|
|
12
13
|
"3.12",
|
|
13
|
-
"3.13"
|
|
14
|
+
"3.13",
|
|
15
|
+
"3.14"
|
|
14
16
|
]
|
|
17
|
+
runs-on: ${{ matrix.os }}
|
|
18
|
+
|
|
15
19
|
steps:
|
|
16
|
-
- uses: actions/checkout@
|
|
20
|
+
- uses: actions/checkout@v5
|
|
21
|
+
|
|
17
22
|
- name: Install uv
|
|
18
|
-
uses: astral-sh/setup-uv@
|
|
23
|
+
uses: astral-sh/setup-uv@v7
|
|
24
|
+
|
|
19
25
|
|
|
20
26
|
- name: Set up Python ${{ matrix.python-version }}
|
|
21
27
|
run: uv python install ${{ matrix.python-version }}
|
|
28
|
+
|
|
22
29
|
- name: Install dependencies
|
|
23
30
|
run: uv sync --extra test --python ${{ matrix.python-version }}
|
|
24
31
|
|
stdl-0.6.5/Justfile
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
@_:
|
|
2
|
+
just --list
|
|
3
|
+
|
|
4
|
+
_require-uv:
|
|
5
|
+
@uv --version > /dev/null || (echo "Please install uv: https://docs.astral.sh/uv/" && exit 1)
|
|
6
|
+
|
|
7
|
+
_require-hatch:
|
|
8
|
+
@hatch --version > /dev/null || (echo "Please install hatch: uv tool install hatch" && exit 1)
|
|
9
|
+
|
|
10
|
+
# check code style and potential issues
|
|
11
|
+
lint:
|
|
12
|
+
ruff check
|
|
13
|
+
|
|
14
|
+
# format code
|
|
15
|
+
format:
|
|
16
|
+
ruff format
|
|
17
|
+
|
|
18
|
+
# fix automatically fixable linting issues
|
|
19
|
+
fix:
|
|
20
|
+
ruff check --fix
|
|
21
|
+
|
|
22
|
+
# run tests across all supported Python versions
|
|
23
|
+
test: _require-hatch
|
|
24
|
+
hatch run test:test
|
|
25
|
+
|
|
26
|
+
# build the package
|
|
27
|
+
build: _require-uv
|
|
28
|
+
uv build
|
|
29
|
+
|
|
30
|
+
# setup or update local dev environment, keeps previously installed extras
|
|
31
|
+
dev: _require-uv
|
|
32
|
+
uv sync --inexact --extra dev
|
|
33
|
+
uv run pre-commit install
|
|
34
|
+
|
|
35
|
+
# run tests with coverage and show a coverage report
|
|
36
|
+
coverage:
|
|
37
|
+
coverage run -m pytest
|
|
38
|
+
coverage report
|
|
39
|
+
|
|
40
|
+
# clean build artifacts and caches
|
|
41
|
+
clean:
|
|
42
|
+
rm -rf .venv .pytest_cache .mypy_cache .ruff_cache
|
|
43
|
+
find . -type d -name "__pycache__" -exec rm -r {} +
|
|
44
|
+
|
|
45
|
+
# static type check with mypy
|
|
46
|
+
typecheck: _require-uv
|
|
47
|
+
uv run mypy
|
|
48
|
+
|
|
49
|
+
# check code for common misspellings
|
|
50
|
+
spell:
|
|
51
|
+
codespell
|
|
52
|
+
|
|
53
|
+
# run all quality checks
|
|
54
|
+
check: format lint coverage typecheck spell
|
|
55
|
+
|
|
56
|
+
# list available recipes
|
|
57
|
+
help:
|
|
58
|
+
just --list
|
|
59
|
+
|
|
60
|
+
alias fmt := format
|
|
61
|
+
alias cov := coverage
|
|
62
|
+
alias mypy := typecheck
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: stdl
|
|
3
|
-
Version: 0.6.
|
|
3
|
+
Version: 0.6.5
|
|
4
4
|
Summary: Extended Python Standard Library
|
|
5
5
|
Project-URL: Repository, https://github.com/zigai/stdl
|
|
6
|
-
Project-URL: Documentation, https://stdl.readthedocs.io
|
|
7
6
|
Project-URL: Issues, https://github.com/zigai/stdl/issues
|
|
8
7
|
Project-URL: Homepage, https://github.com/zigai/stdl
|
|
9
8
|
Author-email: Žiga Ivanšek <ziga.ivansek@gmail.com>
|
|
@@ -29,7 +28,7 @@ License: MIT License
|
|
|
29
28
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
30
29
|
SOFTWARE.
|
|
31
30
|
License-File: LICENSE
|
|
32
|
-
Keywords: ANSI colors,color formats,filesystem,lazy import,list utils,logging configuration,python lazy import,python
|
|
31
|
+
Keywords: ANSI colors,color formats,filesystem,lazy import,list utils,logging configuration,python lazy import,python utilities,standard library,stdl,string utils,terminal links,terminal output
|
|
33
32
|
Classifier: Intended Audience :: Developers
|
|
34
33
|
Classifier: License :: OSI Approved :: MIT License
|
|
35
34
|
Classifier: Operating System :: OS Independent
|
|
@@ -40,6 +39,7 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
40
39
|
Classifier: Programming Language :: Python :: 3.11
|
|
41
40
|
Classifier: Programming Language :: Python :: 3.12
|
|
42
41
|
Classifier: Programming Language :: Python :: 3.13
|
|
42
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
43
43
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
44
44
|
Classifier: Typing :: Typed
|
|
45
45
|
Requires-Python: >=3.10
|
|
@@ -48,21 +48,21 @@ Requires-Dist: pyyaml>=6.0.2
|
|
|
48
48
|
Requires-Dist: toml>=0.10.2
|
|
49
49
|
Requires-Dist: tqdm>=4.67.1
|
|
50
50
|
Provides-Extra: dev
|
|
51
|
-
Requires-Dist:
|
|
52
|
-
Requires-Dist:
|
|
53
|
-
Requires-Dist:
|
|
54
|
-
Requires-Dist: mkdocs-material; extra == 'dev'
|
|
55
|
-
Requires-Dist: mkdocstrings[python]; extra == 'dev'
|
|
51
|
+
Requires-Dist: codespell; extra == 'dev'
|
|
52
|
+
Requires-Dist: coverage; extra == 'dev'
|
|
53
|
+
Requires-Dist: mypy; extra == 'dev'
|
|
56
54
|
Requires-Dist: pre-commit; extra == 'dev'
|
|
57
55
|
Requires-Dist: pytest; extra == 'dev'
|
|
58
56
|
Requires-Dist: ruff; extra == 'dev'
|
|
59
57
|
Provides-Extra: test
|
|
58
|
+
Requires-Dist: coverage; extra == 'test'
|
|
59
|
+
Requires-Dist: pydantic>=2; extra == 'test'
|
|
60
60
|
Requires-Dist: pytest; extra == 'test'
|
|
61
61
|
Description-Content-Type: text/markdown
|
|
62
62
|
|
|
63
63
|
# stdl
|
|
64
64
|
|
|
65
|
-
[](https://github.com/zigai/stdl/actions/workflows/
|
|
65
|
+
[](https://github.com/zigai/stdl/actions/workflows/test.yml)
|
|
66
66
|
[](https://stdl.readthedocs.io/en/latest/?badge=latest)
|
|
67
67
|
[](https://badge.fury.io/py/stdl)
|
|
68
68
|

|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# stdl
|
|
2
2
|
|
|
3
|
-
[](https://github.com/zigai/stdl/actions/workflows/
|
|
3
|
+
[](https://github.com/zigai/stdl/actions/workflows/test.yml)
|
|
4
4
|
[](https://stdl.readthedocs.io/en/latest/?badge=latest)
|
|
5
5
|
[](https://badge.fury.io/py/stdl)
|
|
6
6
|

|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "stdl"
|
|
3
|
-
version = "0.6.
|
|
3
|
+
version = "0.6.5"
|
|
4
4
|
description = "Extended Python Standard Library"
|
|
5
5
|
authors = [{ name = "Žiga Ivanšek", email = "ziga.ivansek@gmail.com" }]
|
|
6
6
|
license = { file = "LICENSE" }
|
|
@@ -26,12 +26,13 @@ classifiers = [
|
|
|
26
26
|
"Programming Language :: Python :: 3.11",
|
|
27
27
|
"Programming Language :: Python :: 3.12",
|
|
28
28
|
"Programming Language :: Python :: 3.13",
|
|
29
|
+
"Programming Language :: Python :: 3.14",
|
|
29
30
|
]
|
|
30
31
|
|
|
31
32
|
keywords = [
|
|
32
33
|
"stdl",
|
|
33
34
|
"standard library",
|
|
34
|
-
"python
|
|
35
|
+
"python utilities",
|
|
35
36
|
"filesystem",
|
|
36
37
|
"list utils",
|
|
37
38
|
"string utils",
|
|
@@ -46,21 +47,11 @@ keywords = [
|
|
|
46
47
|
|
|
47
48
|
|
|
48
49
|
[project.optional-dependencies]
|
|
49
|
-
test = ["pytest"]
|
|
50
|
-
dev = [
|
|
51
|
-
"pytest",
|
|
52
|
-
"black",
|
|
53
|
-
"ruff",
|
|
54
|
-
"pre-commit",
|
|
55
|
-
"mkdocs",
|
|
56
|
-
"mkdocs-material",
|
|
57
|
-
"mkdocs-autorefs",
|
|
58
|
-
"mkdocstrings[python]",
|
|
59
|
-
]
|
|
50
|
+
test = ["pytest", "coverage", "pydantic>=2"]
|
|
51
|
+
dev = ["pytest", "coverage", "ruff", "pre-commit", "mypy", "codespell"]
|
|
60
52
|
|
|
61
53
|
[project.urls]
|
|
62
54
|
Repository = "https://github.com/zigai/stdl"
|
|
63
|
-
Documentation = "https://stdl.readthedocs.io"
|
|
64
55
|
Issues = "https://github.com/zigai/stdl/issues"
|
|
65
56
|
Homepage = "https://github.com/zigai/stdl"
|
|
66
57
|
|
|
@@ -71,10 +62,6 @@ build-backend = "hatchling.build"
|
|
|
71
62
|
[tool.hatch.build.targets.wheel]
|
|
72
63
|
packages = ["stdl"]
|
|
73
64
|
|
|
74
|
-
[tool.black]
|
|
75
|
-
line-length = 100
|
|
76
|
-
target_version = ['py310', 'py311', 'py312', 'py313']
|
|
77
|
-
|
|
78
65
|
[tool.ruff]
|
|
79
66
|
line-length = 100
|
|
80
67
|
|
|
@@ -84,6 +71,7 @@ select = [
|
|
|
84
71
|
"E", # Pycodestyle (Error)
|
|
85
72
|
'I', # isort
|
|
86
73
|
'D', # pydocstyle
|
|
74
|
+
'D213', # pydocstyle
|
|
87
75
|
'UP', # pyupgrade
|
|
88
76
|
'YTT', # flake8-2020
|
|
89
77
|
'B', # flake8-bugbear
|
|
@@ -147,54 +135,72 @@ ignore = [
|
|
|
147
135
|
"N806",
|
|
148
136
|
"UP007",
|
|
149
137
|
"UP038",
|
|
150
|
-
"E741",
|
|
151
|
-
]
|
|
152
|
-
isort = { known-first-party = ["stdl", 'tests'] }
|
|
153
|
-
pydocstyle = { convention = 'google' }
|
|
154
|
-
|
|
155
|
-
exclude = [
|
|
156
|
-
".bzr",
|
|
157
|
-
".direnv",
|
|
158
|
-
".eggs",
|
|
159
|
-
".git",
|
|
160
|
-
".hg",
|
|
161
|
-
".mypy_cache",
|
|
162
|
-
".nox",
|
|
163
|
-
".pants.d",
|
|
164
|
-
".pytype",
|
|
165
|
-
".ruff_cache",
|
|
166
|
-
".svn",
|
|
167
|
-
".tox",
|
|
168
|
-
".venv",
|
|
169
|
-
"__pypackages__",
|
|
170
|
-
"_build",
|
|
171
|
-
"buck-out",
|
|
172
|
-
"build",
|
|
173
|
-
"dist",
|
|
174
|
-
"node_modules",
|
|
175
|
-
"venv",
|
|
176
|
-
"tests/*",
|
|
177
|
-
"tests/**/*",
|
|
178
138
|
]
|
|
139
|
+
exclude = ["build", "tests/**"]
|
|
179
140
|
|
|
180
141
|
[tool.ruff.lint.per-file-ignores]
|
|
181
142
|
"__init__.py" = [
|
|
182
143
|
"F401", # Unused import
|
|
183
144
|
"E402", # Module import not at top of file
|
|
184
145
|
]
|
|
146
|
+
"stdl/color.py" = [
|
|
147
|
+
"E741", # Ambiguous variable name 'l' (used for lightness in HSL color space)
|
|
148
|
+
]
|
|
149
|
+
"stdl/lst.py" = [
|
|
150
|
+
"E741", # Ambiguous variable name 'l' (used as list parameter name)
|
|
151
|
+
]
|
|
185
152
|
|
|
186
153
|
[tool.ruff.format]
|
|
187
154
|
quote-style = "double"
|
|
188
155
|
indent-style = "space"
|
|
189
156
|
skip-magic-trailing-comma = false
|
|
190
|
-
line-ending = "
|
|
157
|
+
line-ending = "lf"
|
|
158
|
+
|
|
159
|
+
[tool.ruff.lint.isort]
|
|
160
|
+
known-first-party = ["stdl", "tests"]
|
|
161
|
+
|
|
162
|
+
[tool.ruff.lint.pydocstyle]
|
|
163
|
+
convention = "google"
|
|
164
|
+
|
|
165
|
+
[tool.codespell]
|
|
166
|
+
skip = '.git,uv.lock'
|
|
191
167
|
|
|
192
168
|
[tool.hatch.envs.test]
|
|
193
169
|
features = ["test"]
|
|
194
170
|
installer = "uv"
|
|
195
171
|
|
|
196
172
|
[[tool.hatch.envs.test.matrix]]
|
|
197
|
-
python = ["3.10", "3.11", "3.12", "3.13"]
|
|
173
|
+
python = ["3.10", "3.11", "3.12", "3.13", "3.14"]
|
|
198
174
|
|
|
199
175
|
[tool.hatch.envs.test.scripts]
|
|
200
|
-
test = "pytest
|
|
176
|
+
test = "pytest {args}"
|
|
177
|
+
cov = "coverage run -m pytest {args}"
|
|
178
|
+
|
|
179
|
+
[tool.coverage.run]
|
|
180
|
+
source = ["stdl"]
|
|
181
|
+
branch = true
|
|
182
|
+
|
|
183
|
+
[tool.coverage.report]
|
|
184
|
+
exclude_lines = [
|
|
185
|
+
'pragma: no cover',
|
|
186
|
+
'raise NotImplementedError',
|
|
187
|
+
'if TYPE_CHECKING:',
|
|
188
|
+
'if typing.TYPE_CHECKING:',
|
|
189
|
+
]
|
|
190
|
+
omit = ["tests/*", "tests/**"]
|
|
191
|
+
|
|
192
|
+
[tool.mypy]
|
|
193
|
+
python_version = "3.10"
|
|
194
|
+
files = ["stdl"]
|
|
195
|
+
exclude = ["^tests/"]
|
|
196
|
+
|
|
197
|
+
disallow_untyped_defs = true
|
|
198
|
+
disallow_untyped_calls = true
|
|
199
|
+
disallow_any_generics = true
|
|
200
|
+
no_implicit_optional = true
|
|
201
|
+
warn_unused_ignores = true
|
|
202
|
+
warn_redundant_casts = true
|
|
203
|
+
warn_return_any = true
|
|
204
|
+
warn_unused_configs = true
|
|
205
|
+
strict_equality = true
|
|
206
|
+
ignore_missing_imports = true
|