pytail 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.
@@ -0,0 +1,17 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: cargo
4
+ directory: /
5
+ schedule:
6
+ interval: weekly
7
+ open-pull-requests-limit: 5
8
+ groups:
9
+ rust-dependencies:
10
+ patterns:
11
+ - "*"
12
+
13
+ - package-ecosystem: github-actions
14
+ directory: /
15
+ schedule:
16
+ interval: weekly
17
+ open-pull-requests-limit: 5
@@ -0,0 +1,89 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ pull_request:
8
+ workflow_dispatch:
9
+
10
+ permissions:
11
+ contents: read
12
+
13
+ concurrency:
14
+ group: ci-${{ github.workflow }}-${{ github.ref }}
15
+ cancel-in-progress: true
16
+
17
+ env:
18
+ CARGO_TERM_COLOR: always
19
+
20
+ jobs:
21
+ rust:
22
+ name: Rust checks
23
+ runs-on: ubuntu-latest
24
+ steps:
25
+ - name: Checkout
26
+ uses: actions/checkout@v6
27
+
28
+ - name: Install Rust
29
+ uses: dtolnay/rust-toolchain@stable
30
+ with:
31
+ components: clippy, rustfmt
32
+
33
+ - name: Cache Cargo
34
+ uses: Swatinem/rust-cache@v2
35
+
36
+ - name: Check formatting
37
+ run: cargo fmt --all --check
38
+
39
+ - name: Run Clippy
40
+ run: cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
41
+
42
+ - name: Run tests
43
+ run: cargo test --workspace --all-features --locked
44
+
45
+ package:
46
+ name: Python packaging check
47
+ runs-on: ubuntu-latest
48
+ steps:
49
+ - name: Checkout
50
+ uses: actions/checkout@v6
51
+
52
+ - name: Install Rust
53
+ uses: dtolnay/rust-toolchain@stable
54
+
55
+ - name: Cache Cargo
56
+ uses: Swatinem/rust-cache@v2
57
+
58
+ - name: Install Python
59
+ uses: actions/setup-python@v6
60
+ with:
61
+ python-version: "3.12"
62
+ cache: pip
63
+
64
+ - name: Install maturin
65
+ run: python -m pip install --upgrade "maturin>=1.13,<2"
66
+
67
+ - name: Build wheel
68
+ run: maturin build --release --locked --out dist
69
+
70
+ - name: Build source distribution
71
+ run: maturin sdist --out dist
72
+
73
+ - name: Upload package artifacts
74
+ uses: actions/upload-artifact@v7
75
+ with:
76
+ name: package-check
77
+ path: dist/*
78
+ if-no-files-found: error
79
+
80
+ dependency-review:
81
+ name: Dependency review
82
+ runs-on: ubuntu-latest
83
+ if: github.event_name == 'pull_request'
84
+ steps:
85
+ - name: Checkout
86
+ uses: actions/checkout@v6
87
+
88
+ - name: Review dependency changes
89
+ uses: actions/dependency-review-action@v5
@@ -0,0 +1,160 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*.*.*"
7
+ workflow_dispatch:
8
+
9
+ permissions:
10
+ contents: read
11
+
12
+ concurrency:
13
+ group: release-${{ github.ref }}
14
+ cancel-in-progress: false
15
+
16
+ env:
17
+ CARGO_TERM_COLOR: always
18
+
19
+ jobs:
20
+ validate:
21
+ name: Validate release version
22
+ runs-on: ubuntu-latest
23
+ outputs:
24
+ version: ${{ steps.version.outputs.version }}
25
+ steps:
26
+ - name: Checkout
27
+ uses: actions/checkout@v6
28
+
29
+ - name: Install Python
30
+ uses: actions/setup-python@v6
31
+ with:
32
+ python-version: "3.12"
33
+
34
+ - name: Check tag matches package versions
35
+ id: version
36
+ shell: bash
37
+ run: |
38
+ set -euo pipefail
39
+
40
+ if [[ "${GITHUB_REF_TYPE}" != "tag" ]]; then
41
+ echo "Release publishing only runs from version tags." >&2
42
+ exit 1
43
+ fi
44
+
45
+ version="${GITHUB_REF_NAME#v}"
46
+ python - "$version" <<'PY'
47
+ import pathlib
48
+ import sys
49
+ import tomllib
50
+
51
+ expected = sys.argv[1]
52
+
53
+ cargo = tomllib.loads(pathlib.Path("Cargo.toml").read_text())
54
+ pyproject = tomllib.loads(pathlib.Path("pyproject.toml").read_text())
55
+
56
+ versions = {
57
+ "Cargo.toml package.version": cargo["package"]["version"],
58
+ "pyproject.toml project.version": pyproject["project"]["version"],
59
+ }
60
+
61
+ mismatches = [f"{name}={value!r}" for name, value in versions.items() if value != expected]
62
+ if mismatches:
63
+ raise SystemExit(
64
+ f"Tag v{expected} does not match package versions: {', '.join(mismatches)}"
65
+ )
66
+ PY
67
+
68
+ echo "version=${version}" >> "$GITHUB_OUTPUT"
69
+
70
+ build-wheels:
71
+ name: Build ${{ matrix.platform }}
72
+ needs: validate
73
+ runs-on: ${{ matrix.os }}
74
+ strategy:
75
+ fail-fast: false
76
+ matrix:
77
+ include:
78
+ - platform: linux-x86_64
79
+ os: ubuntu-latest
80
+ target: x86_64-unknown-linux-gnu
81
+ manylinux: auto
82
+ - platform: macos-universal2
83
+ os: macos-14
84
+ target: universal2-apple-darwin
85
+ - platform: windows-x86_64
86
+ os: windows-latest
87
+ target: x86_64-pc-windows-msvc
88
+ steps:
89
+ - name: Checkout
90
+ uses: actions/checkout@v6
91
+
92
+ - name: Build wheel
93
+ uses: PyO3/maturin-action@v1
94
+ with:
95
+ target: ${{ matrix.target }}
96
+ args: --release --locked --out dist
97
+ manylinux: ${{ matrix.manylinux || 'off' }}
98
+ sccache: "true"
99
+
100
+ - name: Upload wheels
101
+ uses: actions/upload-artifact@v7
102
+ with:
103
+ name: wheels-${{ matrix.platform }}
104
+ path: dist/*
105
+ if-no-files-found: error
106
+
107
+ build-sdist:
108
+ name: Build source distribution
109
+ needs: validate
110
+ runs-on: ubuntu-latest
111
+ steps:
112
+ - name: Checkout
113
+ uses: actions/checkout@v6
114
+
115
+ - name: Install Rust
116
+ uses: dtolnay/rust-toolchain@stable
117
+
118
+ - name: Install Python
119
+ uses: actions/setup-python@v6
120
+ with:
121
+ python-version: "3.12"
122
+ cache: pip
123
+
124
+ - name: Install maturin
125
+ run: python -m pip install --upgrade "maturin>=1.13,<2"
126
+
127
+ - name: Build sdist
128
+ run: maturin sdist --out dist
129
+
130
+ - name: Upload source distribution
131
+ uses: actions/upload-artifact@v7
132
+ with:
133
+ name: sdist
134
+ path: dist/*
135
+ if-no-files-found: error
136
+
137
+ publish-pypi:
138
+ name: Publish to PyPI
139
+ needs:
140
+ - build-wheels
141
+ - build-sdist
142
+ runs-on: ubuntu-latest
143
+ environment:
144
+ name: pypi
145
+ url: https://pypi.org/p/pytail
146
+ permissions:
147
+ contents: read
148
+ id-token: write
149
+ steps:
150
+ - name: Download distributions
151
+ uses: actions/download-artifact@v8
152
+ with:
153
+ path: dist
154
+ pattern: "*"
155
+ merge-multiple: true
156
+
157
+ - name: Publish distributions
158
+ uses: pypa/gh-action-pypi-publish@release/v1
159
+ with:
160
+ packages-dir: dist
@@ -0,0 +1,2 @@
1
+ /target
2
+ .cache/
@@ -0,0 +1,24 @@
1
+ repos:
2
+ - repo: https://github.com/pre-commit/pre-commit-hooks
3
+ rev: v6.0.0
4
+ hooks:
5
+ - id: fix-byte-order-marker
6
+ - id: check-case-conflict
7
+ - id: check-merge-conflict
8
+ - id: check-symlinks
9
+ - id: check-yaml
10
+ - id: end-of-file-fixer
11
+ - id: mixed-line-ending
12
+ - id: trailing-whitespace
13
+
14
+ - repo: https://github.com/doublify/pre-commit-rust
15
+ rev: v1.0
16
+ hooks:
17
+ - id: fmt
18
+ - id: clippy
19
+ - id: cargo-check
20
+
21
+ - repo: https://github.com/bnjbvr/cargo-machete
22
+ rev: v0.9.1
23
+ hooks:
24
+ - id: cargo-machete