tinydantic 0.1.9__tar.gz → 0.1.10__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.
- tinydantic-0.1.10/.editorconfig +16 -0
- tinydantic-0.1.10/.github/workflows/ci.yaml +95 -0
- tinydantic-0.1.9/.github/workflows/publish.yml → tinydantic-0.1.10/.github/workflows/publish-python-package.yaml +15 -6
- {tinydantic-0.1.9 → tinydantic-0.1.10}/.pre-commit-config.yaml +24 -4
- {tinydantic-0.1.9 → tinydantic-0.1.10}/.vscode/extensions.json +11 -7
- tinydantic-0.1.10/.yamllint +51 -0
- {tinydantic-0.1.9 → tinydantic-0.1.10}/LICENSE.md +3 -3
- {tinydantic-0.1.9 → tinydantic-0.1.10}/PKG-INFO +1 -1
- tinydantic-0.1.9/mkdocs.yml → tinydantic-0.1.10/mkdocs.yaml +2 -1
- {tinydantic-0.1.9 → tinydantic-0.1.10}/pyproject.toml +4 -1
- tinydantic-0.1.9/.github/workflows/test.yml +0 -52
- {tinydantic-0.1.9 → tinydantic-0.1.10}/.gitignore +0 -0
- {tinydantic-0.1.9 → tinydantic-0.1.10}/LICENSES/Apache-2.0.txt +0 -0
- {tinydantic-0.1.9 → tinydantic-0.1.10}/LICENSES/CC-BY-4.0.txt +0 -0
- {tinydantic-0.1.9 → tinydantic-0.1.10}/LICENSES/MIT.txt +0 -0
- {tinydantic-0.1.9 → tinydantic-0.1.10}/README.md +0 -0
- {tinydantic-0.1.9 → tinydantic-0.1.10}/REUSE.toml +0 -0
- {tinydantic-0.1.9 → tinydantic-0.1.10}/docs/index.md +0 -0
- {tinydantic-0.1.9 → tinydantic-0.1.10}/docs/installation.md +0 -0
- {tinydantic-0.1.9 → tinydantic-0.1.10}/src/tinydantic/__about__.py +0 -0
- {tinydantic-0.1.9 → tinydantic-0.1.10}/src/tinydantic/__init__.py +0 -0
- {tinydantic-0.1.9 → tinydantic-0.1.10}/src/tinydantic/py.typed +0 -0
- {tinydantic-0.1.9 → tinydantic-0.1.10}/taplo.toml +0 -0
- {tinydantic-0.1.9 → tinydantic-0.1.10}/tests/__init__.py +0 -0
- {tinydantic-0.1.9 → tinydantic-0.1.10}/tests/test_version.py +0 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# SPDX-FileCopyrightText: Chris Wilson <christopher.david.wilson@gmail.com>
|
|
2
|
+
#
|
|
3
|
+
# SPDX-License-Identifier: Apache-2.0 OR MIT
|
|
4
|
+
|
|
5
|
+
[*]
|
|
6
|
+
charset = utf-8
|
|
7
|
+
insert_final_newline = true
|
|
8
|
+
# Caveat: Prettier won’t trim trailing whitespace inside template strings
|
|
9
|
+
trim_trailing_whitespace = true
|
|
10
|
+
|
|
11
|
+
# Prettier will parse the following properties and use them as config
|
|
12
|
+
# https://prettier.io/docs/en/configuration.html#editorconfig
|
|
13
|
+
end_of_line = lf
|
|
14
|
+
indent_style = space
|
|
15
|
+
indent_size = 2
|
|
16
|
+
max_line_length = 80
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# SPDX-FileCopyrightText: Chris Wilson <christopher.david.wilson@gmail.com>
|
|
2
|
+
#
|
|
3
|
+
# SPDX-License-Identifier: Apache-2.0 OR MIT
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
name: CI
|
|
7
|
+
|
|
8
|
+
on: # yamllint disable-line rule:truthy
|
|
9
|
+
push:
|
|
10
|
+
branches:
|
|
11
|
+
- main
|
|
12
|
+
tags:
|
|
13
|
+
- "**"
|
|
14
|
+
pull_request:
|
|
15
|
+
workflow_dispatch:
|
|
16
|
+
|
|
17
|
+
concurrency:
|
|
18
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
19
|
+
cancel-in-progress: true
|
|
20
|
+
|
|
21
|
+
env:
|
|
22
|
+
PYTHONUNBUFFERED: "1"
|
|
23
|
+
FORCE_COLOR: "1"
|
|
24
|
+
PIP_DISABLE_PIP_VERSION_CHECK: "1"
|
|
25
|
+
|
|
26
|
+
jobs:
|
|
27
|
+
build-docs:
|
|
28
|
+
name: Build Docs
|
|
29
|
+
runs-on: ubuntu-latest
|
|
30
|
+
steps:
|
|
31
|
+
- uses: actions/checkout@v4
|
|
32
|
+
- name: Set up Python
|
|
33
|
+
uses: actions/setup-python@v5
|
|
34
|
+
with:
|
|
35
|
+
# Netlify default Python version is 3.8
|
|
36
|
+
# https://docs.netlify.com/configure-builds/available-software-at-build-time/#languages
|
|
37
|
+
python-version: "3.8"
|
|
38
|
+
- name: Install Hatch
|
|
39
|
+
run: pip install --upgrade hatch
|
|
40
|
+
- name: Build docs
|
|
41
|
+
run: hatch run doc:build
|
|
42
|
+
|
|
43
|
+
# pre-commit can modify files so we can't just run this as a step in the
|
|
44
|
+
# matrix tests below. There is no way to disable this behavior, see
|
|
45
|
+
# https://github.com/pre-commit/pre-commit-hooks/issues/108
|
|
46
|
+
pre-commit:
|
|
47
|
+
name: Run pre-commit
|
|
48
|
+
runs-on: ubuntu-latest
|
|
49
|
+
steps:
|
|
50
|
+
- uses: actions/checkout@v4
|
|
51
|
+
- uses: actions/setup-python@v5
|
|
52
|
+
- uses: pre-commit/action@v3.0.1
|
|
53
|
+
with:
|
|
54
|
+
extra_args: --all-files --verbose
|
|
55
|
+
|
|
56
|
+
test:
|
|
57
|
+
name: >-
|
|
58
|
+
Python ${{ matrix.python-version }} on ${{ startsWith(matrix.os, 'macos-')
|
|
59
|
+
&& 'macOS' || startsWith(matrix.os, 'windows-')
|
|
60
|
+
&& 'Windows' || 'Linux' }}
|
|
61
|
+
runs-on: ${{ matrix.os }}
|
|
62
|
+
strategy:
|
|
63
|
+
fail-fast: false
|
|
64
|
+
matrix:
|
|
65
|
+
os:
|
|
66
|
+
- ubuntu-latest
|
|
67
|
+
- windows-latest
|
|
68
|
+
- macos-latest
|
|
69
|
+
python-version:
|
|
70
|
+
- "3.8"
|
|
71
|
+
- "3.9"
|
|
72
|
+
- "3.10"
|
|
73
|
+
- "3.11"
|
|
74
|
+
- "3.12"
|
|
75
|
+
steps:
|
|
76
|
+
- uses: actions/checkout@v4
|
|
77
|
+
with:
|
|
78
|
+
fetch-depth: 0 # https://github.com/actions/checkout/issues/249
|
|
79
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
80
|
+
uses: actions/setup-python@v5
|
|
81
|
+
with:
|
|
82
|
+
python-version: ${{ matrix.python-version }}
|
|
83
|
+
- name: Install Hatch
|
|
84
|
+
run: pip install --upgrade hatch
|
|
85
|
+
- name: Run static analysis
|
|
86
|
+
run: hatch fmt --check
|
|
87
|
+
- name: Run tests
|
|
88
|
+
run: >-
|
|
89
|
+
hatch test
|
|
90
|
+
--python ${{ matrix.python-version }}
|
|
91
|
+
--cover
|
|
92
|
+
--randomize
|
|
93
|
+
--parallel
|
|
94
|
+
--retries 2
|
|
95
|
+
--retry-delay 1
|
|
@@ -2,12 +2,15 @@
|
|
|
2
2
|
#
|
|
3
3
|
# SPDX-License-Identifier: Apache-2.0 OR MIT
|
|
4
4
|
|
|
5
|
+
---
|
|
5
6
|
name: Publish Python package
|
|
6
7
|
|
|
7
|
-
on:
|
|
8
|
+
on: # yamllint disable-line rule:truthy
|
|
8
9
|
push:
|
|
9
|
-
branches:
|
|
10
|
-
|
|
10
|
+
branches:
|
|
11
|
+
- main
|
|
12
|
+
tags:
|
|
13
|
+
- "**"
|
|
11
14
|
|
|
12
15
|
permissions:
|
|
13
16
|
attestations: write
|
|
@@ -29,11 +32,14 @@ jobs:
|
|
|
29
32
|
fetch-depth: 0 # https://github.com/actions/checkout/issues/249
|
|
30
33
|
- uses: hynek/build-and-inspect-python-package@v2
|
|
31
34
|
with:
|
|
32
|
-
attest-build-provenance-github:
|
|
35
|
+
attest-build-provenance-github: "true"
|
|
33
36
|
|
|
34
37
|
publish-to-pypi:
|
|
35
38
|
name: Publish to PyPI
|
|
36
|
-
|
|
39
|
+
# only publish to PyPI on tag pushes
|
|
40
|
+
if: >-
|
|
41
|
+
github.repository_owner == 'tinydantic'
|
|
42
|
+
&& startsWith(github.ref, 'refs/tags/')
|
|
37
43
|
needs:
|
|
38
44
|
- build
|
|
39
45
|
runs-on: ubuntu-latest
|
|
@@ -86,7 +92,10 @@ jobs:
|
|
|
86
92
|
|
|
87
93
|
publish-to-testpypi:
|
|
88
94
|
name: Publish to TestPyPI
|
|
89
|
-
|
|
95
|
+
# only publish to TestPyPI on pushes to the main branch
|
|
96
|
+
if: >-
|
|
97
|
+
github.repository_owner == 'tinydantic'
|
|
98
|
+
&& github.ref == 'refs/heads/main'
|
|
90
99
|
needs:
|
|
91
100
|
- build
|
|
92
101
|
runs-on: ubuntu-latest
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
#
|
|
3
3
|
# SPDX-License-Identifier: Apache-2.0 OR MIT
|
|
4
4
|
|
|
5
|
+
---
|
|
5
6
|
default_install_hook_types:
|
|
6
7
|
- pre-commit
|
|
7
8
|
- commit-msg
|
|
@@ -26,13 +27,16 @@ repos:
|
|
|
26
27
|
- id: debug-statements
|
|
27
28
|
- id: destroyed-symlinks
|
|
28
29
|
- id: detect-aws-credentials
|
|
29
|
-
args:
|
|
30
|
+
args:
|
|
31
|
+
- --allow-missing-credentials
|
|
30
32
|
- id: detect-private-key
|
|
31
33
|
- id: end-of-file-fixer
|
|
32
34
|
- id: name-tests-test
|
|
33
|
-
args:
|
|
35
|
+
args:
|
|
36
|
+
- --pytest-test-first
|
|
34
37
|
- id: trailing-whitespace
|
|
35
|
-
args:
|
|
38
|
+
args:
|
|
39
|
+
- --markdown-linebreak-ext=md
|
|
36
40
|
- repo: https://github.com/fsfe/reuse-tool
|
|
37
41
|
rev: v4.0.3
|
|
38
42
|
hooks:
|
|
@@ -41,7 +45,8 @@ repos:
|
|
|
41
45
|
rev: v0.5.4
|
|
42
46
|
hooks:
|
|
43
47
|
- id: ruff
|
|
44
|
-
args:
|
|
48
|
+
args:
|
|
49
|
+
- --fix
|
|
45
50
|
- id: ruff-format
|
|
46
51
|
# Experimental taplo support
|
|
47
52
|
# https://github.com/ComPWA/mirrors-taplo/issues/13#issuecomment-1930749688
|
|
@@ -58,3 +63,18 @@ repos:
|
|
|
58
63
|
hooks:
|
|
59
64
|
- id: interrogate
|
|
60
65
|
pass_filenames: false
|
|
66
|
+
# https://github.com/pre-commit/mirrors-prettier was archived Apr 11, 2024
|
|
67
|
+
# See also https://github.com/prettier/prettier/issues/15742
|
|
68
|
+
- repo: https://github.com/rbubley/mirrors-prettier
|
|
69
|
+
rev: v3.3.3
|
|
70
|
+
hooks:
|
|
71
|
+
- id: prettier
|
|
72
|
+
stages:
|
|
73
|
+
# Prevents "[error] No matching files. Patterns: .git/COMMIT_EDITMSG"
|
|
74
|
+
- commit
|
|
75
|
+
- repo: https://github.com/adrienverge/yamllint.git
|
|
76
|
+
rev: v1.35.1
|
|
77
|
+
hooks:
|
|
78
|
+
- id: yamllint
|
|
79
|
+
args:
|
|
80
|
+
- --strict
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"recommendations": [
|
|
3
|
-
"tamasfe.even-better-toml",
|
|
4
|
-
"ms-python.python",
|
|
5
|
-
"ms-python.mypy-type-checker",
|
|
6
3
|
"charliermarsh.ruff",
|
|
7
|
-
"
|
|
4
|
+
"editorconfig.editorconfig",
|
|
5
|
+
"esbenp.prettier-vscode",
|
|
6
|
+
"kennethlove.interrogate",
|
|
8
7
|
"ms-python.debugpy",
|
|
9
|
-
"
|
|
8
|
+
"ms-python.mypy-type-checker",
|
|
9
|
+
"ms-python.python",
|
|
10
|
+
"ms-python.vscode-pylance",
|
|
10
11
|
"redhat.vscode-yaml",
|
|
11
|
-
"
|
|
12
|
-
"
|
|
12
|
+
"tamasfe.even-better-toml",
|
|
13
|
+
"trond-snekvik.simple-rst",
|
|
14
|
+
"vivaxy.vscode-conventional-commits",
|
|
15
|
+
"njpwerner.autodocstring",
|
|
16
|
+
"donjayamanne.python-environment-manager"
|
|
13
17
|
]
|
|
14
18
|
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# SPDX-FileCopyrightText: Chris Wilson <christopher.david.wilson@gmail.com>
|
|
2
|
+
#
|
|
3
|
+
# SPDX-License-Identifier: Apache-2.0 OR MIT
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
extends: default
|
|
7
|
+
|
|
8
|
+
ignore-from-file: .gitignore
|
|
9
|
+
|
|
10
|
+
yaml-files:
|
|
11
|
+
- "*.yaml"
|
|
12
|
+
- "*.yml"
|
|
13
|
+
- .yamllint
|
|
14
|
+
|
|
15
|
+
rules:
|
|
16
|
+
anchors: enable
|
|
17
|
+
braces:
|
|
18
|
+
forbid: non-empty
|
|
19
|
+
brackets:
|
|
20
|
+
forbid: non-empty
|
|
21
|
+
colons: enable
|
|
22
|
+
commas: enable
|
|
23
|
+
comments:
|
|
24
|
+
level: warning
|
|
25
|
+
min-spaces-from-content: 1 # needed for compatibility with Prettier
|
|
26
|
+
comments-indentation:
|
|
27
|
+
level: warning
|
|
28
|
+
document-end: disable
|
|
29
|
+
document-start:
|
|
30
|
+
level: warning
|
|
31
|
+
empty-lines: enable
|
|
32
|
+
empty-values: disable
|
|
33
|
+
float-values:
|
|
34
|
+
require-numeral-before-decimal: true
|
|
35
|
+
hyphens: enable
|
|
36
|
+
indentation:
|
|
37
|
+
spaces: 2
|
|
38
|
+
key-duplicates: enable
|
|
39
|
+
key-ordering: disable
|
|
40
|
+
line-length:
|
|
41
|
+
allow-non-breakable-inline-mappings: true
|
|
42
|
+
new-line-at-end-of-file: enable
|
|
43
|
+
new-lines: enable
|
|
44
|
+
octal-values: disable
|
|
45
|
+
quoted-strings:
|
|
46
|
+
required: only-when-needed
|
|
47
|
+
allow-quoted-quotes: true
|
|
48
|
+
quote-type: double
|
|
49
|
+
trailing-spaces: enable
|
|
50
|
+
truthy:
|
|
51
|
+
level: warning
|
|
@@ -12,13 +12,13 @@ All other content (e.g. documentation and images) is licensed under the [CC-BY-4
|
|
|
12
12
|
When you contribute to this repository you are doing so under the above
|
|
13
13
|
licenses, without any additional terms or conditions.
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
_The text above is adapted from
|
|
16
16
|
https://github.com/github/opensource.guide/blob/main/notices.md#licenses used
|
|
17
|
-
under the [CC-BY-4.0](https://creativecommons.org/licenses/by/4.0/) license
|
|
17
|
+
under the [CC-BY-4.0](https://creativecommons.org/licenses/by/4.0/) license._
|
|
18
18
|
|
|
19
19
|
## SPDX & REUSE Compliance
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
[](https://api.reuse.software/info/github.com/tinydantic/tinydantic)
|
|
23
23
|
|
|
24
24
|
This repository is compliant with version 3.2 of the [REUSE
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
#
|
|
3
3
|
# SPDX-License-Identifier: Apache-2.0 OR MIT
|
|
4
4
|
|
|
5
|
+
---
|
|
5
6
|
site_name: tinydantic
|
|
6
7
|
site_url: https://tinydantic.dev
|
|
7
8
|
repo_url: https://github.com/tinydantic/tinydantic
|
|
@@ -25,7 +26,7 @@ plugins:
|
|
|
25
26
|
- mike:
|
|
26
27
|
alias_type: symlink
|
|
27
28
|
redirect_template: null
|
|
28
|
-
deploy_prefix:
|
|
29
|
+
deploy_prefix: ""
|
|
29
30
|
canonical_version: latest
|
|
30
31
|
version_selector: true
|
|
31
32
|
css_dir: css
|
|
@@ -107,6 +107,9 @@ features = [
|
|
|
107
107
|
"doc",
|
|
108
108
|
]
|
|
109
109
|
|
|
110
|
+
[tool.hatch.envs.doc.scripts]
|
|
111
|
+
build = "mkdocs build"
|
|
112
|
+
|
|
110
113
|
# TODO(cdwilson): remove this when https://github.com/pypa/hatch/issues/1553
|
|
111
114
|
# is implemented
|
|
112
115
|
[tool.hatch.envs.hatch-test]
|
|
@@ -128,7 +131,7 @@ features = [
|
|
|
128
131
|
]
|
|
129
132
|
|
|
130
133
|
[tool.hatch.envs.pre-commit.scripts]
|
|
131
|
-
|
|
134
|
+
run = "pre-commit run --all-files --verbose"
|
|
132
135
|
|
|
133
136
|
[tool.coverage.run]
|
|
134
137
|
branch = true
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
# SPDX-FileCopyrightText: Chris Wilson <christopher.david.wilson@gmail.com>
|
|
2
|
-
#
|
|
3
|
-
# SPDX-License-Identifier: Apache-2.0 OR MIT
|
|
4
|
-
|
|
5
|
-
name: Test Python package
|
|
6
|
-
|
|
7
|
-
on:
|
|
8
|
-
push:
|
|
9
|
-
branches: [main]
|
|
10
|
-
pull_request:
|
|
11
|
-
workflow_dispatch:
|
|
12
|
-
|
|
13
|
-
concurrency:
|
|
14
|
-
group: ${{ github.workflow }}-${{ github.ref }}
|
|
15
|
-
cancel-in-progress: true
|
|
16
|
-
|
|
17
|
-
env:
|
|
18
|
-
PYTHONUNBUFFERED: "1"
|
|
19
|
-
FORCE_COLOR: "1"
|
|
20
|
-
PIP_DISABLE_PIP_VERSION_CHECK: "1"
|
|
21
|
-
|
|
22
|
-
jobs:
|
|
23
|
-
run:
|
|
24
|
-
name: Python ${{ matrix.python-version }} on ${{ startsWith(matrix.os, 'macos-') && 'macOS' || startsWith(matrix.os, 'windows-') && 'Windows' || 'Linux' }}
|
|
25
|
-
runs-on: ${{ matrix.os }}
|
|
26
|
-
strategy:
|
|
27
|
-
fail-fast: false
|
|
28
|
-
matrix:
|
|
29
|
-
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
30
|
-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
|
|
31
|
-
|
|
32
|
-
steps:
|
|
33
|
-
- uses: actions/checkout@v4
|
|
34
|
-
with:
|
|
35
|
-
fetch-depth: 0 # https://github.com/actions/checkout/issues/249
|
|
36
|
-
|
|
37
|
-
- name: Set up Python ${{ matrix.python-version }}
|
|
38
|
-
uses: actions/setup-python@v5
|
|
39
|
-
with:
|
|
40
|
-
python-version: ${{ matrix.python-version }}
|
|
41
|
-
|
|
42
|
-
- name: Install Hatch
|
|
43
|
-
run: pip install --upgrade hatch
|
|
44
|
-
|
|
45
|
-
- name: Run pre-commit checks
|
|
46
|
-
run: hatch run pre-commit:check
|
|
47
|
-
|
|
48
|
-
- name: Run static analysis
|
|
49
|
-
run: hatch fmt --check
|
|
50
|
-
|
|
51
|
-
- name: Run tests
|
|
52
|
-
run: hatch test --python ${{ matrix.python-version }} --cover --randomize --parallel --retries 2 --retry-delay 1
|
|
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
|