pydantic-fixedwidth 0.1.0__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.

Potentially problematic release.


This version of pydantic-fixedwidth might be problematic. Click here for more details.

@@ -0,0 +1,31 @@
1
+ {
2
+ "name": "lasuillard/pydantic-fixedwidth",
3
+ "image": "mcr.microsoft.com/devcontainers/base:1-bookworm",
4
+ "features": {
5
+ "ghcr.io/devcontainers-contrib/features/pre-commit:2": {}
6
+ },
7
+ "onCreateCommand": "./.devcontainer/onCreateCommand.sh",
8
+ "postAttachCommand": "make install",
9
+ "customizations": {
10
+ "vscode": {
11
+ "extensions": [
12
+ "ms-python.python",
13
+ "ms-python.vscode-pylance",
14
+ "ldez.ignore-files",
15
+ "redhat.vscode-yaml",
16
+ "tamasfe.even-better-toml",
17
+ "streetsidesoftware.code-spell-checker",
18
+ "EditorConfig.EditorConfig",
19
+ "VisualStudioExptTeam.vscodeintellicode",
20
+ "charliermarsh.ruff",
21
+ "ms-python.mypy-type-checker",
22
+ "njpwerner.autodocstring",
23
+ "ms-toolsai.jupyter",
24
+ "ms-python.debugpy"
25
+ ]
26
+ }
27
+ },
28
+ "containerEnv": {
29
+ "PYTHONPATH": "${containerWorkspaceFolder}"
30
+ }
31
+ }
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env bash
2
+
3
+ pipx install uv
@@ -0,0 +1,23 @@
1
+ # http://editorconfig.org
2
+
3
+ root = true
4
+
5
+ [*]
6
+ charset = utf-8
7
+ end_of_line = lf
8
+ insert_final_newline = true
9
+ trim_trailing_whitespace = true
10
+
11
+ [*.{py,rst,ini}]
12
+ indent_style = space
13
+ indent_size = 4
14
+
15
+ [*.{html,css,scss,json,yaml,yml}]
16
+ indent_style = space
17
+ indent_size = 2
18
+
19
+ [*.md]
20
+ trim_trailing_whitespace = false
21
+
22
+ [Makefile]
23
+ indent_style = tab
@@ -0,0 +1,124 @@
1
+ # https://gitattributes.io/api/common%2Cmarkdown%2Cpython%2Csql%2Cdevcontainer%2Cvisualstudiocode
2
+ # Common settings that generally should always be used with your language specific settings
3
+
4
+ # Auto detect text files and perform LF normalization
5
+ * text=auto
6
+
7
+ #
8
+ # The above will handle all files NOT found below
9
+ #
10
+
11
+ # Documents
12
+ *.bibtex text diff=bibtex
13
+ *.doc diff=astextplain
14
+ *.DOC diff=astextplain
15
+ *.docx diff=astextplain
16
+ *.DOCX diff=astextplain
17
+ *.dot diff=astextplain
18
+ *.DOT diff=astextplain
19
+ *.pdf diff=astextplain
20
+ *.PDF diff=astextplain
21
+ *.rtf diff=astextplain
22
+ *.RTF diff=astextplain
23
+ *.md text diff=markdown
24
+ *.mdx text diff=markdown
25
+ *.tex text diff=tex
26
+ *.adoc text
27
+ *.textile text
28
+ *.mustache text
29
+ *.csv text eol=crlf
30
+ *.tab text
31
+ *.tsv text
32
+ *.txt text
33
+ *.sql text
34
+ *.epub diff=astextplain
35
+
36
+ # Graphics
37
+ *.png binary
38
+ *.jpg binary
39
+ *.jpeg binary
40
+ *.gif binary
41
+ *.tif binary
42
+ *.tiff binary
43
+ *.ico binary
44
+ # SVG treated as text by default.
45
+ *.svg text
46
+ # If you want to treat it as binary,
47
+ # use the following line instead.
48
+ # *.svg binary
49
+ *.eps binary
50
+
51
+ # Scripts
52
+ *.bash text eol=lf
53
+ *.fish text eol=lf
54
+ *.sh text eol=lf
55
+ *.zsh text eol=lf
56
+ # These are explicitly windows files and should use crlf
57
+ *.bat text eol=crlf
58
+ *.cmd text eol=crlf
59
+ *.ps1 text eol=crlf
60
+
61
+ # Serialisation
62
+ *.json text
63
+ *.toml text
64
+ *.xml text
65
+ *.yaml text
66
+ *.yml text
67
+
68
+ # Archives
69
+ *.7z binary
70
+ *.gz binary
71
+ *.tar binary
72
+ *.tgz binary
73
+ *.zip binary
74
+
75
+ # Text files where line endings should be preserved
76
+ *.patch -text
77
+
78
+ #
79
+ # Exclude files from exporting
80
+ #
81
+
82
+ .gitattributes export-ignore
83
+ .gitignore export-ignore
84
+ .gitkeep export-ignore
85
+ # Fix syntax highlighting on GitHub to allow comments
86
+ .devcontainer.json linguist-language=JSON-with-Comments
87
+ devcontainer.json linguist-language=JSON-with-Comments
88
+ # Apply override to all files in the directory
89
+ *.md linguist-detectable
90
+ # Basic .gitattributes for a python repo.
91
+
92
+ # Source files
93
+ # ============
94
+ *.pxd text diff=python
95
+ *.py text diff=python
96
+ *.py3 text diff=python
97
+ *.pyw text diff=python
98
+ *.pyx text diff=python
99
+ *.pyz text diff=python
100
+ *.pyi text diff=python
101
+
102
+ # Binary files
103
+ # ============
104
+ *.db binary
105
+ *.p binary
106
+ *.pkl binary
107
+ *.pickle binary
108
+ *.pyc binary export-ignore
109
+ *.pyo binary export-ignore
110
+ *.pyd binary
111
+
112
+ # Jupyter notebook
113
+ *.ipynb text eol=lf
114
+
115
+ # Note: .db, .p, and .pkl files are associated
116
+ # with the python modules ``pickle``, ``dbm.*``,
117
+ # ``shelve``, ``marshal``, ``anydbm``, & ``bsddb``
118
+ # (among others).
119
+ # Basic .gitattributes for sql files
120
+
121
+ *.sql linguist-detectable=true
122
+ *.sql linguist-language=sql
123
+ # Fix syntax highlighting on GitHub to allow comments
124
+ .vscode/*.json linguist-language=JSON-with-Comments
@@ -0,0 +1,24 @@
1
+ # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
2
+ version: 2
3
+ updates:
4
+ - package-ecosystem: github-actions
5
+ directory: /
6
+ schedule:
7
+ interval: monthly
8
+
9
+ - package-ecosystem: pip
10
+ directory: /
11
+ schedule:
12
+ interval: monthly
13
+ ignore:
14
+ - dependency-name: "*"
15
+ update-types: ["version-update:semver-patch"]
16
+ groups:
17
+ dev-dependencies:
18
+ applies-to: version-updates
19
+ dependency-type: development
20
+
21
+ - package-ecosystem: "devcontainers"
22
+ directory: "/"
23
+ schedule:
24
+ interval: monthly
@@ -0,0 +1,85 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ permissions: read-all
10
+
11
+ env:
12
+ UV_FROZEN: 1
13
+
14
+ jobs:
15
+ lint:
16
+ name: Lint
17
+ runs-on: ubuntu-latest
18
+ steps:
19
+ - name: Checkout
20
+ uses: actions/checkout@v4
21
+
22
+ - name: Set up uv
23
+ uses: astral-sh/setup-uv@v5
24
+ with:
25
+ version: latest
26
+ enable-cache: true
27
+
28
+ - name: Install deps
29
+ run: uv sync --all-extras
30
+
31
+ - uses: pre-commit/action@v3.0.1
32
+ env:
33
+ SKIP: pytest
34
+
35
+ - uses: pre-commit-ci/lite-action@v1.1.0
36
+ if: always()
37
+
38
+ test:
39
+ name: Test (Python ${{ matrix.python-version }})
40
+ runs-on: ubuntu-latest
41
+ permissions:
42
+ contents: read
43
+ id-token: write
44
+ strategy:
45
+ fail-fast: false
46
+ matrix:
47
+ python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
48
+
49
+ steps:
50
+ - name: Checkout
51
+ uses: actions/checkout@v4
52
+
53
+ - name: Set up uv
54
+ uses: astral-sh/setup-uv@v5
55
+ with:
56
+ version: latest
57
+ enable-cache: true
58
+
59
+ - name: Set Python version
60
+ run: uv python pin "${{ matrix.python-version }}"
61
+
62
+ - name: Install deps
63
+ run: uv sync --all-extras
64
+
65
+ - name: Run tests
66
+ run: uv run pytest
67
+
68
+ - name: Upload test results to Codecov
69
+ uses: codecov/codecov-action@v5
70
+ with:
71
+ use_oidc: true
72
+ fail_ci_if_error: false
73
+ report_type: test_results
74
+ files: junit.xml
75
+ flags: >-
76
+ python-${{ matrix.python-version }}
77
+
78
+ - name: Upload coverage report
79
+ uses: codecov/codecov-action@v5
80
+ with:
81
+ use_oidc: true
82
+ fail_ci_if_error: false
83
+ files: coverage.xml
84
+ flags: >-
85
+ python-${{ matrix.python-version }}
@@ -0,0 +1,59 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ tags: [v*]
6
+
7
+ permissions: read-all
8
+
9
+ jobs:
10
+ release:
11
+ name: Release
12
+ runs-on: ubuntu-latest
13
+ permissions:
14
+ contents: write
15
+ steps:
16
+ - name: Checkout
17
+ uses: actions/checkout@v4
18
+
19
+ - name: Set up uv
20
+ uses: astral-sh/setup-uv@v5
21
+ with:
22
+ version: latest
23
+ enable-cache: true
24
+
25
+ - name: Install deps
26
+ run: uv sync --frozen --all-extras
27
+
28
+ - name: Build package
29
+ run: uv build
30
+
31
+ - name: Create release
32
+ uses: softprops/action-gh-release@v2
33
+ with:
34
+ generate_release_notes: true
35
+ files: dist/*
36
+
37
+ - name: Upload release distributions
38
+ uses: actions/upload-artifact@v4
39
+ with:
40
+ name: release-dists
41
+ path: dist/
42
+
43
+ publish-pypi:
44
+ name: Publish to PyPI
45
+ runs-on: ubuntu-latest
46
+ needs:
47
+ - release
48
+ permissions:
49
+ id-token: write
50
+ environment: pypi
51
+ steps:
52
+ - name: Retrieve release distributions
53
+ uses: actions/download-artifact@v4
54
+ with:
55
+ name: release-dists
56
+ path: dist/
57
+
58
+ - name: Publish release distributions to PyPI
59
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,289 @@
1
+ junit.xml
2
+ **/*.ipynb
3
+ tmp/
4
+ .tmp/
5
+
6
+ # Created by https://www.toptal.com/developers/gitignore/api/git,linux,macos,python,windows,visualstudiocode
7
+ # Edit at https://www.toptal.com/developers/gitignore?templates=git,linux,macos,python,windows,visualstudiocode
8
+
9
+ ### Git ###
10
+ # Created by git for backups. To disable backups in Git:
11
+ # $ git config --global mergetool.keepBackup false
12
+ *.orig
13
+
14
+ # Created by git when using merge tools for conflicts
15
+ *.BACKUP.*
16
+ *.BASE.*
17
+ *.LOCAL.*
18
+ *.REMOTE.*
19
+ *_BACKUP_*.txt
20
+ *_BASE_*.txt
21
+ *_LOCAL_*.txt
22
+ *_REMOTE_*.txt
23
+
24
+ ### Linux ###
25
+ *~
26
+
27
+ # temporary files which can be created if a process still has a handle open of a deleted file
28
+ .fuse_hidden*
29
+
30
+ # KDE directory preferences
31
+ .directory
32
+
33
+ # Linux trash folder which might appear on any partition or disk
34
+ .Trash-*
35
+
36
+ # .nfs files are created when an open file is removed but is still being accessed
37
+ .nfs*
38
+
39
+ ### macOS ###
40
+ # General
41
+ .DS_Store
42
+ .AppleDouble
43
+ .LSOverride
44
+
45
+ # Icon must end with two \r
46
+ Icon
47
+
48
+
49
+ # Thumbnails
50
+ ._*
51
+
52
+ # Files that might appear in the root of a volume
53
+ .DocumentRevisions-V100
54
+ .fseventsd
55
+ .Spotlight-V100
56
+ .TemporaryItems
57
+ .Trashes
58
+ .VolumeIcon.icns
59
+ .com.apple.timemachine.donotpresent
60
+
61
+ # Directories potentially created on remote AFP share
62
+ .AppleDB
63
+ .AppleDesktop
64
+ Network Trash Folder
65
+ Temporary Items
66
+ .apdisk
67
+
68
+ ### macOS Patch ###
69
+ # iCloud generated files
70
+ *.icloud
71
+
72
+ ### Python ###
73
+ # Byte-compiled / optimized / DLL files
74
+ __pycache__/
75
+ *.py[cod]
76
+ *$py.class
77
+
78
+ # C extensions
79
+ *.so
80
+
81
+ # Distribution / packaging
82
+ .Python
83
+ build/
84
+ develop-eggs/
85
+ dist/
86
+ downloads/
87
+ eggs/
88
+ .eggs/
89
+ lib/
90
+ lib64/
91
+ parts/
92
+ sdist/
93
+ var/
94
+ wheels/
95
+ share/python-wheels/
96
+ *.egg-info/
97
+ .installed.cfg
98
+ *.egg
99
+ MANIFEST
100
+
101
+ # PyInstaller
102
+ # Usually these files are written by a python script from a template
103
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
104
+ *.manifest
105
+ *.spec
106
+
107
+ # Installer logs
108
+ pip-log.txt
109
+ pip-delete-this-directory.txt
110
+
111
+ # Unit test / coverage reports
112
+ htmlcov/
113
+ .tox/
114
+ .nox/
115
+ .coverage
116
+ .coverage.*
117
+ .cache
118
+ nosetests.xml
119
+ coverage.xml
120
+ *.cover
121
+ *.py,cover
122
+ .hypothesis/
123
+ .pytest_cache/
124
+ cover/
125
+
126
+ # Translations
127
+ *.mo
128
+ *.pot
129
+
130
+ # Django stuff:
131
+ *.log
132
+ local_settings.py
133
+ db.sqlite3
134
+ db.sqlite3-journal
135
+
136
+ # Flask stuff:
137
+ instance/
138
+ .webassets-cache
139
+
140
+ # Scrapy stuff:
141
+ .scrapy
142
+
143
+ # Sphinx documentation
144
+ docs/_build/
145
+
146
+ # PyBuilder
147
+ .pybuilder/
148
+ target/
149
+
150
+ # Jupyter Notebook
151
+ .ipynb_checkpoints
152
+
153
+ # IPython
154
+ profile_default/
155
+ ipython_config.py
156
+
157
+ # pyenv
158
+ # For a library or package, you might want to ignore these files since the code is
159
+ # intended to run in multiple environments; otherwise, check them in:
160
+ # .python-version
161
+
162
+ # pipenv
163
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
164
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
165
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
166
+ # install all needed dependencies.
167
+ #Pipfile.lock
168
+
169
+ # poetry
170
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
171
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
172
+ # commonly ignored for libraries.
173
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
174
+ #poetry.lock
175
+
176
+ # pdm
177
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
178
+ #pdm.lock
179
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
180
+ # in version control.
181
+ # https://pdm.fming.dev/#use-with-ide
182
+ .pdm.toml
183
+
184
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
185
+ __pypackages__/
186
+
187
+ # Celery stuff
188
+ celerybeat-schedule
189
+ celerybeat.pid
190
+
191
+ # SageMath parsed files
192
+ *.sage.py
193
+
194
+ # Environments
195
+ .env
196
+ .venv
197
+ env/
198
+ venv/
199
+ ENV/
200
+ env.bak/
201
+ venv.bak/
202
+
203
+ # Spyder project settings
204
+ .spyderproject
205
+ .spyproject
206
+
207
+ # Rope project settings
208
+ .ropeproject
209
+
210
+ # mkdocs documentation
211
+ /site
212
+
213
+ # mypy
214
+ .mypy_cache/
215
+ .dmypy.json
216
+ dmypy.json
217
+
218
+ # Pyre type checker
219
+ .pyre/
220
+
221
+ # pytype static type analyzer
222
+ .pytype/
223
+
224
+ # Cython debug symbols
225
+ cython_debug/
226
+
227
+ # PyCharm
228
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
229
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
230
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
231
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
232
+ #.idea/
233
+
234
+ ### Python Patch ###
235
+ # Poetry local configuration file - https://python-poetry.org/docs/configuration/#local-configuration
236
+ poetry.toml
237
+
238
+ # ruff
239
+ .ruff_cache/
240
+
241
+ # LSP config files
242
+ pyrightconfig.json
243
+
244
+ ### VisualStudioCode ###
245
+ .vscode/*
246
+ !.vscode/settings.json
247
+ !.vscode/tasks.json
248
+ !.vscode/launch.json
249
+ !.vscode/extensions.json
250
+ !.vscode/*.code-snippets
251
+
252
+ # Local History for Visual Studio Code
253
+ .history/
254
+
255
+ # Built Visual Studio Code Extensions
256
+ *.vsix
257
+
258
+ ### VisualStudioCode Patch ###
259
+ # Ignore all local history of files
260
+ .history
261
+ .ionide
262
+
263
+ ### Windows ###
264
+ # Windows thumbnail cache files
265
+ Thumbs.db
266
+ Thumbs.db:encryptable
267
+ ehthumbs.db
268
+ ehthumbs_vista.db
269
+
270
+ # Dump file
271
+ *.stackdump
272
+
273
+ # Folder config file
274
+ [Dd]esktop.ini
275
+
276
+ # Recycle Bin used on file shares
277
+ $RECYCLE.BIN/
278
+
279
+ # Windows Installer files
280
+ *.cab
281
+ *.msi
282
+ *.msix
283
+ *.msm
284
+ *.msp
285
+
286
+ # Windows shortcuts
287
+ *.lnk
288
+
289
+ # End of https://www.toptal.com/developers/gitignore/api/git,linux,macos,python,windows,visualstudiocode
@@ -0,0 +1,52 @@
1
+ default_stages: [pre-commit]
2
+ fail_fast: true
3
+ repos:
4
+ - repo: https://github.com/pre-commit/pre-commit-hooks
5
+ rev: v5.0.0
6
+ hooks:
7
+ - id: trailing-whitespace
8
+ - id: end-of-file-fixer
9
+
10
+ - repo: https://github.com/lasuillard/pre-commit-hooks
11
+ rev: v0.3.0
12
+ hooks:
13
+ - id: check-directory-structure
14
+ args:
15
+ - --source
16
+ - pydantic_fixedwidth
17
+ - --extend-exclude
18
+ - '**/errors.py'
19
+
20
+ - repo: local
21
+ hooks:
22
+ - id: ruff-check
23
+ name: Fix using Ruff
24
+ language: system
25
+ types: [python]
26
+ entry: uv run ruff check
27
+ args: [--fix]
28
+
29
+ - id: ruff-format
30
+ name: Format using Ruff
31
+ language: system
32
+ types: [python]
33
+ entry: uv run ruff format
34
+
35
+ - id: mypy
36
+ name: Type check with Mypy
37
+ language: system
38
+ types: [python]
39
+ pass_filenames: false
40
+ entry: uv run mypy
41
+ args: [--show-error-codes, --pretty, .]
42
+
43
+ - id: pytest
44
+ name: Test with pytest
45
+ language: system
46
+ types: [python]
47
+ pass_filenames: false
48
+ entry: uv run pytest
49
+
50
+ ci:
51
+ autofix_prs: true
52
+ autoupdate_schedule: quarterly
@@ -0,0 +1 @@
1
+ 3.9
@@ -0,0 +1,17 @@
1
+ {
2
+ "recommendations": [
3
+ "ms-python.python",
4
+ "ms-python.vscode-pylance",
5
+ "ldez.ignore-files",
6
+ "redhat.vscode-yaml",
7
+ "tamasfe.even-better-toml",
8
+ "streetsidesoftware.code-spell-checker",
9
+ "EditorConfig.EditorConfig",
10
+ "VisualStudioExptTeam.vscodeintellicode",
11
+ "charliermarsh.ruff",
12
+ "ms-python.mypy-type-checker",
13
+ "njpwerner.autodocstring",
14
+ "ms-toolsai.jupyter",
15
+ "ms-python.debugpy"
16
+ ]
17
+ }