pydantic-fixedwidth 0.2.1__tar.gz → 0.2.3__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 (29) hide show
  1. {pydantic_fixedwidth-0.2.1/.devcontainer → pydantic_fixedwidth-0.2.3/.devcontainer.example}/devcontainer.json +4 -9
  2. pydantic_fixedwidth-0.2.3/.devcontainer.example/postStartCommand.sh +3 -0
  3. pydantic_fixedwidth-0.2.3/.devcontainer.example/updateContentCommand.sh +3 -0
  4. {pydantic_fixedwidth-0.2.1 → pydantic_fixedwidth-0.2.3}/.github/workflows/ci.yaml +18 -19
  5. pydantic_fixedwidth-0.2.3/.github/workflows/prepare-release.yaml +51 -0
  6. pydantic_fixedwidth-0.2.3/.github/workflows/release.yaml +65 -0
  7. {pydantic_fixedwidth-0.2.1 → pydantic_fixedwidth-0.2.3}/.gitignore +2 -0
  8. {pydantic_fixedwidth-0.2.1 → pydantic_fixedwidth-0.2.3}/.pre-commit-config.yaml +9 -7
  9. {pydantic_fixedwidth-0.2.1/.vscode → pydantic_fixedwidth-0.2.3/.vscode.example}/extensions.json +0 -6
  10. {pydantic_fixedwidth-0.2.1 → pydantic_fixedwidth-0.2.3}/Makefile +10 -4
  11. {pydantic_fixedwidth-0.2.1 → pydantic_fixedwidth-0.2.3}/PKG-INFO +5 -6
  12. {pydantic_fixedwidth-0.2.1 → pydantic_fixedwidth-0.2.3}/README.md +1 -2
  13. {pydantic_fixedwidth-0.2.1 → pydantic_fixedwidth-0.2.3}/pyproject.toml +12 -9
  14. pydantic_fixedwidth-0.2.3/renovate.json +6 -0
  15. pydantic_fixedwidth-0.2.3/uv.lock +910 -0
  16. pydantic_fixedwidth-0.2.1/.github/dependabot.yaml +0 -25
  17. pydantic_fixedwidth-0.2.1/.github/workflows/release.yaml +0 -60
  18. pydantic_fixedwidth-0.2.1/.vscode/settings.json +0 -32
  19. pydantic_fixedwidth-0.2.1/uv.lock +0 -533
  20. {pydantic_fixedwidth-0.2.1/.devcontainer → pydantic_fixedwidth-0.2.3/.devcontainer.example}/onCreateCommand.sh +0 -0
  21. {pydantic_fixedwidth-0.2.1 → pydantic_fixedwidth-0.2.3}/.editorconfig +0 -0
  22. {pydantic_fixedwidth-0.2.1 → pydantic_fixedwidth-0.2.3}/.gitattributes +0 -0
  23. {pydantic_fixedwidth-0.2.1 → pydantic_fixedwidth-0.2.3}/.python-version +0 -0
  24. {pydantic_fixedwidth-0.2.1 → pydantic_fixedwidth-0.2.3}/LICENSE +0 -0
  25. {pydantic_fixedwidth-0.2.1 → pydantic_fixedwidth-0.2.3}/pydantic_fixedwidth/__init__.py +0 -0
  26. {pydantic_fixedwidth-0.2.1 → pydantic_fixedwidth-0.2.3}/pydantic_fixedwidth/fixedwidth.py +0 -0
  27. {pydantic_fixedwidth-0.2.1 → pydantic_fixedwidth-0.2.3}/pydantic_fixedwidth/py.typed +0 -0
  28. {pydantic_fixedwidth-0.2.1 → pydantic_fixedwidth-0.2.3}/tests/__init__.py +0 -0
  29. {pydantic_fixedwidth-0.2.1 → pydantic_fixedwidth-0.2.3}/tests/test_fixedwidth.py +0 -0
@@ -1,25 +1,20 @@
1
1
  {
2
- "name": "lasuillard/pydantic-fixedwidth",
3
- "image": "mcr.microsoft.com/devcontainers/base:1-bookworm",
2
+ "name": "lasuillard-s/pydantic-fixedwidth",
3
+ "image": "mcr.microsoft.com/devcontainers/base:trixie",
4
4
  "features": {
5
5
  "ghcr.io/devcontainers-extra/features/pre-commit:2": {}
6
6
  },
7
7
  "onCreateCommand": "./.devcontainer/onCreateCommand.sh",
8
- "postAttachCommand": "make install",
8
+ "postStartCommand": "./.devcontainer/postStartCommand.sh",
9
+ "updateContentCommand": "./.devcontainer/updateContentCommand.sh",
9
10
  "customizations": {
10
11
  "vscode": {
11
12
  "extensions": [
12
13
  "ms-python.python",
13
14
  "ms-python.vscode-pylance",
14
- "ldez.ignore-files",
15
- "redhat.vscode-yaml",
16
- "tamasfe.even-better-toml",
17
- "streetsidesoftware.code-spell-checker",
18
15
  "EditorConfig.EditorConfig",
19
- "VisualStudioExptTeam.vscodeintellicode",
20
16
  "charliermarsh.ruff",
21
17
  "ms-python.mypy-type-checker",
22
- "njpwerner.autodocstring",
23
18
  "ms-toolsai.jupyter",
24
19
  "ms-python.debugpy"
25
20
  ]
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env bash
2
+
3
+ make init
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env bash
2
+
3
+ make install
@@ -11,14 +11,13 @@ env:
11
11
 
12
12
  jobs:
13
13
  lint:
14
- name: Lint
15
14
  runs-on: ubuntu-latest
15
+ timeout-minutes: 5
16
+ permissions:
17
+ contents: read
16
18
  steps:
17
- - name: Checkout
18
- uses: actions/checkout@v5
19
-
20
- - name: Set up uv
21
- uses: astral-sh/setup-uv@v6
19
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
20
+ - uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7
22
21
  with:
23
22
  version: latest
24
23
  enable-cache: true
@@ -26,16 +25,19 @@ jobs:
26
25
  - name: Install deps
27
26
  run: uv sync
28
27
 
29
- - uses: pre-commit/action@v3.0.1
30
- env:
31
- SKIP: pytest
28
+ - name: Lint with Ruff
29
+ run: uv run ruff check .
32
30
 
33
- - uses: pre-commit-ci/lite-action@v1.1.0
34
- if: always()
31
+ - name: Format with Ruff
32
+ run: uv run ruff format --check .
33
+
34
+ - name: Type check with Mypy
35
+ run: uv run mypy --show-error-codes --pretty .
35
36
 
36
37
  test:
37
- name: Test (Python ${{ matrix.python-version }})
38
+ name: test (py${{ matrix.python-version }})
38
39
  runs-on: ubuntu-latest
40
+ timeout-minutes: 5
39
41
  permissions:
40
42
  contents: read
41
43
  id-token: write
@@ -45,11 +47,8 @@ jobs:
45
47
  python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
46
48
 
47
49
  steps:
48
- - name: Checkout
49
- uses: actions/checkout@v5
50
-
51
- - name: Set up uv
52
- uses: astral-sh/setup-uv@v6
50
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
51
+ - uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7
53
52
  with:
54
53
  version: latest
55
54
  enable-cache: true
@@ -64,7 +63,7 @@ jobs:
64
63
  run: uv run pytest
65
64
 
66
65
  - name: Upload test results to Codecov
67
- uses: codecov/codecov-action@v5
66
+ uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6
68
67
  with:
69
68
  use_oidc: true
70
69
  fail_ci_if_error: false
@@ -74,7 +73,7 @@ jobs:
74
73
  python-${{ matrix.python-version }}
75
74
 
76
75
  - name: Upload coverage report
77
- uses: codecov/codecov-action@v5
76
+ uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6
78
77
  with:
79
78
  use_oidc: true
80
79
  fail_ci_if_error: false
@@ -0,0 +1,51 @@
1
+ name: Prepare Release
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ inputs:
6
+ tag:
7
+ description: Semver-style tag for release (e.g., v1.0.0)
8
+ required: true
9
+
10
+ jobs:
11
+ create-pr:
12
+ runs-on: ubuntu-latest
13
+ timeout-minutes: 5
14
+ permissions:
15
+ contents: write
16
+ pull-requests: write
17
+ steps:
18
+ - name: Check tag format
19
+ run: |
20
+ if [[ ! "${{ inputs.tag }}" =~ ^v ]]; then
21
+ echo "Tag must start with 'v'"
22
+ exit 1
23
+ fi
24
+
25
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
26
+ - uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7
27
+ with:
28
+ version: latest
29
+ enable-cache: true
30
+
31
+ - name: Set version
32
+ run: |
33
+ tag="${{ inputs.tag }}"
34
+ tag_no_v="${tag#v}"
35
+ uv version "${tag#v}"
36
+
37
+ - name: Generate GitHub App token
38
+ uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 # v3
39
+ id: generate-token
40
+ with:
41
+ app-id: ${{ vars.GH_APP_ID }}
42
+ private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}
43
+
44
+ - name: Create pull request
45
+ uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8.1.0
46
+ with:
47
+ token: ${{ steps.generate-token.outputs.token }}
48
+ sign-commits: true
49
+ title: Release ${{ inputs.tag }}
50
+ branch: release/${{ inputs.tag }}
51
+ delete-branch: true
@@ -0,0 +1,65 @@
1
+ name: Release
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ env:
8
+ UV_FROZEN: 1
9
+
10
+ jobs:
11
+ release:
12
+ runs-on: ubuntu-latest
13
+ timeout-minutes: 5
14
+ permissions:
15
+ contents: write
16
+ steps:
17
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
18
+ - uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7
19
+ with:
20
+ version: latest
21
+ enable-cache: true
22
+
23
+ - name: Install deps
24
+ run: uv sync --frozen
25
+
26
+ - name: Build package
27
+ run: uv build
28
+
29
+ - name: Create release
30
+ uses: softprops/action-gh-release@153bb8e04406b158c6c84fc1615b65b24149a1fe # v2.6.1
31
+ with:
32
+ tag_name: ${{ github.event.release.tag_name }}
33
+ generate_release_notes: true
34
+ files: dist/*
35
+
36
+ - name: Show files
37
+ run: ls -l --all --recursive dist
38
+
39
+ - name: Upload release distributions
40
+ uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7
41
+ with:
42
+ name: release-dists
43
+ path: dist/
44
+
45
+ publish-pypi:
46
+ needs: release
47
+ runs-on: ubuntu-latest
48
+ environment: pypi
49
+ timeout-minutes: 5
50
+ permissions:
51
+ id-token: write
52
+ steps:
53
+ - name: Download release distributions
54
+ uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
55
+ with:
56
+ name: release-dists
57
+ path: dist/
58
+
59
+ - name: Show artifacts
60
+ run: ls -l --all --recursive dist
61
+
62
+ - name: Publish release distributions to PyPI
63
+ uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # release/v1
64
+ with:
65
+ skip-existing: true
@@ -2,6 +2,8 @@ junit.xml
2
2
  **/*.ipynb
3
3
  tmp/
4
4
  .tmp/
5
+ .devcontainer/
6
+ .vscode/
5
7
 
6
8
  # Created by https://www.toptal.com/developers/gitignore/api/git,linux,macos,python,windows,visualstudiocode
7
9
  # Edit at https://www.toptal.com/developers/gitignore?templates=git,linux,macos,python,windows,visualstudiocode
@@ -7,15 +7,17 @@ repos:
7
7
  - id: trailing-whitespace
8
8
  - id: end-of-file-fixer
9
9
 
10
- - repo: https://github.com/lasuillard/pre-commit-hooks
11
- rev: v0.3.0
10
+ - repo: https://github.com/lasuillard-s/devobs
11
+ rev: v0.2.1
12
12
  hooks:
13
- - id: check-directory-structure
13
+ - id: check-file-pair
14
14
  args:
15
- - --source
16
- - pydantic_fixedwidth
17
- - --extend-exclude
18
- - '**/errors.py'
15
+ - --from=pulumi_extra
16
+ - --to=tests
17
+ - --include=*.py
18
+ - --exclude=errors.py,_*.py
19
+ - --expect={to}/{relative_from}/test_{filename}
20
+ - --create-if-not-exists
19
21
 
20
22
  - repo: local
21
23
  hooks:
@@ -2,15 +2,9 @@
2
2
  "recommendations": [
3
3
  "ms-python.python",
4
4
  "ms-python.vscode-pylance",
5
- "ldez.ignore-files",
6
- "redhat.vscode-yaml",
7
- "tamasfe.even-better-toml",
8
- "streetsidesoftware.code-spell-checker",
9
5
  "EditorConfig.EditorConfig",
10
- "VisualStudioExptTeam.vscodeintellicode",
11
6
  "charliermarsh.ruff",
12
7
  "ms-python.mypy-type-checker",
13
- "njpwerner.autodocstring",
14
8
  "ms-toolsai.jupyter",
15
9
  "ms-python.debugpy"
16
10
  ]
@@ -20,9 +20,12 @@ help: Makefile ## Show help
20
20
  install: ## Install deps
21
21
  uv python install
22
22
  uv sync --frozen
23
- pre-commit install --install-hooks
24
23
  .PHONY: install
25
24
 
25
+ init: ## Initialize project
26
+ pre-commit install --install-hooks
27
+ .PHONY: init
28
+
26
29
  update: ## Update deps and tools
27
30
  uv sync --upgrade
28
31
  pre-commit autoupdate
@@ -35,10 +38,13 @@ update: ## Update deps and tools
35
38
  ci: lint test ## Run CI tasks
36
39
  .PHONY: ci
37
40
 
38
- format: ## Run autoformatters
39
- uv run ruff check --fix .
41
+ fmt: ## Run autoformatters
40
42
  uv run ruff format .
41
- .PHONY: format
43
+ .PHONY: fmt
44
+
45
+ fix: ## Apply autofixes
46
+ uv run ruff check --fix .
47
+ .PHONY: fix
42
48
 
43
49
  lint: ## Run all linters
44
50
  uv run ruff check .
@@ -1,10 +1,10 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pydantic-fixedwidth
3
- Version: 0.2.1
3
+ Version: 0.2.3
4
4
  Summary: Custom Pydantic models for parsing and serializing fixed-width format of data.
5
- Project-URL: Homepage, https://github.com/lasuillard/pydantic-fixedwidth
6
- Project-URL: Repository, https://github.com/lasuillard/pydantic-fixedwidth.git
7
- Project-URL: Issues, https://github.com/lasuillard/pydantic-fixedwidth/issues
5
+ Project-URL: Homepage, https://github.com/lasuillard-s/pydantic-fixedwidth
6
+ Project-URL: Repository, https://github.com/lasuillard-s/pydantic-fixedwidth.git
7
+ Project-URL: Issues, https://github.com/lasuillard-s/pydantic-fixedwidth/issues
8
8
  License-Expression: MIT
9
9
  License-File: LICENSE
10
10
  Requires-Python: <4.0,>=3.9
@@ -14,8 +14,7 @@ Description-Content-Type: text/markdown
14
14
  # pydantic-fixedwidth
15
15
 
16
16
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
17
- [![CI](https://github.com/lasuillard/pydantic-fixedwidth/actions/workflows/ci.yaml/badge.svg)](https://github.com/lasuillard/pydantic-fixedwidth/actions/workflows/ci.yaml)
18
- [![codecov](https://codecov.io/gh/lasuillard/pydantic-fixedwidth/graph/badge.svg?token=R5pQWB43DP)](https://codecov.io/gh/lasuillard/pydantic-fixedwidth)
17
+ [![codecov](https://codecov.io/gh/lasuillard-s/pydantic-fixedwidth/graph/badge.svg?token=R5pQWB43DP)](https://codecov.io/gh/lasuillard-s/pydantic-fixedwidth)
19
18
  [![PyPI - Version](https://img.shields.io/pypi/v/pydantic-fixedwidth)](https://pypi.org/project/pydantic-fixedwidth/)
20
19
 
21
20
  Custom Pydantic models for serializing and deserializing fixed-width format data.
@@ -1,8 +1,7 @@
1
1
  # pydantic-fixedwidth
2
2
 
3
3
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
4
- [![CI](https://github.com/lasuillard/pydantic-fixedwidth/actions/workflows/ci.yaml/badge.svg)](https://github.com/lasuillard/pydantic-fixedwidth/actions/workflows/ci.yaml)
5
- [![codecov](https://codecov.io/gh/lasuillard/pydantic-fixedwidth/graph/badge.svg?token=R5pQWB43DP)](https://codecov.io/gh/lasuillard/pydantic-fixedwidth)
4
+ [![codecov](https://codecov.io/gh/lasuillard-s/pydantic-fixedwidth/graph/badge.svg?token=R5pQWB43DP)](https://codecov.io/gh/lasuillard-s/pydantic-fixedwidth)
6
5
  [![PyPI - Version](https://img.shields.io/pypi/v/pydantic-fixedwidth)](https://pypi.org/project/pydantic-fixedwidth/)
7
6
 
8
7
  Custom Pydantic models for serializing and deserializing fixed-width format data.
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "pydantic-fixedwidth"
3
- version = "0.2.1"
3
+ version = "0.2.3"
4
4
  description = "Custom Pydantic models for parsing and serializing fixed-width format of data."
5
5
  readme = "README.md"
6
6
  license = "MIT"
@@ -8,21 +8,24 @@ requires-python = ">=3.9, <4.0"
8
8
  dependencies = ["pydantic>=2,<3"]
9
9
 
10
10
  [dependency-groups]
11
- dev = ["mypy~=1.11", "ruff~=0.6"]
12
- test = ["coverage~=7.3", "pytest-cov>=5,<7", "pytest-sugar~=1.0", "pytest~=8.0"]
11
+ dev = [
12
+ "mypy~=1.11",
13
+ "ruff~=0.6",
14
+ "coverage~=7.3",
15
+ "pytest-cov>=7,<8",
16
+ "pytest-sugar~=1.0",
17
+ "pytest~=8.0",
18
+ ]
13
19
 
14
20
  [project.urls]
15
- Homepage = "https://github.com/lasuillard/pydantic-fixedwidth"
16
- Repository = "https://github.com/lasuillard/pydantic-fixedwidth.git"
17
- Issues = "https://github.com/lasuillard/pydantic-fixedwidth/issues"
21
+ Homepage = "https://github.com/lasuillard-s/pydantic-fixedwidth"
22
+ Repository = "https://github.com/lasuillard-s/pydantic-fixedwidth.git"
23
+ Issues = "https://github.com/lasuillard-s/pydantic-fixedwidth/issues"
18
24
 
19
25
  [build-system]
20
26
  requires = ["hatchling"]
21
27
  build-backend = "hatchling.build"
22
28
 
23
- [tool.uv]
24
- default-groups = ["dev", "test"]
25
-
26
29
  [tool.hatch.build.targets.wheel]
27
30
  packages = ["pydantic_fixedwidth"]
28
31
 
@@ -0,0 +1,6 @@
1
+ {
2
+ "$schema": "https://docs.renovatebot.com/renovate-schema.json",
3
+ "extends": [
4
+ "local>lasuillard-s/renovate-config"
5
+ ]
6
+ }