Skip to content

Commit

Permalink
Deploying to gh-pages from @ 58a0993 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
RLKRo committed Sep 26, 2023
0 parents commit c687004
Show file tree
Hide file tree
Showing 563 changed files with 173,388 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .buildinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: a8edfd581aa4acc7f76be46af4418956
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file added .doctrees/about_us.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added .doctrees/apiref/dff.context_storages.sql.doctree
Binary file not shown.
Binary file added .doctrees/apiref/dff.context_storages.ydb.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added .doctrees/apiref/dff.pipeline.conditions.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added .doctrees/apiref/dff.pipeline.types.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added .doctrees/apiref/dff.script.core.message.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added .doctrees/apiref/dff.script.core.types.doctree
Binary file not shown.
Binary file not shown.
Binary file added .doctrees/apiref/dff.script.extras.slots.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added .doctrees/apiref/dff.stats.cli.doctree
Binary file not shown.
Binary file not shown.
Binary file added .doctrees/apiref/dff.stats.instrumentor.doctree
Binary file not shown.
Binary file added .doctrees/apiref/dff.stats.utils.doctree
Binary file not shown.
Binary file not shown.
Binary file added .doctrees/apiref/dff.utils.testing.common.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added .doctrees/apiref/index_context_storages.doctree
Binary file not shown.
Binary file not shown.
Binary file added .doctrees/apiref/index_pipeline.doctree
Binary file not shown.
Binary file added .doctrees/apiref/index_script.doctree
Binary file not shown.
Binary file added .doctrees/apiref/index_stats.doctree
Binary file not shown.
Binary file added .doctrees/apiref/index_utils.doctree
Binary file not shown.
Binary file added .doctrees/community.doctree
Binary file not shown.
Binary file added .doctrees/development.doctree
Binary file not shown.
Binary file added .doctrees/environment.pickle
Binary file not shown.
Binary file added .doctrees/examples.doctree
Binary file not shown.
Binary file added .doctrees/get_started.doctree
Binary file not shown.
Binary file added .doctrees/index.doctree
Binary file not shown.
127 changes: 127 additions & 0 deletions .doctrees/nbsphinx/tutorials/tutorials.context_storages.1_basics.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "5598a180",
"metadata": {
"cell_marker": "\"\"\""
},
"source": [
"# 1. Basics\n",
"\n",
"The following tutorial shows the basic use of the database connection."
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "95fb6686",
"metadata": {
"execution": {
"iopub.execute_input": "2023-09-26T11:47:20.181316Z",
"iopub.status.busy": "2023-09-26T11:47:20.180695Z",
"iopub.status.idle": "2023-09-26T11:47:22.887898Z",
"shell.execute_reply": "2023-09-26T11:47:22.887048Z"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Note: you may need to restart the kernel to use updated packages.\n"
]
}
],
"source": [
"# installing dependencies\n",
"%pip install -q dff[json,pickle]"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "819910d9",
"metadata": {
"execution": {
"iopub.execute_input": "2023-09-26T11:47:22.892753Z",
"iopub.status.busy": "2023-09-26T11:47:22.892233Z",
"iopub.status.idle": "2023-09-26T11:47:23.762492Z",
"shell.execute_reply": "2023-09-26T11:47:23.761784Z"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"(user) >>> text='Hi'\n",
" (bot) <<< text='Hi, how are you?'\n",
"(user) >>> text='i'm fine, how are you?'\n",
" (bot) <<< text='Good. What do you want to talk about?'\n",
"(user) >>> text='Let's talk about music.'\n",
" (bot) <<< text='Sorry, I can not talk about music now.'\n",
"(user) >>> text='Ok, goodbye.'\n",
" (bot) <<< text='bye'\n",
"(user) >>> text='Hi'\n",
" (bot) <<< text='Hi, how are you?'\n"
]
}
],
"source": [
"import pathlib\n",
"\n",
"from dff.context_storages import context_storage_factory\n",
"\n",
"from dff.pipeline import Pipeline\n",
"from dff.utils.testing.common import (\n",
" check_happy_path,\n",
" is_interactive_mode,\n",
" run_interactive_mode,\n",
")\n",
"from dff.utils.testing.toy_script import TOY_SCRIPT_ARGS, HAPPY_PATH\n",
"\n",
"pathlib.Path(\"dbs\").mkdir(exist_ok=True)\n",
"db = context_storage_factory(\"json://dbs/file.json\")\n",
"# db = context_storage_factory(\"pickle://dbs/file.pkl\")\n",
"# db = context_storage_factory(\"shelve://dbs/file\")\n",
"\n",
"pipeline = Pipeline.from_script(*TOY_SCRIPT_ARGS, context_storage=db)\n",
"\n",
"if __name__ == \"__main__\":\n",
" check_happy_path(pipeline, HAPPY_PATH)\n",
" # This is a function for automatic tutorial running (testing) with HAPPY_PATH\n",
"\n",
" # This runs tutorial in interactive mode if not in IPython env\n",
" # and if `DISABLE_INTERACTIVE_MODE` is not set\n",
" if is_interactive_mode():\n",
" run_interactive_mode(pipeline) # This runs tutorial in interactive mode"
]
}
],
"metadata": {
"jupytext": {
"cell_metadata_filter": "-all",
"main_language": "python",
"notebook_metadata_filter": "-all",
"text_representation": {
"extension": ".py",
"format_name": "percent"
}
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.18"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "37ce6896",
"metadata": {
"cell_marker": "\"\"\""
},
"source": [
"# 2. PostgreSQL\n",
"\n",
"This is a tutorial on using PostgreSQL."
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "2aa70456",
"metadata": {
"execution": {
"iopub.execute_input": "2023-09-26T11:47:25.783524Z",
"iopub.status.busy": "2023-09-26T11:47:25.783062Z",
"iopub.status.idle": "2023-09-26T11:47:28.507519Z",
"shell.execute_reply": "2023-09-26T11:47:28.506611Z"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Note: you may need to restart the kernel to use updated packages.\n"
]
}
],
"source": [
"# installing dependencies\n",
"%pip install -q dff[postgresql]"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "b6101790",
"metadata": {
"execution": {
"iopub.execute_input": "2023-09-26T11:47:28.511795Z",
"iopub.status.busy": "2023-09-26T11:47:28.511016Z",
"iopub.status.idle": "2023-09-26T11:47:29.350142Z",
"shell.execute_reply": "2023-09-26T11:47:29.349339Z"
},
"lines_to_next_cell": 2
},
"outputs": [],
"source": [
"import os\n",
"\n",
"from dff.context_storages import context_storage_factory\n",
"\n",
"from dff.pipeline import Pipeline\n",
"from dff.utils.testing.common import (\n",
" check_happy_path,\n",
" is_interactive_mode,\n",
" run_interactive_mode,\n",
")\n",
"from dff.utils.testing.toy_script import TOY_SCRIPT_ARGS, HAPPY_PATH"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "182903b1",
"metadata": {
"execution": {
"iopub.execute_input": "2023-09-26T11:47:29.354293Z",
"iopub.status.busy": "2023-09-26T11:47:29.353802Z",
"iopub.status.idle": "2023-09-26T11:47:29.475475Z",
"shell.execute_reply": "2023-09-26T11:47:29.474554Z"
},
"lines_to_next_cell": 2
},
"outputs": [],
"source": [
"db_uri = \"postgresql+asyncpg://{}:{}@localhost:5432/{}\".format(\n",
" os.environ[\"POSTGRES_USERNAME\"],\n",
" os.environ[\"POSTGRES_PASSWORD\"],\n",
" os.environ[\"POSTGRES_DB\"],\n",
")\n",
"db = context_storage_factory(db_uri)\n",
"\n",
"\n",
"pipeline = Pipeline.from_script(*TOY_SCRIPT_ARGS, context_storage=db)"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "24543a07",
"metadata": {
"execution": {
"iopub.execute_input": "2023-09-26T11:47:29.479312Z",
"iopub.status.busy": "2023-09-26T11:47:29.479026Z",
"iopub.status.idle": "2023-09-26T11:47:29.509596Z",
"shell.execute_reply": "2023-09-26T11:47:29.508912Z"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"(user) >>> text='Hi'\n",
" (bot) <<< text='Hi, how are you?'\n",
"(user) >>> text='i'm fine, how are you?'\n",
" (bot) <<< text='Good. What do you want to talk about?'\n",
"(user) >>> text='Let's talk about music.'\n",
" (bot) <<< text='Sorry, I can not talk about music now.'\n",
"(user) >>> text='Ok, goodbye.'\n",
" (bot) <<< text='bye'\n",
"(user) >>> text='Hi'\n",
" (bot) <<< text='Hi, how are you?'\n"
]
}
],
"source": [
"if __name__ == \"__main__\":\n",
" check_happy_path(pipeline, HAPPY_PATH)\n",
" if is_interactive_mode():\n",
" run_interactive_mode(pipeline)"
]
}
],
"metadata": {
"jupytext": {
"cell_metadata_filter": "-all",
"main_language": "python",
"notebook_metadata_filter": "-all",
"text_representation": {
"extension": ".py",
"format_name": "percent"
}
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.18"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
Loading

0 comments on commit c687004

Please sign in to comment.