gtboost 0.1.0a1__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,32 @@
1
+ name: ci
2
+
3
+ on:
4
+ push:
5
+ pull_request:
6
+
7
+ jobs:
8
+ test:
9
+ runs-on: ubuntu-latest
10
+ steps:
11
+ - uses: actions/checkout@v4
12
+ - uses: actions/setup-python@v5
13
+ with:
14
+ python-version: "3.12"
15
+ - uses: dtolnay/rust-toolchain@stable
16
+ - name: Install Python deps
17
+ run: |
18
+ python -m pip install --upgrade pip
19
+ python -m pip install maturin pytest numpy pandas scikit-learn
20
+ - name: Rust tests
21
+ run: cargo test
22
+ - name: Build and install extension
23
+ run: |
24
+ maturin build --release --out dist --interpreter python
25
+ python -m pip install --force-reinstall dist/*.whl
26
+ - name: Python smoke tests
27
+ run: |
28
+ python -m py_compile gtboost/__init__.py gtboost/tuner.py gtboost/optuna_tuner.py tests/test_api_smoke.py
29
+ tmpdir="$(mktemp -d)"
30
+ cp tests/test_api_smoke.py "$tmpdir/"
31
+ cd "$tmpdir"
32
+ python -m pytest -q test_api_smoke.py
@@ -0,0 +1,119 @@
1
+ name: wheels
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ push:
6
+ tags:
7
+ - "v*"
8
+ release:
9
+ types: [published]
10
+
11
+ jobs:
12
+ build-wheels:
13
+ name: ${{ matrix.platform.name }} py${{ matrix.python-version }}
14
+ runs-on: ${{ matrix.platform.os }}
15
+ strategy:
16
+ fail-fast: false
17
+ matrix:
18
+ python-version: ["3.10", "3.11", "3.12"]
19
+ platform:
20
+ - name: linux-x86_64
21
+ os: ubuntu-latest
22
+ - name: macos-arm64
23
+ os: macos-14
24
+ - name: windows-x86_64
25
+ os: windows-2022
26
+
27
+ steps:
28
+ - uses: actions/checkout@v4
29
+
30
+ - uses: actions/setup-python@v5
31
+ with:
32
+ python-version: ${{ matrix.python-version }}
33
+
34
+ - uses: dtolnay/rust-toolchain@stable
35
+
36
+ - name: Build Linux wheel
37
+ if: runner.os == 'Linux'
38
+ uses: PyO3/maturin-action@v1
39
+ with:
40
+ command: build
41
+ args: --release --out dist -i python${{ matrix.python-version }}
42
+ manylinux: "2014"
43
+
44
+ - name: Build host wheel
45
+ if: runner.os != 'Linux'
46
+ uses: PyO3/maturin-action@v1
47
+ with:
48
+ command: build
49
+ args: --release --out dist --interpreter python
50
+
51
+ - name: Upload wheel artifact
52
+ uses: actions/upload-artifact@v4
53
+ with:
54
+ name: gtboost-${{ matrix.platform.name }}-py${{ matrix.python-version }}
55
+ path: dist/*.whl
56
+ if-no-files-found: error
57
+
58
+ build-sdist:
59
+ name: source distribution
60
+ runs-on: ubuntu-latest
61
+ steps:
62
+ - uses: actions/checkout@v4
63
+
64
+ - uses: actions/setup-python@v5
65
+ with:
66
+ python-version: "3.12"
67
+
68
+ - uses: dtolnay/rust-toolchain@stable
69
+
70
+ - name: Build sdist
71
+ uses: PyO3/maturin-action@v1
72
+ with:
73
+ command: sdist
74
+ args: --out dist
75
+
76
+ - name: Upload sdist artifact
77
+ uses: actions/upload-artifact@v4
78
+ with:
79
+ name: gtboost-sdist
80
+ path: dist/*.tar.gz
81
+ if-no-files-found: error
82
+
83
+ upload-release:
84
+ name: attach assets to release
85
+ needs: [build-wheels, build-sdist]
86
+ if: github.event_name == 'release' && github.event.action == 'published'
87
+ runs-on: ubuntu-latest
88
+ permissions:
89
+ contents: write
90
+ steps:
91
+ - uses: actions/download-artifact@v4
92
+ with:
93
+ path: dist
94
+ merge-multiple: true
95
+
96
+ - name: Attach wheels and sdist to GitHub release
97
+ uses: softprops/action-gh-release@v2
98
+ with:
99
+ files: |
100
+ dist/*.whl
101
+ dist/*.tar.gz
102
+
103
+ publish-pypi:
104
+ name: publish to PyPI
105
+ needs: [build-wheels, build-sdist]
106
+ if: github.event_name == 'release' && github.event.action == 'published'
107
+ runs-on: ubuntu-latest
108
+ environment: pypi
109
+ permissions:
110
+ contents: read
111
+ id-token: write
112
+ steps:
113
+ - uses: actions/download-artifact@v4
114
+ with:
115
+ path: dist
116
+ merge-multiple: true
117
+
118
+ - name: Publish package distributions to PyPI
119
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,21 @@
1
+ /target
2
+ *.pyc
3
+ __pycache__/
4
+ .ipynb_checkpoints/
5
+ catboost_info/
6
+ *.egg-info/
7
+ dist/
8
+ build/
9
+ *.so
10
+ *.dylib
11
+ *.pyd
12
+ .DS_Store
13
+ .venv/
14
+ venv/
15
+ .pytest_cache/
16
+ .mypy_cache/
17
+ .ruff_cache/
18
+ logs/
19
+ benchmarks/results/
20
+ data/
21
+ *.log