Skip to content

Commit

Permalink
Merge b20d4f2 into 7808925
Browse files Browse the repository at this point in the history
  • Loading branch information
tmbo committed Mar 20, 2019
2 parents 7808925 + b20d4f2 commit 9b95bf2
Show file tree
Hide file tree
Showing 296 changed files with 71,764 additions and 419 deletions.
3 changes: 3 additions & 0 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
version: "2"
exclude_patterns:
- rasa/core/utils.py # codeclimate has some encoding issues with this files because of emojis
4 changes: 3 additions & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ exclude_lines =
raise NotImplementedError
if __name__ == .__main__.:
def create_argument_parser
if typing.TYPE_CHECKING
if typing.TYPE_CHECKING
[run]
source = rasa
16 changes: 12 additions & 4 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
<!-- If you don't know your Rasa NLU version, here is some help: https://goo.gl/g9QQg2. If you are creating a feature request, feel free to remove all the system information stuff. -->
<!-- THIS INFORMATION IS MANDATORY - YOUR ISSUE WILL BE CLOSED IF IT IS MISSING. If you don't know your Rasa Core version, use `pip list | grep rasa`. Removing the below information is allowed for FEATURE REQUESTS. -->

**Rasa NLU version**:
**Rasa version**:

**Python version**:

**Operating system** (windows, osx, ...):

**Content of model configuration file**:
**Issue**:



**Content of configuration file (config.yml)**:
```yml

```

**Issue**:
**Content of domain file (domain.yml)** (if used & relevant):
```yaml

```
42 changes: 41 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
*~
*pyc
*.DS_Store
*.egg
*.eggs
*.egg-info
*.log
*.pyc
*.sass-cache
*build/
*dat
.env
venv
.pytest_cache/
.ipynb_checkpoints
.ruby-version
.tox
dist/
data/*
!data/examples
Expand Down Expand Up @@ -34,6 +49,7 @@ tmp_training_data.json
models/
projects/
test_models/model_*
test_models/test_model_pretrained_embeddings
test_projects/test_project_*

rasa_nlu/tmbo_test.py
Expand All @@ -45,4 +61,28 @@ secrets.tar
.pytest_cache
src
test_download.zip

bower_components/
build/lib/
docs/core/_build
/models/
node_modules/
npm-debug.log
examples/moodbot/py3/
.python-version
tokens.dat
graph.png
graph.html
story_graph.html
story_graph.dot
debug.md
examples/restaurantbot/models*
examples/moodbot/*.png
examples/moodbot/errors.json
examples/formbot/models*
examples/concertbot/data*
examples/concertbot/models*
examples/moodbot/models*
docs/core/key
docs/core/key.pub
failed_stories.md
errors.json
99 changes: 46 additions & 53 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@ env:
- BOTO_CONFIG=/dev/null

install:
- sudo apt-get install graphviz graphviz-dev
- python -m pip install -U pip
- pip install git+https://github.com/tmbo/MITIE.git
- pip install -r alt_requirements/requirements_dev.txt
- pip install -r requirements-dev.txt
- pip install -e .
- pip install coveralls==1.3.0
- pip install https://github.com/explosion/spacy-models/releases/download/en_core_web_md-2.0.0/en_core_web_md-2.0.0.tar.gz --no-cache-dir > jnk
- python -m spacy link en_core_web_md en
- pip install https://github.com/explosion/spacy-models/releases/download/de_core_news_sm-2.0.0/de_core_news_sm-2.0.0.tar.gz --no-cache-dir > jnk
Expand All @@ -31,12 +34,23 @@ before_script:
- export TMPDIR=$HOME/tmp
script:
- py.test --codestyle -m codestyle
- py.test tests/nlu/base --cov rasa_nlu -v --cov-append
- py.test tests/nlu/training --cov rasa_nlu -v --cov-append
- py.test tests --cov rasa -v --cov-append
- py.test tests/nlu/base --cov rasa -v --cov-append
- py.test tests/nlu/training --cov rasa -v --cov-append
after_success:
- coveralls
jobs:
include:
- stage: integration
name: "Test API specification"
language: python
install:
- npm install -g swagger-cli
script:
- swagger-cli validate docs/core/_static/spec/server.yml
- swagger-cli validate docs/core/_static/spec/action_server.yml
after_success:
- coveralls
- stage: test
if: fork = false
name: Check Dependency Licenses
Expand All @@ -47,67 +61,46 @@ jobs:
- fossa init
- fossa analyze
- fossa test
- stage: docs
if: fork = false AND branch = "master" # forked repository will skip building docs, only master & PRs to it
install:
- RASABASTER=rasabaster-0.7.18.tar.gz
- curl -sSL -o $RASABASTER "https://storage.googleapis.com/docs-theme/${RASABASTER}?q=$(date +%s%N)"
- pip install $RASABASTER
- pip install --no-cache-dir -r alt_requirements/requirements_docs.txt
- pip install git+https://${GITHUB_TOKEN}:x-oauth-basic@github.com/RasaHQ/sphinxcontrib-versioning.git@version_list
- pip install -e .
- pip list
script:
- eval "$(ssh-agent -s)"; touch docs_key; chmod 0600 docs_key
- openssl aes-256-cbc
-K $encrypted_1708c37fe733_key
-iv $encrypted_1708c37fe733_iv
-in secrets.tar.enc
-out secrets.tar
-d
- tar -xvf secrets.tar
- ssh-add docs_key
- git config --global user.email "builds@travis-ci.com"
- git config --global user.name "Travis CI"
- git remote set-url --push origin "git@github.com:$TRAVIS_REPO_SLUG"
- export ${!TRAVIS*}
- sphinx-versioning push docs/nlu docs newdocs . -- -b dirhtml -A html_theme=rasabaster
- stage: test
if: branch =~ /(\d+\.\d+\.x)/ or branch = "master" # only new version PRs & PRs to master will test starter packs
name: "NLU starter pack"
name: "NLU starter pack (NLU only)"
python: 3.6
script:
- git clone https://github.com/RasaHQ/starter-pack-rasa-nlu.git
- git clone -b latest https://github.com/RasaHQ/starter-pack-rasa-nlu.git
- cd starter-pack-rasa-nlu
- python -m pytest tests/test_nlu.py
- python -m pytest tests
- stage: test
name: "Test CLI"
script:
- timeout 2 time rasa --help
- stage: test
if: branch =~ /(\d+\.\d+\.x)/ or branch = "master" # only new version PRs & PRs to master will test starter packs
name: "Stack starter pack (NLU only)"
name: "Stack starter pack"
python: 3.6
script:
- git clone https://github.com/RasaHQ/starter-pack-rasa-stack.git
- git clone -b latest https://github.com/RasaHQ/starter-pack-rasa-stack.git
- cd starter-pack-rasa-stack
- python -m pytest tests/test_nlu.py
- stage: trigger website rebuild
if: fork = false AND branch = "master" AND type != "pull_request"
- python -m pytest tests
- stage: integration
name: "Test Docs Core"
install:
- pip install -r requirements-docs.txt
- pip install -e .
- pip list
script:
# be strict about warnings --> they will be treated as errors
- cd docs/core
- make SPHINXOPTS="-W --keep-going -A html_theme=rasabaster" html
- stage: integration
name: "Test Docs NLU"
install:
- pip install -r requirements-dev.txt
- pip install -e .
- pip list
script:
- eval "$(ssh-agent -s)";
touch nlu_docs_to_website_trigger_key;
chmod 0600 nlu_docs_to_website_trigger_key
- openssl aes-256-cbc
-K $encrypted_1708c37fe733_key
-iv $encrypted_1708c37fe733_iv
-in secrets.tar.enc
-out secrets.tar
-d
- tar xvf secrets.tar
- ssh-add nlu_docs_to_website_trigger_key
- git config --global user.email "builds@travis-ci.com"
- git config --global user.name "Travis CI"
- git clone -b master --single-branch git@github.com:RasaHQ/rasa-website.git
- cd rasa-website
- git commit --allow-empty -m "trigger nlu docs update"
- git push origin master
# be strict about warnings --> they will be treated as errors
- cd docs/nlu
- make SPHINXOPTS="-W --keep-going -A html_theme=rasabaster" html
- stage: deploy
name: "Deploy to PyPI"
python: 3.6
Expand Down
40 changes: 40 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
FROM python:3.6-slim

SHELL ["/bin/bash", "-c"]

RUN apt-get update -qq && \
apt-get install -y --no-install-recommends \
build-essential \
wget \
openssh-client \
graphviz-dev \
pkg-config \
git-core \
openssl \
libssl-dev \
libffi6 \
libffi-dev \
libpng-dev \
curl && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
mkdir /app

WORKDIR /app

# Copy as early as possible so we can cache ...
COPY requirements.txt .

RUN pip install -r requirements.txt --no-cache-dir

COPY . .

RUN pip install -e . --no-cache-dir

VOLUME ["/app/model", "/app/config", "/app/project"]

EXPOSE 5005

ENTRYPOINT ["./entrypoint.sh"]

CMD ["start", "-d", "./dialogue"]
5 changes: 4 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
include LICENSE README.rst requirements.txt
include LICENSE.txt README.md requirements.txt dev-requirements.txt
include rasa/core/schemas/* rasa/core/training/visualization.html
include rasa/core/default_config.yml
recursive-include rasa/cli/initial_project *
16 changes: 14 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: clean test lint
.PHONY: clean test lint init check-readme

TEST_PATH=./

Expand All @@ -11,6 +11,11 @@ help:
@echo " Run py.test"
@echo " check-readme"
@echo " Check if the readme can be converted from md to rst for pypi"
@echo " init"
@echo " Install Rasa Core"

init:
pip install -r requirements.txt

clean:
find . -name '*.pyc' -exec rm -f {} +
Expand All @@ -19,6 +24,7 @@ clean:
rm -rf build/
rm -rf dist/
rm -rf *.egg-info
rm -rf docs/core/_build
rm -rf docs/nlu/_build

lint:
Expand All @@ -27,7 +33,13 @@ lint:
test: clean
py.test tests --verbose --pep8 --color=yes $(TEST_PATH)

livedocs:
doctest: clean
cd docs/core && make doctest

livedocs-core:
cd docs/core && make livehtml

livedocs-nlu:
cd docs/nlu && make livehtml

check-readme:
Expand Down

0 comments on commit 9b95bf2

Please sign in to comment.