logust 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.
Files changed (78) hide show
  1. logust-0.1.0/.github/CODEOWNERS +24 -0
  2. logust-0.1.0/.github/FUNDING.yml +1 -0
  3. logust-0.1.0/.github/ISSUE_TEMPLATE/bug_report.md +42 -0
  4. logust-0.1.0/.github/ISSUE_TEMPLATE/config.yml +8 -0
  5. logust-0.1.0/.github/ISSUE_TEMPLATE/feature_request.md +34 -0
  6. logust-0.1.0/.github/PULL_REQUEST_TEMPLATE.md +53 -0
  7. logust-0.1.0/.github/dependabot.yml +59 -0
  8. logust-0.1.0/.github/workflows/CI.yml +175 -0
  9. logust-0.1.0/.github/workflows/dependabot-auto-merge.yml +38 -0
  10. logust-0.1.0/.github/workflows/docs.yml +44 -0
  11. logust-0.1.0/.github/workflows/security.yml +44 -0
  12. logust-0.1.0/.github/workflows/test.yml +112 -0
  13. logust-0.1.0/.gitignore +90 -0
  14. logust-0.1.0/.pre-commit-config.yaml +78 -0
  15. logust-0.1.0/CHANGELOG.md +70 -0
  16. logust-0.1.0/CODE_OF_CONDUCT.md +129 -0
  17. logust-0.1.0/CONTRIBUTING.md +250 -0
  18. logust-0.1.0/Cargo.lock +653 -0
  19. logust-0.1.0/Cargo.toml +19 -0
  20. logust-0.1.0/LICENSE +21 -0
  21. logust-0.1.0/PKG-INFO +600 -0
  22. logust-0.1.0/README.md +557 -0
  23. logust-0.1.0/SECURITY.md +110 -0
  24. logust-0.1.0/benchmarks/README.md +25 -0
  25. logust-0.1.0/benchmarks/__init__.py +1 -0
  26. logust-0.1.0/benchmarks/bench_throughput.py +710 -0
  27. logust-0.1.0/benchmarks/conftest.py +16 -0
  28. logust-0.1.0/docs/api.md +227 -0
  29. logust-0.1.0/docs/assets/favicon.svg +28 -0
  30. logust-0.1.0/docs/assets/logo.svg +73 -0
  31. logust-0.1.0/docs/comparison.md +134 -0
  32. logust-0.1.0/docs/getting-started/installation.md +47 -0
  33. logust-0.1.0/docs/getting-started/quick-start.md +78 -0
  34. logust-0.1.0/docs/guide/context.md +111 -0
  35. logust-0.1.0/docs/guide/exceptions.md +114 -0
  36. logust-0.1.0/docs/guide/file-output.md +142 -0
  37. logust-0.1.0/docs/guide/formatting.md +121 -0
  38. logust-0.1.0/docs/guide/integrations.md +209 -0
  39. logust-0.1.0/docs/guide/levels.md +90 -0
  40. logust-0.1.0/docs/index.md +89 -0
  41. logust-0.1.0/docs/stylesheets/extra.css +28 -0
  42. logust-0.1.0/examples/01_basic_logging.py +52 -0
  43. logust-0.1.0/examples/02_file_output.py +90 -0
  44. logust-0.1.0/examples/03_json_serialization.py +64 -0
  45. logust-0.1.0/examples/04_context_binding.py +76 -0
  46. logust-0.1.0/examples/05_exception_handling.py +106 -0
  47. logust-0.1.0/examples/06_custom_levels.py +109 -0
  48. logust-0.1.0/examples/07_callbacks.py +106 -0
  49. logust-0.1.0/examples/08_fastapi_integration.py +179 -0
  50. logust-0.1.0/logust/__init__.py +110 -0
  51. logust-0.1.0/logust/_logger.py +547 -0
  52. logust-0.1.0/logust/_logust.pyi +176 -0
  53. logust-0.1.0/logust/_opt.py +120 -0
  54. logust-0.1.0/logust/_parse.py +111 -0
  55. logust-0.1.0/logust/_traceback.py +82 -0
  56. logust-0.1.0/logust/_types.py +147 -0
  57. logust-0.1.0/logust/contrib/__init__.py +40 -0
  58. logust-0.1.0/logust/contrib/decorators.py +167 -0
  59. logust-0.1.0/logust/contrib/logging_handler.py +121 -0
  60. logust-0.1.0/logust/contrib/starlette.py +345 -0
  61. logust-0.1.0/logust/py.typed +0 -0
  62. logust-0.1.0/mkdocs.yml +130 -0
  63. logust-0.1.0/pyproject.toml +115 -0
  64. logust-0.1.0/src/format.rs +573 -0
  65. logust-0.1.0/src/handler.rs +229 -0
  66. logust-0.1.0/src/level.rs +280 -0
  67. logust-0.1.0/src/lib.rs +501 -0
  68. logust-0.1.0/src/sink.rs +534 -0
  69. logust-0.1.0/tests/__init__.py +1 -0
  70. logust-0.1.0/tests/conftest.py +108 -0
  71. logust-0.1.0/tests/test_callbacks.py +245 -0
  72. logust-0.1.0/tests/test_configure.py +144 -0
  73. logust-0.1.0/tests/test_context.py +170 -0
  74. logust-0.1.0/tests/test_handlers.py +201 -0
  75. logust-0.1.0/tests/test_levels.py +151 -0
  76. logust-0.1.0/tests/test_logger.py +158 -0
  77. logust-0.1.0/tests/test_opt.py +178 -0
  78. logust-0.1.0/tests/test_parsing.py +162 -0
@@ -0,0 +1,24 @@
1
+ # CODEOWNERS - Automatically request reviews from code owners
2
+ # https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
3
+
4
+ # Default owner for all files
5
+ * @yamaaaaaa31
6
+
7
+ # Rust core
8
+ /src/ @yamaaaaaa31
9
+
10
+ # Python bindings and package
11
+ /logust/ @yamaaaaaa31
12
+
13
+ # Documentation
14
+ /docs/ @yamaaaaaa31
15
+ README.md @yamaaaaaa31
16
+ CONTRIBUTING.md @yamaaaaaa31
17
+ CHANGELOG.md @yamaaaaaa31
18
+
19
+ # CI/CD and GitHub configuration
20
+ /.github/ @yamaaaaaa31
21
+
22
+ # Build configuration
23
+ Cargo.toml @yamaaaaaa31
24
+ pyproject.toml @yamaaaaaa31
@@ -0,0 +1 @@
1
+ github: [yamaaaaaa31]
@@ -0,0 +1,42 @@
1
+ ---
2
+ name: Bug Report
3
+ about: Report a bug to help us improve Logust
4
+ title: '[BUG] '
5
+ labels: bug
6
+ assignees: ''
7
+ ---
8
+
9
+ ## Bug Description
10
+ A clear and concise description of what the bug is.
11
+
12
+ ## To Reproduce
13
+ Steps to reproduce the behavior:
14
+
15
+ ```python
16
+ from logust import logger
17
+
18
+ # Your code here
19
+ ```
20
+
21
+ ## Expected Behavior
22
+ A clear description of what you expected to happen.
23
+
24
+ ## Actual Behavior
25
+ What actually happened. Include any error messages or tracebacks.
26
+
27
+ ```
28
+ Paste error message here
29
+ ```
30
+
31
+ ## Environment
32
+
33
+ - **OS**: [e.g., macOS 14.0, Ubuntu 22.04, Windows 11]
34
+ - **Python version**: [e.g., 3.12.0]
35
+ - **Logust version**: [e.g., 0.1.0]
36
+ - **Rust version** (if building from source): [e.g., 1.75.0]
37
+
38
+ ## Additional Context
39
+ Add any other context about the problem here (screenshots, log files, etc.).
40
+
41
+ ## Possible Solution
42
+ If you have any ideas on how to fix this, please share them.
@@ -0,0 +1,8 @@
1
+ blank_issues_enabled: true
2
+ contact_links:
3
+ - name: Question or Discussion
4
+ url: https://github.com/yamaaaaaa31/logust/discussions
5
+ about: Ask questions or start discussions about Logust
6
+ - name: Security Vulnerability
7
+ url: https://github.com/yamaaaaaa31/logust/security/advisories/new
8
+ about: Report security vulnerabilities privately
@@ -0,0 +1,34 @@
1
+ ---
2
+ name: Feature Request
3
+ about: Suggest an idea for Logust
4
+ title: '[FEATURE] '
5
+ labels: enhancement
6
+ assignees: ''
7
+ ---
8
+
9
+ ## Problem Statement
10
+ A clear description of the problem you're trying to solve.
11
+ Ex. "I'm always frustrated when [...]"
12
+
13
+ ## Proposed Solution
14
+ A clear description of what you want to happen.
15
+
16
+ ## Example Usage
17
+ Show how you would use this feature:
18
+
19
+ ```python
20
+ from logust import logger
21
+
22
+ # Example of how you'd use the feature
23
+ ```
24
+
25
+ ## Alternatives Considered
26
+ A description of any alternative solutions or features you've considered.
27
+
28
+ ## Additional Context
29
+ Add any other context, screenshots, or references to similar features in other libraries.
30
+
31
+ ## Are you willing to contribute?
32
+ - [ ] Yes, I'd like to implement this feature
33
+ - [ ] Yes, I can help with testing
34
+ - [ ] No, but I'd love to see this implemented
@@ -0,0 +1,53 @@
1
+ ## Description
2
+
3
+ Brief description of the changes in this PR.
4
+
5
+ ## Type of Change
6
+
7
+ - [ ] Bug fix (non-breaking change which fixes an issue)
8
+ - [ ] New feature (non-breaking change which adds functionality)
9
+ - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
10
+ - [ ] Documentation update
11
+ - [ ] Performance improvement
12
+ - [ ] Code refactoring (no functional changes)
13
+ - [ ] CI/CD or build system changes
14
+
15
+ ## Related Issues
16
+
17
+ Closes #(issue number)
18
+
19
+ ## Changes Made
20
+
21
+ - Change 1
22
+ - Change 2
23
+ - Change 3
24
+
25
+ ## Testing
26
+
27
+ Describe how you tested your changes:
28
+
29
+ - [ ] Added new unit tests
30
+ - [ ] Updated existing tests
31
+ - [ ] Tested manually (describe below)
32
+
33
+ ### Manual Testing Steps
34
+
35
+ 1. Step 1
36
+ 2. Step 2
37
+
38
+ ## Checklist
39
+
40
+ - [ ] My code follows the project's coding standards
41
+ - [ ] I have run `pre-commit run --all-files` and all checks pass
42
+ - [ ] I have added tests that prove my fix/feature works
43
+ - [ ] I have updated the documentation (if applicable)
44
+ - [ ] I have updated the CHANGELOG.md (if applicable)
45
+ - [ ] My changes generate no new warnings
46
+
47
+ ## Screenshots (if applicable)
48
+
49
+ Add screenshots to help explain your changes.
50
+
51
+ ## Additional Notes
52
+
53
+ Any additional information that reviewers should know.
@@ -0,0 +1,59 @@
1
+ # Dependabot configuration
2
+ # https://docs.github.com/en/code-security/dependabot/dependabot-version-updates
3
+ # https://docs.astral.sh/uv/guides/integration/dependency-bots
4
+
5
+ version: 2
6
+ updates:
7
+ # Rust dependencies
8
+ - package-ecosystem: "cargo"
9
+ directory: "/"
10
+ schedule:
11
+ interval: "weekly"
12
+ day: "monday"
13
+ commit-message:
14
+ prefix: "chore(deps)"
15
+ labels:
16
+ - "dependencies"
17
+ - "rust"
18
+ groups:
19
+ rust-dependencies:
20
+ patterns:
21
+ - "*"
22
+
23
+ # Python dependencies (uv)
24
+ - package-ecosystem: "uv"
25
+ directory: "/"
26
+ schedule:
27
+ interval: "weekly"
28
+ day: "monday"
29
+ commit-message:
30
+ prefix: "chore(deps)"
31
+ labels:
32
+ - "dependencies"
33
+ - "python"
34
+ groups:
35
+ python-dev:
36
+ patterns:
37
+ - "mypy*"
38
+ - "ruff*"
39
+ - "pytest*"
40
+ - "pre-commit*"
41
+ python-docs:
42
+ patterns:
43
+ - "mkdocs*"
44
+
45
+ # GitHub Actions
46
+ - package-ecosystem: "github-actions"
47
+ directory: "/"
48
+ schedule:
49
+ interval: "weekly"
50
+ day: "monday"
51
+ commit-message:
52
+ prefix: "chore(ci)"
53
+ labels:
54
+ - "dependencies"
55
+ - "ci"
56
+ groups:
57
+ github-actions:
58
+ patterns:
59
+ - "*"
@@ -0,0 +1,175 @@
1
+ # This file is autogenerated by maturin v1.10.2
2
+ # To update, run
3
+ #
4
+ # maturin generate-ci github
5
+ #
6
+ name: CI
7
+
8
+ on:
9
+ push:
10
+ tags:
11
+ - 'v*'
12
+ workflow_dispatch:
13
+
14
+ permissions:
15
+ contents: read
16
+
17
+ jobs:
18
+ linux:
19
+ runs-on: ${{ matrix.platform.runner }}
20
+ strategy:
21
+ matrix:
22
+ platform:
23
+ - runner: ubuntu-22.04
24
+ target: x86_64
25
+ - runner: ubuntu-22.04
26
+ target: x86
27
+ - runner: ubuntu-22.04
28
+ target: aarch64
29
+ - runner: ubuntu-22.04
30
+ target: armv7
31
+ - runner: ubuntu-22.04
32
+ target: s390x
33
+ - runner: ubuntu-22.04
34
+ target: ppc64le
35
+ steps:
36
+ - uses: actions/checkout@v6
37
+ - uses: actions/setup-python@v6
38
+ with:
39
+ python-version: 3.x
40
+ - name: Build wheels
41
+ uses: PyO3/maturin-action@v1
42
+ with:
43
+ target: ${{ matrix.platform.target }}
44
+ args: --release --out dist --find-interpreter
45
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
46
+ manylinux: auto
47
+ - name: Upload wheels
48
+ uses: actions/upload-artifact@v6
49
+ with:
50
+ name: wheels-linux-${{ matrix.platform.target }}
51
+ path: dist
52
+
53
+ musllinux:
54
+ runs-on: ${{ matrix.platform.runner }}
55
+ strategy:
56
+ matrix:
57
+ platform:
58
+ - runner: ubuntu-22.04
59
+ target: x86_64
60
+ - runner: ubuntu-22.04
61
+ target: x86
62
+ - runner: ubuntu-22.04
63
+ target: aarch64
64
+ - runner: ubuntu-22.04
65
+ target: armv7
66
+ steps:
67
+ - uses: actions/checkout@v6
68
+ - uses: actions/setup-python@v6
69
+ with:
70
+ python-version: 3.x
71
+ - name: Build wheels
72
+ uses: PyO3/maturin-action@v1
73
+ with:
74
+ target: ${{ matrix.platform.target }}
75
+ args: --release --out dist --find-interpreter
76
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
77
+ manylinux: musllinux_1_2
78
+ - name: Upload wheels
79
+ uses: actions/upload-artifact@v6
80
+ with:
81
+ name: wheels-musllinux-${{ matrix.platform.target }}
82
+ path: dist
83
+
84
+ windows:
85
+ runs-on: ${{ matrix.platform.runner }}
86
+ strategy:
87
+ matrix:
88
+ platform:
89
+ - runner: windows-latest
90
+ target: x64
91
+ - runner: windows-latest
92
+ target: x86
93
+ steps:
94
+ - uses: actions/checkout@v6
95
+ - uses: actions/setup-python@v6
96
+ with:
97
+ python-version: 3.x
98
+ architecture: ${{ matrix.platform.target }}
99
+ - name: Build wheels
100
+ uses: PyO3/maturin-action@v1
101
+ with:
102
+ target: ${{ matrix.platform.target }}
103
+ args: --release --out dist --find-interpreter
104
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
105
+ - name: Upload wheels
106
+ uses: actions/upload-artifact@v6
107
+ with:
108
+ name: wheels-windows-${{ matrix.platform.target }}
109
+ path: dist
110
+
111
+ macos:
112
+ runs-on: ${{ matrix.platform.runner }}
113
+ strategy:
114
+ matrix:
115
+ platform:
116
+ - runner: macos-15
117
+ target: x86_64
118
+ - runner: macos-14
119
+ target: aarch64
120
+ steps:
121
+ - uses: actions/checkout@v6
122
+ - uses: actions/setup-python@v6
123
+ with:
124
+ python-version: 3.x
125
+ - name: Build wheels
126
+ uses: PyO3/maturin-action@v1
127
+ with:
128
+ target: ${{ matrix.platform.target }}
129
+ args: --release --out dist --find-interpreter
130
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
131
+ - name: Upload wheels
132
+ uses: actions/upload-artifact@v6
133
+ with:
134
+ name: wheels-macos-${{ matrix.platform.target }}
135
+ path: dist
136
+
137
+ sdist:
138
+ runs-on: ubuntu-latest
139
+ steps:
140
+ - uses: actions/checkout@v6
141
+ - name: Build sdist
142
+ uses: PyO3/maturin-action@v1
143
+ with:
144
+ command: sdist
145
+ args: --out dist
146
+ - name: Upload sdist
147
+ uses: actions/upload-artifact@v6
148
+ with:
149
+ name: wheels-sdist
150
+ path: dist
151
+
152
+ release:
153
+ name: Release
154
+ runs-on: ubuntu-latest
155
+ if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
156
+ needs: [linux, musllinux, windows, macos, sdist]
157
+ permissions:
158
+ # Use to sign the release artifacts
159
+ id-token: write
160
+ # Used to upload release artifacts
161
+ contents: write
162
+ # Used to generate artifact attestation
163
+ attestations: write
164
+ steps:
165
+ - uses: actions/download-artifact@v7
166
+ - name: Generate artifact attestation
167
+ uses: actions/attest-build-provenance@v3
168
+ with:
169
+ subject-path: 'wheels-*/*'
170
+ - name: Publish to PyPI
171
+ if: ${{ startsWith(github.ref, 'refs/tags/') }}
172
+ uses: PyO3/maturin-action@v1
173
+ with:
174
+ command: upload
175
+ args: --non-interactive --skip-existing wheels-*/*
@@ -0,0 +1,38 @@
1
+ name: Dependabot Auto-Merge
2
+
3
+ on:
4
+ pull_request:
5
+ types: [opened, synchronize, reopened]
6
+
7
+ permissions:
8
+ contents: write
9
+ pull-requests: write
10
+
11
+ jobs:
12
+ dependabot-auto-merge:
13
+ runs-on: ubuntu-latest
14
+ if: github.actor == 'dependabot[bot]'
15
+
16
+ steps:
17
+ - name: Dependabot metadata
18
+ id: metadata
19
+ uses: dependabot/fetch-metadata@v2
20
+ with:
21
+ github-token: "${{ secrets.GITHUB_TOKEN }}"
22
+
23
+ - name: Auto-merge minor and patch updates
24
+ if: |
25
+ steps.metadata.outputs.update-type == 'version-update:semver-patch' ||
26
+ steps.metadata.outputs.update-type == 'version-update:semver-minor'
27
+ run: gh pr merge --auto --squash "$PR_URL"
28
+ env:
29
+ PR_URL: ${{ github.event.pull_request.html_url }}
30
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31
+
32
+ - name: Comment on major updates
33
+ if: steps.metadata.outputs.update-type == 'version-update:semver-major'
34
+ run: |
35
+ gh pr comment "$PR_URL" --body "This is a **major** version update. Please review carefully before merging."
36
+ env:
37
+ PR_URL: ${{ github.event.pull_request.html_url }}
38
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -0,0 +1,44 @@
1
+ name: Deploy Docs
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ paths:
8
+ - 'docs/**'
9
+ - 'mkdocs.yml'
10
+ - '.github/workflows/docs.yml'
11
+ workflow_dispatch:
12
+
13
+ permissions:
14
+ contents: write
15
+
16
+ jobs:
17
+ deploy:
18
+ runs-on: ubuntu-latest
19
+ steps:
20
+ - uses: actions/checkout@v6
21
+
22
+ - name: Configure Git
23
+ run: |
24
+ git config user.name github-actions[bot]
25
+ git config user.email github-actions[bot]@users.noreply.github.com
26
+
27
+ - name: Set up Python
28
+ uses: actions/setup-python@v6
29
+ with:
30
+ python-version: '3.12'
31
+
32
+ - name: Cache pip
33
+ uses: actions/cache@v5
34
+ with:
35
+ path: ~/.cache/pip
36
+ key: ${{ runner.os }}-pip-mkdocs-material
37
+ restore-keys: |
38
+ ${{ runner.os }}-pip-
39
+
40
+ - name: Install dependencies
41
+ run: pip install mkdocs-material mkdocstrings[python] mkdocs-minify-plugin
42
+
43
+ - name: Deploy to GitHub Pages
44
+ run: mkdocs gh-deploy --force
@@ -0,0 +1,44 @@
1
+ name: Security Audit
2
+
3
+ on:
4
+ schedule:
5
+ - cron: '0 0 * * 0' # Every Sunday at midnight UTC
6
+ pull_request:
7
+ paths:
8
+ - 'Cargo.toml'
9
+ - 'Cargo.lock'
10
+ - 'pyproject.toml'
11
+ workflow_dispatch:
12
+
13
+ jobs:
14
+ rust-audit:
15
+ name: Rust Security Audit
16
+ runs-on: ubuntu-latest
17
+ steps:
18
+ - uses: actions/checkout@v6
19
+
20
+ - name: Install Rust
21
+ uses: dtolnay/rust-toolchain@stable
22
+
23
+ - name: Install cargo-audit
24
+ run: cargo install cargo-audit
25
+
26
+ - name: Run cargo audit
27
+ run: cargo audit
28
+
29
+ python-audit:
30
+ name: Python Security Audit
31
+ runs-on: ubuntu-latest
32
+ steps:
33
+ - uses: actions/checkout@v6
34
+
35
+ - name: Set up Python
36
+ uses: actions/setup-python@v6
37
+ with:
38
+ python-version: '3.12'
39
+
40
+ - name: Install pip-audit
41
+ run: pip install pip-audit
42
+
43
+ - name: Run pip-audit
44
+ run: pip-audit
@@ -0,0 +1,112 @@
1
+ name: Test
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ env:
10
+ CARGO_TERM_COLOR: always
11
+
12
+ jobs:
13
+ rust-test:
14
+ name: Rust Tests
15
+ runs-on: ubuntu-latest
16
+ steps:
17
+ - uses: actions/checkout@v6
18
+
19
+ - name: Install Rust
20
+ uses: dtolnay/rust-toolchain@stable
21
+
22
+ - name: Cache cargo
23
+ uses: actions/cache@v5
24
+ with:
25
+ path: |
26
+ ~/.cargo/bin/
27
+ ~/.cargo/registry/index/
28
+ ~/.cargo/registry/cache/
29
+ ~/.cargo/git/db/
30
+ target/
31
+ key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
32
+ restore-keys: ${{ runner.os }}-cargo-
33
+
34
+ - name: Check formatting
35
+ run: cargo fmt --all -- --check
36
+
37
+ - name: Clippy
38
+ run: cargo clippy --all-targets --all-features -- -D warnings
39
+
40
+ - name: Run tests
41
+ run: cargo test --all-features
42
+
43
+ python-test:
44
+ name: Python ${{ matrix.python-version }} on ${{ matrix.os }}
45
+ runs-on: ${{ matrix.os }}
46
+ strategy:
47
+ fail-fast: false
48
+ matrix:
49
+ os: [ubuntu-latest, macos-latest, windows-latest]
50
+ python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
51
+
52
+ steps:
53
+ - uses: actions/checkout@v6
54
+
55
+ - name: Set up Python ${{ matrix.python-version }}
56
+ uses: actions/setup-python@v6
57
+ with:
58
+ python-version: ${{ matrix.python-version }}
59
+
60
+ - name: Install Rust
61
+ uses: dtolnay/rust-toolchain@stable
62
+
63
+ - name: Install uv
64
+ uses: astral-sh/setup-uv@v7
65
+
66
+ - name: Install dependencies and build
67
+ run: |
68
+ uv venv
69
+ uv pip install maturin pytest pytest-cov
70
+ uv run maturin develop
71
+
72
+ - name: Run tests
73
+ run: uv run pytest tests/ -v --cov=logust --cov-report=xml
74
+
75
+ - name: Upload coverage
76
+ if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'
77
+ uses: codecov/codecov-action@v5
78
+ with:
79
+ files: ./coverage.xml
80
+ fail_ci_if_error: false
81
+
82
+ lint:
83
+ name: Python Lint
84
+ runs-on: ubuntu-latest
85
+ steps:
86
+ - uses: actions/checkout@v6
87
+
88
+ - name: Set up Python
89
+ uses: actions/setup-python@v6
90
+ with:
91
+ python-version: '3.12'
92
+
93
+ - name: Install Rust
94
+ uses: dtolnay/rust-toolchain@stable
95
+
96
+ - name: Install uv
97
+ uses: astral-sh/setup-uv@v7
98
+
99
+ - name: Install dependencies and build
100
+ run: |
101
+ uv venv
102
+ uv pip install maturin ruff mypy
103
+ uv run maturin develop
104
+
105
+ - name: Ruff check
106
+ run: uv run ruff check logust/
107
+
108
+ - name: Ruff format check
109
+ run: uv run ruff format --check logust/
110
+
111
+ - name: Mypy
112
+ run: uv run mypy logust --ignore-missing-imports