xuplift 0.0.1__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 (36) hide show
  1. xuplift-0.0.1/.github/CODEOWNERS +2 -0
  2. xuplift-0.0.1/.github/workflows/ci.yaml +33 -0
  3. xuplift-0.0.1/.github/workflows/pyci.yaml +36 -0
  4. xuplift-0.0.1/.github/workflows/release.yaml +65 -0
  5. xuplift-0.0.1/.gitignore +25 -0
  6. xuplift-0.0.1/Cargo.lock +1783 -0
  7. xuplift-0.0.1/Cargo.toml +16 -0
  8. xuplift-0.0.1/LICENSE +21 -0
  9. xuplift-0.0.1/PKG-INFO +38 -0
  10. xuplift-0.0.1/README.md +26 -0
  11. xuplift-0.0.1/pyproject.toml +29 -0
  12. xuplift-0.0.1/python/tests/test_classifier.py +42 -0
  13. xuplift-0.0.1/python/tests/test_metalearners.py +66 -0
  14. xuplift-0.0.1/python/tests/test_regressor.py +36 -0
  15. xuplift-0.0.1/python/xuplift/__init__.py +10 -0
  16. xuplift-0.0.1/python/xuplift/__init__.pyi +73 -0
  17. xuplift-0.0.1/python/xuplift/py.typed +0 -0
  18. xuplift-0.0.1/src/feature_map.rs +241 -0
  19. xuplift-0.0.1/src/lib.rs +27 -0
  20. xuplift-0.0.1/src/metalearners/data_utils.rs +22 -0
  21. xuplift-0.0.1/src/metalearners/mod.rs +5 -0
  22. xuplift-0.0.1/src/metalearners/rlearner.rs +104 -0
  23. xuplift-0.0.1/src/metalearners/slearner.rs +107 -0
  24. xuplift-0.0.1/src/metalearners/tlearner.rs +80 -0
  25. xuplift-0.0.1/src/metalearners/xlearner.rs +129 -0
  26. xuplift-0.0.1/src/python.rs +318 -0
  27. xuplift-0.0.1/src/xmodels/classifier.rs +208 -0
  28. xuplift-0.0.1/src/xmodels/mod.rs +2 -0
  29. xuplift-0.0.1/src/xmodels/regressor.rs +182 -0
  30. xuplift-0.0.1/tests/classifier_test.rs +97 -0
  31. xuplift-0.0.1/tests/regressior_test.rs +91 -0
  32. xuplift-0.0.1/tests/rlearner_test.rs +86 -0
  33. xuplift-0.0.1/tests/slearner_test.rs +81 -0
  34. xuplift-0.0.1/tests/tlearner_test.rs +91 -0
  35. xuplift-0.0.1/tests/xlearner_test.rs +92 -0
  36. xuplift-0.0.1/uv.lock +507 -0
@@ -0,0 +1,2 @@
1
+ # ALL
2
+ @RektPunk
@@ -0,0 +1,33 @@
1
+ name: Rust CI
2
+
3
+ on:
4
+ pull_request:
5
+ types: [opened, reopened, synchronize]
6
+ push:
7
+ branches:
8
+ - main
9
+
10
+ env:
11
+ CARGO_TERM_COLOR: always
12
+
13
+ jobs:
14
+ quality-check:
15
+ runs-on: ubuntu-latest
16
+ steps:
17
+ - uses: actions/checkout@v6
18
+ - name: Install Rust
19
+ uses: dtolnay/rust-toolchain@stable
20
+ with:
21
+ components: rustfmt, clippy
22
+
23
+ - name: Rust Cache
24
+ uses: Swatinem/rust-cache@v2
25
+
26
+ - name: Check Formatting
27
+ run: cargo fmt --check
28
+
29
+ - name: Run Clippy
30
+ run: cargo clippy -- -D warnings
31
+
32
+ - name: Run Tests
33
+ run: cargo test --verbose --release
@@ -0,0 +1,36 @@
1
+ name: Tests
2
+
3
+ on:
4
+ pull_request:
5
+ types: [opened, reopened, synchronize]
6
+ push:
7
+ branches:
8
+ - main
9
+
10
+ jobs:
11
+ run-pytest:
12
+ runs-on: ubuntu-latest
13
+
14
+ steps:
15
+ - name: Checkout code
16
+ uses: actions/checkout@v6
17
+
18
+ - name: Set up python
19
+ uses: actions/setup-python@v6
20
+ with:
21
+ python-version: "3.10"
22
+
23
+ - name: Install Rust
24
+ uses: dtolnay/rust-toolchain@stable
25
+
26
+ - name: Install uv
27
+ uses: astral-sh/setup-uv@v7
28
+
29
+ - name: Install dependencies
30
+ run: uv sync --all-extras --dev
31
+
32
+ - name: Build and Install Extension
33
+ run: uvx maturin develop --release
34
+
35
+ - name: Run tests
36
+ run: uv run pytest python/tests/
@@ -0,0 +1,65 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*.*.*"
7
+
8
+ permissions:
9
+ contents: read
10
+
11
+ jobs:
12
+ build_wheels:
13
+ name: Build wheels on ${{ matrix.os }}
14
+ runs-on: ${{ matrix.os }}
15
+ strategy:
16
+ matrix:
17
+ os: [ubuntu-latest, windows-latest, macos-latest]
18
+
19
+ steps:
20
+ - uses: actions/checkout@v6
21
+ - uses: actions/setup-python@v6
22
+ with:
23
+ python-version: "3.10"
24
+
25
+ - name: Build wheels
26
+ uses: PyO3/maturin-action@v1
27
+ with:
28
+ command: build
29
+ args: --release --out dist
30
+ manylinux: auto
31
+ sccache: "true"
32
+
33
+ - name: Upload wheels
34
+ uses: actions/upload-artifact@v7
35
+ with:
36
+ name: wheels-${{ matrix.os }}
37
+ path: dist
38
+
39
+ publish:
40
+ name: Publish to PyPI
41
+ runs-on: ubuntu-latest
42
+ needs: [build_wheels]
43
+ steps:
44
+ - uses: actions/checkout@v6
45
+
46
+ - name: Download all wheels
47
+ uses: actions/download-artifact@v8
48
+ with:
49
+ path: dist
50
+ pattern: wheels-*
51
+ merge-multiple: true
52
+
53
+ - name: Build sdist
54
+ uses: PyO3/maturin-action@v1
55
+ with:
56
+ command: sdist
57
+ args: --out dist
58
+
59
+ - name: Publish to PyPI
60
+ uses: PyO3/maturin-action@v1
61
+ env:
62
+ MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
63
+ with:
64
+ command: upload
65
+ args: --non-interactive --skip-existing dist/*
@@ -0,0 +1,25 @@
1
+ # Generated by Cargo
2
+ # will have compiled files and executables
3
+ debug
4
+ target
5
+
6
+ # These are backup files generated by rustfmt
7
+ **/*.rs.bk
8
+
9
+ # MSVC Windows builds of rustc generate these, which store debugging information
10
+ *.pdb
11
+
12
+ # Generated by cargo mutants
13
+ # Contains mutation testing data
14
+ **/mutants.out*/
15
+
16
+ __pycache__/
17
+ *.py[cod]
18
+ *$py.class
19
+ *.so
20
+ *.whl
21
+ .python-version
22
+
23
+ dist/
24
+ .venv
25
+ .DS_Store