From bf390bc0a58179246802a03151a96643c3496878 Mon Sep 17 00:00:00 2001 From: TomeHirata Date: Fri, 12 Jul 2024 14:34:30 +0900 Subject: [PATCH 1/2] feat: add workflow to publish package --- .github/workflows/publish.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..fcb3c17 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,34 @@ +name: Publish Python Package + +on: + release: + types: [created] + +jobs: + publish: + runs-on: ubuntu-latest + + steps: + - name: Check out code + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.10' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install build twine + + - name: Build package + run: | + python -m build + + - name: Publish package to PyPI + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} + run: | + twine upload dist/* From 0d8f6b4db57fb242bceae298b975f8dfb13adb84 Mon Sep 17 00:00:00 2001 From: TomeHirata Date: Fri, 12 Jul 2024 14:36:18 +0900 Subject: [PATCH 2/2] docs: add description about necessary methods --- docs/source/get_started.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/get_started.rst b/docs/source/get_started.rst index 33f5b1b..cdbc061 100644 --- a/docs/source/get_started.rst +++ b/docs/source/get_started.rst @@ -79,7 +79,7 @@ A convenience function is available to visualize distribution effects. This meth :align: center To initialize the adjusted distribution function, the base model for conditional distribution function needs to be passed. -In the following example, we use Logistic Regression. +In the following example, we use Logistic Regression. Please make sure that your base model implements `fit` and `predict_proba` methods. .. code-block:: python