Skip to content

Commit

Permalink
feat: refactor for assistant improve toolkit (#87)
Browse files Browse the repository at this point in the history
* feat: refactor for assistant improve toolkit

* Update requirements.txt

* Update requirements.txt

* Add tox.ini

* Create requirements_dev.txt

* Update tox.ini

* Create test_computation_func.py

* Update test_computation_func.py

* Update test_computation_func.py

* Update requirements.txt

* Update .travis.yml

* Create .releaserc

* Create package.json

* Update .releaserc

* Add files back to support old version of notebooks
  • Loading branch information
zzhang13 authored Aug 17, 2020
1 parent 8060cc3 commit f5d6e7e
Show file tree
Hide file tree
Showing 21 changed files with 4,241 additions and 23 deletions.
22 changes: 22 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"debug": true,
"dryRun": true,
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
[
"@semantic-release/exec",
{
"prepareCmd": "bumpversion --allow-dirty --current-version ${lastRelease.version} --new-version ${nextRelease.version} patch"
}
],
[
"@semantic-release/git",
{
"message": "chore(release): ${nextRelease.version} release notes\n\n${nextRelease.notes}"
}
],
"@semantic-release/github"
]
}
40 changes: 40 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
language: python
python:
- 3.6
- 3.7
- 3.8
cache: pip
before_install:
#- python -c "import fcntl; fcntl.fcntl(1, fcntl.F_SETFL, 0)"
- npm install npm@latest -g
install:
- pip3 install tox-travis
before_script:
- pip3 install -r requirements.txt
script:
- pip3 install -U python-dotenv
- tox
before_deploy:
- pip3 install bumpversion pypandoc
- sudo apt-get update
- sudo apt-get install pandoc
- nvm install 12
- npm install @semantic-release/changelog
- npm install @semantic-release/exec
- npm install @semantic-release/git
- npm install @semantic-release/github
deploy:
- provider: script
script: npx semantic-release
skip_cleanup: true
on:
python: 3.8
branch: lib
- provider: pypi
user: "$PYPI_USER"
password: "$PYPI_PASSWORD"
server: https://test.pypi.org/legacy/
skip_cleanup: true
on:
python: 3.8
tags: true
2 changes: 1 addition & 1 deletion notebook/Effectiveness Notebook.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -3998,7 +3998,7 @@
"#### Recommendations:\n",
"\n",
"- Entity\n",
" * Use <a href=\"https://cloud.ibm.com/docs/assistant?topic=assistant-entities#entities-create-dictionary-based\" target=\"_blank\">Synonym Recommender</a> to improve the top missed entitied indentified in [Entity Analysis](#entity_analysis).\n",
" * Use <a href=\"https://cloud.ibm.com/docs/assistant?topic=assistant-entities#entities-create-dictionary-based\" target=\"_blank\">Synonym Recommender</a> to improve the top missed entities indentified in [Entity Analysis](#entity_analysis).\n",
" * Check and add the newly marked entities from <em>entity</em> sheet in [recommendation.xlsx](#improvement_recommendation) into your skill or workspace and use <a href=\"https://cloud.ibm.com/docs/assistant?topic=assistant-entities#entities-create-dictionary-based\" target=\"_blank\">Synonym Recommender</a> to enrich the list of various entity values.\n",
" * Check and import newly identified entity values, from <em>entity_value</em> sheet in [recommendation.xlsx](#improvement_recommendation), into your skill or workspace.\n",
" * Check and import the missed entity value synonyms, from <em>synonym</em> sheet in [recommendation.xlsx](#improvement_recommendation), into your skill or workspace.\n",
Expand Down
15 changes: 15 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "assistant_improve_toolkit",
"version": "1.0.0",
"description": "To help improving your Watson Assistant after you have deployed it to production, we prepared the following two Jupyter notebooks. These notebooks include practical steps for measuring, analyzing, and actively improving your virtual assistant in a continuous manner. Check out IBM Watson Assistant Continuous Improvement Best Practices for more details.",
"repository": {
"type": "git",
"url": "git+https://github.com/watson-developer-cloud/assistant-improve-recommendations-notebook.git"
},
"author": "IBM",
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/watson-developer-cloud/assistant-improve-recommendations-notebook/issues"
},
"homepage": "https://github.com/watson-developer-cloud/assistant-improve-recommendations-notebook#readme"
}
15 changes: 8 additions & 7 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
jupyter
ibm-watson==4.1.0
pandas==1.0.3
ipython
pandas==1.1.0
bokeh==2.0.0
tqdm==4.43.0
matplotlib==3.2.1
numpy==1.18.2
XlsxWriter==1.2.8
bokeh==2.0.0
xlrd==1.2.0
ibm-watson>=4.3.0
numpy==1.18.2
requests>=2.18.4
scikit-learn==0.22.2.post1
tqdm==4.43.0
xlrd==1.2.0
17 changes: 17 additions & 0 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
-r requirements.txt

# test dependencies
pytest>=2.8.2
responses>=0.10.6
python_dotenv>=0.1.5;python_version!='3.2'
pylint>=1.4.4
tox>=2.9.1
pytest-rerunfailures>=3.1

# code coverage
coverage<5
codecov>=1.6.3
pytest-cov>=2.2.1

# documentation
bumpversion>=0.5.3
69 changes: 69 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# -*- coding: utf8 -*-
#
# This file were created by Python Boilerplate. Use Python Boilerplate to start
# simple, usable and best-practices compliant Python projects.
#
# Learn more about it at: http://github.com/fabiommendes/python-boilerplate/
#

import setuptools

__version__ = '1.0.0'

# Convert README.md to README.rst for pypi
try:
from pypandoc import convert_file

def read_md(f):
return convert_file(f, 'rst')

except:
print('warning: pypandoc module not found, '
'could not convert Markdown to RST')

def read_md(f):
return open(f, 'rb').read().decode(encoding='utf-8')

setuptools.setup(
# Basic info
name='assistant_improve_toolkit',
version=__version__,
author='IBM Watson',
author_email='watdevex@us.ibm.com',
maintainer='Zhe Zhang',
maintainer_email='zhangzhe@us.ibm.com',
url='https://github.com/watson-developer-cloud/assistant-improve-recommendations-notebook',
description='Assistant Improve Toolkit',
license='Apache 2.0',
long_description=read_md('README.md'),
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Programming Language :: Python',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Operating System :: OS Independent',
'Topic :: Software Development :: Libraries :: Python Modules'
],
# Packages and depencies
package_dir={'': 'src'},
packages=setuptools.find_packages('src'),
install_requires=[
'pandas==1.0.1',
'bokeh==2.0.0',
'tqdm==4.43.0',
'scikit-learn>=0.21.3',
'matplotlib==3.2.1',
'XlsxWriter==1.2.8',
'ibm-watson>=4.3.0',
'numpy==1.18.2',
'requests>=2.18.4',
'scikit-learn==0.22.2.post1',
'xlrd==1.2.0'
],

zip_safe=False,
platforms='any',
)
File renamed without changes.
Loading

0 comments on commit f5d6e7e

Please sign in to comment.