Skip to content

Commit

Permalink
AUTO docusaurus 20230816
Browse files Browse the repository at this point in the history
  • Loading branch information
GitHub CI committed Aug 16, 2023
1 parent 99eaf0f commit 833e0dc
Show file tree
Hide file tree
Showing 8 changed files with 99 additions and 42 deletions.
1 change: 1 addition & 0 deletions changelog/12737.bugfix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Resolve dependency incompatibility: Pin version of `dnspython` to ==2.3.0.
78 changes: 63 additions & 15 deletions docs/docs/installation/rasa-pro/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,28 +34,44 @@ Installing Rasa Pro instead of Rasa Open Source will not break any existing scri

### Python Package Installation

The Rasa Pro python package is named `rasa-plus`. The `rasa-plus` python packages as well as the docker containers are hosted on our GCP artifact registry.
The Rasa Pro python package is named `rasa-plus`. The `rasa-plus` python packages as well as the Docker containers are hosted on our GCP Artifact Registry.
As a prerequisite, you will need:

- to [install](https://cloud.google.com/sdk/docs/install) and [initialize](https://cloud.google.com/sdk/docs/initializing) the Google Cloud CLI.
- to [install](https://cloud.google.com/sdk/docs/install) the Google Cloud CLI.
- to verify that the user or service account you are using has the required permissions to access the repository.

#### Authentication Set-Up
To authenticate you need use a service account key file provided by Rasa to authenticate with Google Cloud.

In order for the package manager of choice (e.g, `pip` or `poetry`) to have the necessary credentials to authenticate with the registry, follow the steps in the [Google documentation](https://cloud.google.com/artifact-registry/docs/python/authentication#keyring).
Authenticate with GCP using the service account key.

Where required, input the following parameters:
```sh
gcloud auth activate-service-account --key-file=service-account.json
```

Set up keyring to allow Pip to authenticate with GCP Artifact Registry by installing keyring and then the backend that supports GCP Artifact Registry

```sh
gcloud artifacts print-settings python \
--project=rasa-releases \
--repository=rasa-plus-py \
--location=europe-west3
pip install keyring
pip install keyrings.google-artifactregistry-auth

Check warning on line 56 in docs/docs/installation/rasa-pro/installation.mdx

View workflow job for this annotation

GitHub Actions / Typo CI

keyrings

"keyrings" is a typo. Did you mean "keyring"?
```

Verify that the backends have been installed correctly

```sh
keyring --list-backends
```

The results should include `ChainerBackend` and `GooglePythonAuth`.

Check warning on line 65 in docs/docs/installation/rasa-pro/installation.mdx

View workflow job for this annotation

GitHub Actions / Typo CI

ChainerBackend

"ChainerBackend" is a typo. Did you mean "ChainedBackend"?


#### Installing with `pip`

Enter the following settings to the `.pypirc` file:
Enter the following settings to the `.pypirc` file. This can be found:

Check warning on line 70 in docs/docs/installation/rasa-pro/installation.mdx

View workflow job for this annotation

GitHub Actions / Typo CI

pypirc

"pypirc" is a typo. Did you mean "piracy"?

- Linux and MacOS: `$HOME/.pypirc`

Check warning on line 72 in docs/docs/installation/rasa-pro/installation.mdx

View workflow job for this annotation

GitHub Actions / Typo CI

pypirc

"pypirc" is a typo. Did you mean "piracy"?
- Windows: `%USERPROFILE%\.pypirc`

Check warning on line 73 in docs/docs/installation/rasa-pro/installation.mdx

View workflow job for this annotation

GitHub Actions / Typo CI

pypirc

"pypirc" is a typo. Did you mean "piracy"?


```
[distutils]
Expand All @@ -67,7 +83,19 @@ repository: https://europe-west3-python.pkg.dev/rasa-releases/rasa-plus-py/
```

Next, add these specific settings to the pip configuration file as instructed in the [GCP authentication documentation](https://cloud.google.com/artifact-registry/docs/python/authentication#keyring-setup):
Next, add these specific settings to the pip configuration file. The location for this depends on whether you want to update the per-user file or the file specific to a virtual environment that you are using.

For the file associated with your operating system user:

- Linux: `$HOME/.config/pip/pip.conf` or `$HOME/.pip/pip.conf`
- MacOS: `/Library/Application Support/pip/pip.conf` or `$HOME/.config/pip/pip.conf`
- Windows: `%APPDATA%\pip\pip.ini` or `%USERPROFILE%\pip\pip.ini`

For virtual environments:

- Linux and macOS: `$VIRTUAL_ENV/pip.conf`
- Windows: `%VIRTUAL_ENV%\pip.ini`


```
[global]
Expand All @@ -79,7 +107,7 @@ Finally, you should be able to run `pip install rasa-plus`.

#### Installing with `poetry`

To install `rasa-plus` with `poetry`, you will need to associate the artifact registry URL with `rasa-plus` before installing it.
To install `rasa-plus` with `poetry`, you will need to associate the Artifact Registry URL with `rasa-plus` before installing it.
Note that you must upgrade poetry to the latest minor (`1.2.0`) in order for `poetry` to work with the GCP authentication set-up.
Proceed with the following steps:

Expand All @@ -100,20 +128,40 @@ secondary = true

### Docker Image Installation

The Rasa Pro docker image is named `rasa-plus`. The docker images are hosted on our GCP artifact registry.
The Rasa Pro Docker image is named `rasa-plus`. The Docker images are hosted on our GCP Artifact Registry.
As a prerequisite, you will need:

- to [install](https://cloud.google.com/sdk/docs/install) and [initialize](https://cloud.google.com/sdk/docs/initializing) the Google Cloud CLI.
- to [install](https://cloud.google.com/sdk/docs/install) the Google Cloud CLI.
- to verify that the user or service account you are using has the required permissions to access the repository.

To be able to pull the docker image you need use a key file provided by Rasa to authenticate with google cloud.
To authenticate you need use a service account key file provided by Rasa to authenticate with Google Cloud.

```bash
gcloud auth activate-service-account --key-file=${KEYFILE}
gcloud auth list
gcloud auth configure-docker europe-west3-docker.pkg.dev
docker pull europe-west3-docker.pkg.dev/rasa-releases/rasa-plus/rasa-plus
```

### Using An Intermediate Repository
If you are using your own intermediate repository to cache libraries or dependencies (such as Artifactory or Nexus Repository Manager), you may need to generate a set of static credentials that allow you to authenticate with GCP Artifact Registry.

As a prerequisite, you will need:

- to [install](https://cloud.google.com/sdk/docs/install) the Google Cloud CLI.
- to verify that the user or service account you are using has the required permissions to access the repository.

To generate your credentials, run:

```sh
gcloud artifacts print-settings python \
--project=rasa-releases \
--repository=rasa-plus-py \
--location=europe-west3 \
--json-key=service-account.json
```

Your credentials can be found in the output. The username will be `_json_key_base64` and the password will be a long, base64 encoded string.

### Runtime Configuration

Rasa Pro will look for your license in the env var `RASA_PRO_LICENSE`.
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/installation/rasa-pro/rasa-pro-artifacts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import RasaProBanner from "@theme/RasaProBanner";

<RasaProBanner />

- **Rasa Pro**, a drop-in replacement for Rasa Open Source enterprise
- **Rasa Pro**, a drop-in replacement for Rasa Open Source
- **Rasa Pro Services**, flexible infrastructure and APIs on top of Rasa
Open Source. Rasa Pro Services should be deployed alongside, but separately
from your production assistant.
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/markers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ This feature is currently experimental and might change or be removed in the fut

:::

:::danger
:::danger Deprecated

In the upcoming release version 3.7 of Rasa Open Source, we’re removing this experimental feature. For documentation on the markers feature in Rasa Pro, please [click here](./monitoring/analytics/realtime-markers.mdx)

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/sources/rasa_interactive___help.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ options:
--conversation-id CONVERSATION_ID
Specify the id of the conversation the messages are
in. Defaults to a UUID that will be randomly
generated. (default: 3a2c1dc2ce934dfcb63d4c34893b3880)
generated. (default: 5f6c35d5142f4fe29a1f0543f1178b63)
--endpoints ENDPOINTS
Configuration file for the model server and the
connectors as a yml file. (default: endpoints.yml)
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/sources/rasa_shell___help.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ options:
-h, --help show this help message and exit
--conversation-id CONVERSATION_ID
Set the conversation ID. (default:
ac65c7d9374a4b338967d5ba78f04b26)
081eb7c9f03e4a58abd3514aa49e7147)
-m MODEL, --model MODEL
Path to a trained Rasa model. If a directory is
specified, it will use the latest model in this
Expand Down
26 changes: 9 additions & 17 deletions scripts/evaluate_release_tag.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,34 +38,26 @@ def git_plain_tag_versions(versions: List[Version]) -> List[Version]:
"""Return non-alpha/rc existing tags"""
return [version for version in versions if is_plain_version(version)]


def filter_non_alpha_releases(tags: List[Version]) -> List[Version]:
return [tag for tag in tags if tag.is_alpha is False]
def filter_ga_relases(tags: List[Version]) -> List[Version]:
"""Return all general availability (GA) releases"""
return [tag for tag in tags if tag.is_alpha is False and tag.is_beta is False and tag.is_release_candidate is False]


def should_build_docs(tag: Version) -> bool:
"""Docs should be built only for the latest GA release tags"""
existing_tags = git_existing_tag_versions()

non_alpha_releases = filter_non_alpha_releases(existing_tags)
non_alpha_releases.sort()
latest_version = non_alpha_releases[-1]
print(f"The latest non-alpha/rc/nightly tag is {latest_version}.")

previous_major = latest_version.major - 1
previous_major_versions = [tag for tag in non_alpha_releases if tag.major == previous_major]
previous_major_latest_version = previous_major_versions[-1]
print(f"The latest tag on the previous major is {previous_major_latest_version}.")

ga_releases = filter_ga_relases(existing_tags)
ga_releases.sort()
latest_version = ga_releases[-1]
print(f"The latest General Availability release tag is {latest_version}.")
need_to_build_docs = False

if not is_plain_version(tag):
print(f"Tag {tag} is an alpha, rc, nightly, or otherwise non-standard version.")
print(f"Tag {tag} is an alpha, beta, rc, nightly, or otherwise non-standard version.")
elif tag >= latest_version:
print(f"Tag {tag} is the latest version. Docs should be built.")
need_to_build_docs = True
elif tag.major == previous_major and tag > previous_major_latest_version:
print(f"Tag {tag} is higher than the latest version for the previous major. Docs should be built.")
need_to_build_docs = True

return need_to_build_docs

Expand Down
28 changes: 22 additions & 6 deletions tests/scripts/test_evaluate_release_tag.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from scripts.evaluate_release_tag import filter_non_alpha_releases, should_build_docs
from scripts.evaluate_release_tag import filter_ga_relases, should_build_docs
import pytest
from pep440_version_utils import Version
from typing import List
Expand All @@ -17,13 +17,19 @@
[Version("1.1.0"), Version("2.2.0")],
),
(
[Version("1.1.0"), Version("2.2.0"), Version("1.1.1a1")],
[
Version("1.1.0"),
Version("2.2.0"),
Version("1.1.1a1"),
Version("1.1.1b1"),
Version("1.1.1rc1"),
],
[Version("1.1.0"), Version("2.2.0")],
),
],
)
def test_filter_non_alpha_releases(releases: List[Version], expected: List[Version]):
result = filter_non_alpha_releases(releases)
def test_filter_ga_releases(releases: List[Version], expected: List[Version]):
result = filter_ga_relases(releases)
assert result == expected


Expand All @@ -40,15 +46,25 @@ def test_filter_non_alpha_releases(releases: List[Version], expected: List[Versi
Version("2.2.1"),
True,
),
(
[
Version("1.1.0"),
Version("2.2.0"),
Version("2.3.0b1"),
Version("2.4.0a1"),
],
Version("2.2.1"),
True,
),
(
[Version("1.1.0"), Version("2.2.0"), Version("2.3.0")],
Version("1.2.0"),
True,
False,
),
(
[Version("1.1.0"), Version("1.2.0a1"), Version("2.3.0")],
Version("1.1.2"),
True,
False,
),
(
[Version("1.1.0"), Version("2.2.0"), Version("2.3.0")],
Expand Down

0 comments on commit 833e0dc

Please sign in to comment.