From 805de99eefa9d7a5aa91f304ac1f5f01a6fcfcf4 Mon Sep 17 00:00:00 2001 From: Akihiro Nitta Date: Sun, 9 Feb 2025 13:56:43 +0000 Subject: [PATCH 1/4] automate release --- .github/workflows/release.yml | 95 +++++++++++++++++++++++++++++++++++ .gitignore | 1 + pyproject.toml | 2 +- 3 files changed, 97 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..90d26ce1 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,95 @@ +name: Publish package + +on: # yamllint disable-line rule:truthy + push: + branches: + - master + release: + types: + - published + +defaults: + run: + shell: bash + +jobs: + build-package: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: 3.9 + + - name: Install build tools + run: | + pip install -U pip + pip install -U flit twine + pip list + + - name: Build package + run: | + flit build --no-use-vcs + twine check dist/* --strict + + - uses: actions/upload-artifact@v4 + with: + name: release-${{ github.sha }} + path: dist + include-hidden-files: true + + publish-package-test: + if: github.event_name == 'release' + runs-on: ubuntu-latest + needs: [build-package] + permissions: + id-token: write + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: 3.9 + + - name: Download package + uses: actions/download-artifact@v4 + with: + name: release-${{ github.sha }} + path: dist + + - name: Publish package to TestPyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + repository-url: https://test.pypi.org/legacy/ + username: __token__ + password: ${{ secrets.TEST_PYPI_API_TOKEN }} + verbose: true + print-hash: true + + publish-package: + if: github.event_name == 'release' + runs-on: ubuntu-latest + needs: [publish-package-test] + permissions: + id-token: write + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: 3.9 + + - name: Download package + uses: actions/download-artifact@v4 + with: + name: release-${{ github.sha }} + path: dist + + - name: Publish package to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + username: __token__ + password: ${{ secrets.PYPI_API_TOKEN }} + verbose: true + print-hash: true diff --git a/.gitignore b/.gitignore index 0e0c89c6..b5e64cfb 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,4 @@ venv/* data/** catboost_info/ .pt_tmp/ +test_*.py diff --git a/pyproject.toml b/pyproject.toml index fe812761..c9380fe0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,10 +4,10 @@ build-backend="flit_core.buildapi" [project] name="pytorch-frame" -version="0.2.4" authors=[ {name="PyG Team", email="team@pyg.org"}, ] +dynamic=["version"] description="Tabular Deep Learning Library for PyTorch" readme="README.md" requires-python=">=3.9" From e1c4edd6dd8d5b3f377b796b0919bc25b4a0b5db Mon Sep 17 00:00:00 2001 From: Akihiro Nitta Date: Sun, 9 Feb 2025 14:53:30 +0000 Subject: [PATCH 2/4] update --- .github/workflows/release.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 90d26ce1..4272db6d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -37,14 +37,11 @@ jobs: with: name: release-${{ github.sha }} path: dist - include-hidden-files: true publish-package-test: if: github.event_name == 'release' runs-on: ubuntu-latest needs: [build-package] - permissions: - id-token: write steps: - uses: actions/checkout@v4 From aef67dd4f09a3a4d45528618090a72b3e1e0c71f Mon Sep 17 00:00:00 2001 From: Akihiro Nitta Date: Sun, 9 Feb 2025 14:55:55 +0000 Subject: [PATCH 3/4] update --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4272db6d..077e2bab 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,4 @@ -name: Publish package +name: Publish Package on: # yamllint disable-line rule:truthy push: From f74c16e561c9b532f8452be581465098d7caa3f2 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 9 Feb 2025 14:56:40 +0000 Subject: [PATCH 4/4] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- test/gbdt/test_gbdt.py | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/test/gbdt/test_gbdt.py b/test/gbdt/test_gbdt.py index 36c8c327..830d0e51 100644 --- a/test/gbdt/test_gbdt.py +++ b/test/gbdt/test_gbdt.py @@ -13,19 +13,21 @@ from torch_frame.testing.text_embedder import HashTextEmbedder -@pytest.mark.parametrize('gbdt_cls', [ - # TODO: Run CatBoost test on Python 3.13 once supported - # https://github.com/catboost/catboost/issues/2748 - pytest.param( - CatBoost, - marks=pytest.mark.skipif( - sys.version_info >= (3, 13), - reason="Not supported on Python 3.13", +@pytest.mark.parametrize( + 'gbdt_cls', + [ + # TODO: Run CatBoost test on Python 3.13 once supported + # https://github.com/catboost/catboost/issues/2748 + pytest.param( + CatBoost, + marks=pytest.mark.skipif( + sys.version_info >= (3, 13), + reason="Not supported on Python 3.13", + ), ), - ), - XGBoost, - LightGBM, -]) + XGBoost, + LightGBM, + ]) @pytest.mark.parametrize('stypes', [ [stype.numerical], [stype.categorical],