diff --git a/.github/workflows/pythonpublish.yml b/.github/workflows/pythonpublish.yml new file mode 100644 index 0000000..d77b169 --- /dev/null +++ b/.github/workflows/pythonpublish.yml @@ -0,0 +1,29 @@ +name: Upload Python Package + +on: + release: + types: [created] + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + with: + python-version: '3.5' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + pip install torch + pip install setuptools==42.0.2 + pip install wheel twine + - name: Build and publish + env: + TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} + TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + run: | + python setup.py sdist bdist_wheel + twine upload dist/* diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 94a25f7..0000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..d9ca1a8 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,2 @@ +include *.txt README.md +recursive-include docs *.txt diff --git a/docs/index.rst b/docs/index.rst index ce7e109..cfbaa38 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -10,6 +10,7 @@ Welcome to nyaggle's documentation! :maxdepth: 2 :caption: Contents: + installation source/nyaggle diff --git a/docs/installation.rst b/docs/installation.rst new file mode 100644 index 0000000..1ab9bec --- /dev/null +++ b/docs/installation.rst @@ -0,0 +1,18 @@ +Installation +=================================== + +You can install nyaggle via pip: + + +.. code-block:: bash + + pip install nyaggle + + + +To use :code:`nyaggle.nlp.BertSentenceVectorizer`, you first need to install PyTorch. +Please refer to `PyTorch installation page `_ +to install Pytorch to your environment. + +If you use :code:`lang=ja` option in :code:`BertSentenceVecorizer`, +you need to intall MeCab and mecab-python3 package to your environment.