Skip to content

Commit 9c50f01

Browse files
committed
Merge branch 'master' into add-flake8
2 parents 1733b83 + edece26 commit 9c50f01

File tree

7 files changed

+26
-30
lines changed

7 files changed

+26
-30
lines changed

.travis.yml

Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -119,27 +119,13 @@ jobs:
119119
- git remote set-url --push origin "[email protected]:$TRAVIS_REPO_SLUG"
120120
- export ${!TRAVIS*}
121121
- sphinx-versioning push docs docs . -- -b dirhtml -A html_theme=rasabaster
122-
- stage: trigger website rebuild
123-
if: fork = false AND branch = "master" AND type != "pull_request"
122+
- stage: docs-netlify
123+
if: branch = master AND type != pull_request OR tag IS present
124+
install: skip
124125
script:
125-
- eval "$(ssh-agent -s)";
126-
touch nlu_docs_to_website_trigger_key;
127-
chmod 0600 nlu_docs_to_website_trigger_key
128-
- openssl aes-256-cbc
129-
-K $encrypted_1708c37fe733_key
130-
-iv $encrypted_1708c37fe733_iv
131-
-in secrets.tar.enc
132-
-out secrets.tar
133-
-d
134-
- tar xvf secrets.tar
135-
- ssh-add nlu_docs_to_website_trigger_key
136-
- git config --global user.email "[email protected]"
137-
- git config --global user.name "Travis CI"
138-
- git clone -b master --single-branch [email protected]:RasaHQ/rasa-website.git
139-
- cd rasa-website
140-
- git commit --allow-empty -m "trigger rasa docs update"
141-
- git push origin master
126+
- curl -X POST -d "docs" https://api.netlify.com/build_hooks/${NETLIFY_HOOK_ID}
142127
- stage: deploy
128+
if: branch = "master" AND tag IS present
143129
name: "Deploy to PyPI"
144130
python: 3.6
145131
install: skip
@@ -149,8 +135,5 @@ jobs:
149135
user: amn41
150136
# server: https://test.pypi.org/legacy/
151137
distributions: "sdist bdist_wheel"
152-
on:
153-
branch: master
154-
tags: true
155138
password:
156139
secure: "MeL1Ve97eBY+VbNWuQNuLzkPs0TPc+Zh8OfZkhw69ez5imsiWpvp0LrUOLVW3CcC0vNTANEBOVX/n1kHxfcqkf/cChNqAkZ6zTMmvR9zHDwQxXVGZ3jEQSQM+fHdQpjwtH7BwojyxaCIC/5iza7DFMcca/Q6Xr+atdTd0V8Q7Nc5jFHEQf3/4oIIm6YeCUiHcEu981LRdS04+jvuFUN0Ejy+KLukGVyIWyYDjjGjs880Mj4J1mgmCihvVkJ1ujB65rYBdTjls3JpP3eTk63+xH8aHilIuvqB8TDYih8ovE/Vv6YwLI+u2HoEHAtBD4Ez3r71Ju6JKJM7DhWb5aurN4M7K6DC8AvpUl+PsJbNP4ZeW2jXMH6lT6qXKVaSw7lhZ0XY3wunyVcAbArX4RS0B9pb1nHBYUBWZjxXtr8lhkpGFu7H43hw63Y19qb8z4+1cGnijgz1mqXSAssuc+3r0W0cSr+OsCjmOs7cwT6HMQvPEKxLohwBOS/I3EbuKQOYMjFN5BWP5JXbsG45awV9tquxEW8zxjMetR+AOcYoyrDeiR8sAnj1/F99DE0bL1KyW/G5VNu2Xi/c+0M3KvP3+F8XTCuUY/5zTvqh1Qz1jcdiwsiAhO4eBQzQnjeFlxdiVeue2kmD5qsh+VLKKuKLfyVoaV7b1kBlAtBDu7+hDpA="

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,16 @@ To check the types execute
166166
pytype rasa
167167
```
168168
169+
### Deploying documentation updates
170+
171+
We use `sphinx-versioning` to build docs for tagged versions and for the master branch.
172+
The static site that gets built is pushed to the `docs` branch of this repo, which doesn't contain
173+
any code, only the site.
174+
175+
We host the site on netlify. When there is a reason to update the docs (e.g. master has changed or we have
176+
tagged a new version) we trigger a webhook on netlify (see `.travis.yml`).
177+
178+
169179
## License
170180
Licensed under the Apache License, Version 2.0.
171181
Copyright 2019 Rasa Technologies GmbH. [Copy of the license](LICENSE.txt).

setup.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ codestyle_exclude =
1414
filterwarnings =
1515
ignore::ResourceWarning:ruamel[.*]
1616

17-
log_cli = 1
18-
log_cli_level = DEBUG
17+
log_cli = true
18+
log_cli_level = WARNING
1919

2020
[metadata]
2121
description-file = README.md

tests/conftest.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import pytest
2+
import logging
23

34
from rasa import server
45
from rasa.core import config
@@ -24,6 +25,14 @@
2425
pytest_plugins = ["pytester"]
2526

2627

28+
@pytest.fixture(autouse=True)
29+
def set_log_level_debug(caplog):
30+
# Set the post-test log level to DEBUG for failing tests. For all tests
31+
# (failing and successful), the live log level can be additionally set in
32+
# `setup.cfg`. It should be set to WARNING.
33+
caplog.set_level(logging.DEBUG)
34+
35+
2736
@pytest.fixture
2837
async def default_agent(tmpdir_factory) -> Agent:
2938
model_path = tmpdir_factory.mktemp("model").strpath

tests/core/conftest.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@
2929

3030
matplotlib.use("Agg")
3131

32-
logging.basicConfig(level="DEBUG")
33-
3432
DEFAULT_DOMAIN_PATH = "data/test_domains/default_with_slots.yml"
3533

3634
DEFAULT_STORIES_FILE = "data/test_stories/stories_defaultdomain.md"

tests/nlu/base/test_evaluation.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@
3939
from tests.nlu import utilities
4040
from tests.nlu.conftest import DEFAULT_DATA_PATH, NLU_DEFAULT_CONFIG_PATH
4141

42-
logging.basicConfig(level="DEBUG")
43-
4442

4543
@pytest.fixture(scope="session")
4644
def pretrained_interpreter(component_builder, tmpdir_factory):

tests/nlu/conftest.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
from rasa.nlu import config, train
77
from rasa.nlu.components import ComponentBuilder
88

9-
logging.basicConfig(level="DEBUG")
10-
119
CONFIG_DEFAULTS_PATH = "sample_configs/config_defaults.yml"
1210

1311
NLU_DEFAULT_CONFIG_PATH = "sample_configs/config_pretrained_embeddings_mitie.yml"

0 commit comments

Comments
 (0)