trainingsample 0.2.4__tar.gz → 0.2.5__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 (41) hide show
  1. trainingsample-0.2.5/.github/workflows/ci-docker.yml +153 -0
  2. {trainingsample-0.2.4 → trainingsample-0.2.5}/.github/workflows/publish.yml +7 -7
  3. {trainingsample-0.2.4 → trainingsample-0.2.5}/Cargo.lock +3 -3
  4. {trainingsample-0.2.4 → trainingsample-0.2.5}/Cargo.toml +1 -1
  5. {trainingsample-0.2.4 → trainingsample-0.2.5}/PKG-INFO +1 -1
  6. {trainingsample-0.2.4 → trainingsample-0.2.5}/pyproject.toml +1 -1
  7. {trainingsample-0.2.4 → trainingsample-0.2.5}/.cargo/config.toml +0 -0
  8. {trainingsample-0.2.4 → trainingsample-0.2.5}/.envrc +0 -0
  9. {trainingsample-0.2.4 → trainingsample-0.2.5}/.github/workflows/ci.yml +0 -0
  10. {trainingsample-0.2.4 → trainingsample-0.2.5}/.gitignore +0 -0
  11. {trainingsample-0.2.4 → trainingsample-0.2.5}/.pre-commit-config.yaml +0 -0
  12. {trainingsample-0.2.4 → trainingsample-0.2.5}/.rustfmt.toml +0 -0
  13. {trainingsample-0.2.4 → trainingsample-0.2.5}/BENCHMARKS.md +0 -0
  14. {trainingsample-0.2.4 → trainingsample-0.2.5}/LICENSE +0 -0
  15. {trainingsample-0.2.4 → trainingsample-0.2.5}/README.md +0 -0
  16. {trainingsample-0.2.4 → trainingsample-0.2.5}/clippy.toml +0 -0
  17. {trainingsample-0.2.4 → trainingsample-0.2.5}/docs/API_COMPAT_CV2.md +0 -0
  18. {trainingsample-0.2.4 → trainingsample-0.2.5}/docs/BUILDING_STATIC_OPENCV.md +0 -0
  19. {trainingsample-0.2.4 → trainingsample-0.2.5}/rust-toolchain.toml +0 -0
  20. {trainingsample-0.2.4 → trainingsample-0.2.5}/scripts/build-opencv-static.sh +0 -0
  21. {trainingsample-0.2.4 → trainingsample-0.2.5}/scripts/run_competitive_benchmarks.sh +0 -0
  22. {trainingsample-0.2.4 → trainingsample-0.2.5}/setup-env.sh +0 -0
  23. {trainingsample-0.2.4 → trainingsample-0.2.5}/src/core.rs +0 -0
  24. {trainingsample-0.2.4 → trainingsample-0.2.5}/src/cropping.rs +0 -0
  25. {trainingsample-0.2.4 → trainingsample-0.2.5}/src/cv_batch_ops.rs +0 -0
  26. {trainingsample-0.2.4 → trainingsample-0.2.5}/src/cv_batch_ops_optimized.rs +0 -0
  27. {trainingsample-0.2.4 → trainingsample-0.2.5}/src/cv_compat.rs +0 -0
  28. {trainingsample-0.2.4 → trainingsample-0.2.5}/src/format_conversion_simd.rs +0 -0
  29. {trainingsample-0.2.4 → trainingsample-0.2.5}/src/lib.rs +0 -0
  30. {trainingsample-0.2.4 → trainingsample-0.2.5}/src/loading.rs +0 -0
  31. {trainingsample-0.2.4 → trainingsample-0.2.5}/src/luminance.rs +0 -0
  32. {trainingsample-0.2.4 → trainingsample-0.2.5}/src/luminance_simd.rs +0 -0
  33. {trainingsample-0.2.4 → trainingsample-0.2.5}/src/opencv_ops.rs +0 -0
  34. {trainingsample-0.2.4 → trainingsample-0.2.5}/src/python_bindings.rs +0 -0
  35. {trainingsample-0.2.4 → trainingsample-0.2.5}/src/tests.rs +0 -0
  36. {trainingsample-0.2.4 → trainingsample-0.2.5}/src/true_batch_ops.rs +0 -0
  37. {trainingsample-0.2.4 → trainingsample-0.2.5}/tests/__init__.py +0 -0
  38. {trainingsample-0.2.4 → trainingsample-0.2.5}/tests/comprehensive_tests.rs +0 -0
  39. {trainingsample-0.2.4 → trainingsample-0.2.5}/tests/test_comprehensive.py +0 -0
  40. {trainingsample-0.2.4 → trainingsample-0.2.5}/tests/test_performance_benchmarks.py +0 -0
  41. {trainingsample-0.2.4 → trainingsample-0.2.5}/tests/test_python_bindings.py +0 -0
@@ -0,0 +1,153 @@
1
+ name: CI (Docker)
2
+
3
+ on:
4
+ push:
5
+ branches: [ main, develop ]
6
+ pull_request:
7
+ branches: [ main ]
8
+
9
+ env:
10
+ CARGO_TERM_COLOR: always
11
+
12
+ jobs:
13
+ build-container:
14
+ name: Build Docker Container
15
+ runs-on: ubuntu-latest
16
+ outputs:
17
+ image-digest: ${{ steps.build.outputs.digest }}
18
+ image-tag: ${{ steps.meta.outputs.tags }}
19
+ steps:
20
+ - uses: actions/checkout@v4
21
+
22
+ - name: Set up Docker Buildx
23
+ uses: docker/setup-buildx-action@v3
24
+
25
+ - name: Extract metadata
26
+ id: meta
27
+ uses: docker/metadata-action@v5
28
+ with:
29
+ images: ghcr.io/${{ github.repository }}/ci-runner
30
+ tags: |
31
+ type=ref,event=branch
32
+ type=ref,event=pr
33
+ type=sha,prefix={{branch}}-
34
+
35
+ - name: Build and push
36
+ id: build
37
+ uses: docker/build-push-action@v5
38
+ with:
39
+ context: .
40
+ file: ./Dockerfile
41
+ push: true
42
+ tags: ${{ steps.meta.outputs.tags }}
43
+ labels: ${{ steps.meta.outputs.labels }}
44
+ cache-from: type=gha
45
+ cache-to: type=gha,mode=max
46
+
47
+ rust-tests:
48
+ name: Rust Tests
49
+ runs-on: ubuntu-latest
50
+ needs: build-container
51
+ container:
52
+ image: ${{ needs.build-container.outputs.image-tag }}
53
+ steps:
54
+ - uses: actions/checkout@v4
55
+
56
+ - name: Cache cargo registry
57
+ uses: actions/cache@v4
58
+ with:
59
+ path: ~/.cargo/registry
60
+ key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
61
+
62
+ - name: Cache cargo index
63
+ uses: actions/cache@v4
64
+ with:
65
+ path: ~/.cargo/git
66
+ key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
67
+
68
+ - name: Cache cargo target
69
+ uses: actions/cache@v4
70
+ with:
71
+ path: target
72
+ key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
73
+
74
+ - name: Check formatting
75
+ run: cargo fmt --all -- --check
76
+
77
+ - name: Run clippy
78
+ run: cargo clippy --all-targets --no-default-features --features python-bindings,simd,opencv -- -D warnings
79
+
80
+ - name: Run tests (no Python bindings)
81
+ run: cargo test --no-default-features --features simd,opencv
82
+
83
+ - name: Compile tests (Linux compatible features)
84
+ run: cargo test --no-default-features --features python-bindings,simd,opencv --no-run
85
+
86
+ python-tests:
87
+ name: Python Tests
88
+ runs-on: ubuntu-latest
89
+ needs: build-container
90
+ strategy:
91
+ matrix:
92
+ python-version: ["3.11", "3.12"]
93
+ container:
94
+ image: ${{ needs.build-container.outputs.image-tag }}
95
+ steps:
96
+ - uses: actions/checkout@v4
97
+
98
+ - name: Set up Python ${{ matrix.python-version }}
99
+ uses: actions/setup-python@v4
100
+ with:
101
+ python-version: ${{ matrix.python-version }}
102
+
103
+ - name: Build Python package
104
+ run: |
105
+ mkdir -p dist
106
+ maturin build --release --out dist --no-default-features --features python-bindings,simd,opencv
107
+
108
+ - name: Install built package
109
+ run: pip install dist/*.whl
110
+
111
+ - name: Install test dependencies
112
+ run: pip install pytest pytest-benchmark numpy pillow opencv-python
113
+
114
+ - name: Run Python tests
115
+ run: pytest tests/ -v
116
+
117
+ pre-commit:
118
+ name: Pre-commit hooks
119
+ runs-on: ubuntu-latest
120
+ needs: build-container
121
+ container:
122
+ image: ${{ needs.build-container.outputs.image-tag }}
123
+ steps:
124
+ - uses: actions/checkout@v4
125
+
126
+ - name: Install cargo-audit
127
+ run: cargo install cargo-audit
128
+
129
+ - name: Install pre-commit
130
+ run: pip install pre-commit
131
+
132
+ - name: Run pre-commit
133
+ run: pre-commit run --all-files
134
+
135
+ build-wheels:
136
+ name: Build wheels
137
+ runs-on: ubuntu-latest
138
+ needs: build-container
139
+ container:
140
+ image: ${{ needs.build-container.outputs.image-tag }}
141
+ steps:
142
+ - uses: actions/checkout@v4
143
+
144
+ - name: Build wheels
145
+ run: |
146
+ mkdir -p dist
147
+ maturin build --release --out dist --no-default-features --features python-bindings,simd,opencv
148
+
149
+ - name: Upload wheels
150
+ uses: actions/upload-artifact@v4
151
+ with:
152
+ name: wheels-linux
153
+ path: dist/
@@ -17,10 +17,10 @@ jobs:
17
17
  target: x86_64
18
18
  manylinux: manylinux_2_35
19
19
  python-versions: '["3.11", "3.12"]'
20
- # Ubuntu 24.04 (libc 2.38)
20
+ # Ubuntu 24.04 (libc 2.39, wheels tagged manylinux_2_35 for compatibility)
21
21
  - os: ubuntu-24.04
22
22
  target: x86_64
23
- manylinux: manylinux_2_38
23
+ manylinux: manylinux_2_39
24
24
  python-versions: '["3.11", "3.12"]'
25
25
  steps:
26
26
  - uses: actions/checkout@v4
@@ -40,11 +40,11 @@ jobs:
40
40
  # Completely remove needrestart to eliminate hanging prompts
41
41
  sudo apt-get remove -y needrestart || true
42
42
  export DEBIAN_FRONTEND=noninteractive
43
-
43
+
44
44
  sudo apt-get update
45
45
  # Install basic LLVM for opencv-rust bindings codegen
46
46
  sudo apt-get install -y clang libclang-dev llvm-dev cmake curl wget software-properties-common
47
-
47
+
48
48
  # For Ubuntu 22.04, use the default LLVM 14 instead of PPA to avoid restart issues
49
49
  if [ "${{ matrix.os }}" = "ubuntu-22.04" ]; then
50
50
  echo "Using default LLVM 14 for Ubuntu 22.04"
@@ -55,20 +55,20 @@ jobs:
55
55
  sudo apt-get install -y llvm-18 llvm-18-dev llvm-18-tools libclang1-18 libclang-cpp18
56
56
  echo "LLVM_CONFIG_PATH=/usr/bin/llvm-config-18" >> $GITHUB_ENV
57
57
  fi
58
-
58
+
59
59
  # Find the correct libclang.so path and set environment variables (search only LLVM directories)
60
60
  if [ "${{ matrix.os }}" = "ubuntu-22.04" ]; then
61
61
  LIBCLANG_PATH="/usr/lib/llvm-14/lib"
62
62
  else
63
63
  LIBCLANG_PATH="/usr/lib/llvm-18/lib"
64
64
  fi
65
-
65
+
66
66
  # Verify the file exists at the expected location
67
67
  if [ ! -f "$LIBCLANG_PATH/libclang.so" ]; then
68
68
  # Fallback to targeted search if expected location doesn't exist
69
69
  LIBCLANG_PATH=$(find /usr/lib/llvm* -name "libclang.so" 2>/dev/null | head -1 | xargs dirname)
70
70
  fi
71
-
71
+
72
72
  echo "LIBCLANG_PATH=$LIBCLANG_PATH" >> $GITHUB_ENV
73
73
  echo "LD_LIBRARY_PATH=$LIBCLANG_PATH:$LD_LIBRARY_PATH" >> $GITHUB_ENV
74
74
  # Verify the key files exist
@@ -1703,7 +1703,7 @@ dependencies = [
1703
1703
 
1704
1704
  [[package]]
1705
1705
  name = "trainingsample"
1706
- version = "0.2.4"
1706
+ version = "0.2.5"
1707
1707
  dependencies = [
1708
1708
  "anyhow",
1709
1709
  "criterion",
@@ -1729,9 +1729,9 @@ checksum = "d2df906b07856748fa3f6e0ad0cbaa047052d4a7dd609e231c4f72cee8c36f31"
1729
1729
 
1730
1730
  [[package]]
1731
1731
  name = "typenum"
1732
- version = "1.18.0"
1732
+ version = "1.19.0"
1733
1733
  source = "registry+https://github.com/rust-lang/crates.io-index"
1734
- checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f"
1734
+ checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb"
1735
1735
 
1736
1736
  [[package]]
1737
1737
  name = "unicode-ident"
@@ -37,7 +37,7 @@ description = "High-performance Rust reimplementation of GIL-blocking video/imag
37
37
  edition = "2021"
38
38
  license = "MIT"
39
39
  name = "trainingsample"
40
- version = "0.2.4"
40
+ version = "0.2.5"
41
41
  readme = "README.md"
42
42
 
43
43
  [profile.release]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: trainingsample
3
- Version: 0.2.4
3
+ Version: 0.2.5
4
4
  Classifier: Programming Language :: Rust
5
5
  Classifier: Programming Language :: Python :: Implementation :: CPython
6
6
  Classifier: Programming Language :: Python :: Implementation :: PyPy
@@ -14,7 +14,7 @@ description = "High-performance Rust reimplementation of GIL-blocking video/imag
14
14
  license = {text = "MIT"}
15
15
  name = "trainingsample"
16
16
  requires-python = ">=3.11"
17
- version = "0.2.4"
17
+ version = "0.2.5"
18
18
 
19
19
  [project.optional-dependencies]
20
20
  dev = ["pytest>=6.0", "pytest-benchmark", "maturin>=1.0,<2.0", "pre-commit"]
File without changes
File without changes
File without changes