Skip to content

Commit 2506ab4

Browse files
authored
Merge pull request #12 from CyberAgentAILab/feat/pypi
Add workflow to publish package
2 parents 3f3dcbc + 0d8f6b4 commit 2506ab4

File tree

2 files changed

+35
-1
lines changed

2 files changed

+35
-1
lines changed

.github/workflows/publish.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Publish Python Package
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Check out code
13+
uses: actions/checkout@v4
14+
15+
- name: Set up Python
16+
uses: actions/setup-python@v4
17+
with:
18+
python-version: '3.10'
19+
20+
- name: Install dependencies
21+
run: |
22+
python -m pip install --upgrade pip
23+
pip install build twine
24+
25+
- name: Build package
26+
run: |
27+
python -m build
28+
29+
- name: Publish package to PyPI
30+
env:
31+
TWINE_USERNAME: __token__
32+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
33+
run: |
34+
twine upload dist/*

docs/source/get_started.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ A convenience function is available to visualize distribution effects. This meth
7979
:align: center
8080

8181
To initialize the adjusted distribution function, the base model for conditional distribution function needs to be passed.
82-
In the following example, we use Logistic Regression.
82+
In the following example, we use Logistic Regression. Please make sure that your base model implements `fit` and `predict_proba` methods.
8383

8484
.. code-block:: python
8585

0 commit comments

Comments
 (0)