Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: Bump pre-commit and Github actions + py3.10 on CI #22

Merged
merged 3 commits into from
Jul 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 8 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ jobs:
strategy:
fail-fast: false
matrix:
PYTHON_VERSION: ["3.7", "3.9"]
PYTHON_VERSION: ["3.7", "3.10"]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Setup conda cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ~/conda_pkgs_dir
key:
Expand All @@ -30,7 +30,7 @@ jobs:
use-only-tar-bz2: true
use-mamba: true
- name: Setup hypothesis DB cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ./.hypothesis
key: hypothesisDB ${{ matrix.PYTHON_VERSION }}
Expand All @@ -39,7 +39,7 @@ jobs:
run: ./.github/ci.sh ${{ matrix.PYTHON_VERSION }}
- name: Publish a Python distribution to PyPI
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') && matrix.PYTHON_VERSION == '3.7'
uses: pypa/gh-action-pypi-publish@v1.4.2
uses: pypa/gh-action-pypi-publish@v1.5.0
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
Expand All @@ -49,12 +49,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout branch
uses: actions/[email protected]
with:
ref: ${{ github.head_ref }}
uses: actions/checkout@v3
- name: Install Python 3.9
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Run pre-commit checks
uses: pre-commit/action@v2.0.0
uses: pre-commit/action@v3.0.0
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/psf/black
rev: 20.8b1
rev: 22.6.0
hooks:
- id: black
language_version: python3
Expand Down
2 changes: 1 addition & 1 deletion lleaves/lleaves.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def predict(self, data, n_jobs=os.cpu_count()):
f"Data must be of dimension (N, {self.num_feature()}), is {data.shape}."
)
# protect against `ctypes.c_int32` silently overflowing and causing SIGSEGV
if n_predictions >= 2 ** 31 - 1:
if n_predictions >= 2**31 - 1:
raise ValueError(
"Prediction is not supported for datasets with >=2^31-1 rows. "
"Split the dataset into smaller chunks first."
Expand Down
2 changes: 1 addition & 1 deletion tests/test_categoricals.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ def test_categorical_prediction_llvm_real(data, categorical_model_txt):

input = data.draw(
st.lists(
st.integers(min_value=0, max_value=2 ** 31 - 2),
st.integers(min_value=0, max_value=2**31 - 2),
max_size=llvm_model.num_feature(),
min_size=llvm_model.num_feature(),
)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_tree_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def test_forest_llvm_mode_cat(data, llvm_lgbm_model_cat):

input_cats = data.draw(
st.lists(
st.integers(min_value=0, max_value=2 ** 31 - 2),
st.integers(min_value=0, max_value=2**31 - 2),
min_size=sum(cat_bitvec),
max_size=sum(cat_bitvec),
)
Expand Down