Create pythonpublish.yml

pull/6/head
Taiga Noumi 2019-12-28 17:36:44 +09:00
parent c444998cc2
commit 38a1bd6b69
5 changed files with 50 additions and 6 deletions

View File

@ -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/*

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

2
MANIFEST.in 100644
View File

@ -0,0 +1,2 @@
include *.txt README.md
recursive-include docs *.txt

View File

@ -10,6 +10,7 @@ Welcome to nyaggle's documentation!
:maxdepth: 2
:caption: Contents:
installation
source/nyaggle

View File

@ -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 <https://pytorch.org/get-started/locally/#start-locally>`_
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.