From b0e84e8f18c56fac22088ffd87d0c9a8b98e5e52 Mon Sep 17 00:00:00 2001 From: Elton Cardoso do Nascimento <43186596+EltonCN@users.noreply.github.com> Date: Fri, 18 Oct 2024 19:39:51 -0300 Subject: [PATCH] Change examples to fix tests --- .github/workflows/test.yml | 3 ++ examples/Activation and Monitoring.ipynb | 4 ++- examples/Implementing a Architecture.ipynb | 42 +++++++++++----------- 3 files changed, 27 insertions(+), 22 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 772b740..e2b7537 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,10 +17,13 @@ jobs: steps: - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} + cache: 'pip' + - name: Install dependencies run: | python3 -m pip install --upgrade pip diff --git a/examples/Activation and Monitoring.ipynb b/examples/Activation and Monitoring.ipynb index a30dcee..7ac2581 100644 --- a/examples/Activation and Monitoring.ipynb +++ b/examples/Activation and Monitoring.ipynb @@ -43,10 +43,12 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": 29, "metadata": {}, "outputs": [], "source": [ + "from __future__ import annotations\n", + "\n", "import time # Sleep\n", "import math # Math operations\n", "\n", diff --git a/examples/Implementing a Architecture.ipynb b/examples/Implementing a Architecture.ipynb index c40d68e..2058243 100644 --- a/examples/Implementing a Architecture.ipynb +++ b/examples/Implementing a Architecture.ipynb @@ -101,7 +101,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 1, "metadata": {}, "outputs": [], "source": [ @@ -113,7 +113,7 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": 2, "metadata": {}, "outputs": [], "source": [ @@ -132,7 +132,7 @@ }, { "cell_type": "code", - "execution_count": 20, + "execution_count": 3, "metadata": {}, "outputs": [], "source": [ @@ -191,7 +191,7 @@ }, { "cell_type": "code", - "execution_count": 21, + "execution_count": 4, "metadata": {}, "outputs": [], "source": [ @@ -224,7 +224,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 5, "metadata": {}, "outputs": [], "source": [ @@ -240,7 +240,7 @@ }, { "cell_type": "code", - "execution_count": 22, + "execution_count": 6, "metadata": {}, "outputs": [], "source": [ @@ -284,7 +284,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 7, "metadata": {}, "outputs": [], "source": [ @@ -307,7 +307,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 8, "metadata": {}, "outputs": [], "source": [ @@ -326,7 +326,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 9, "metadata": {}, "outputs": [], "source": [ @@ -350,7 +350,7 @@ }, { "cell_type": "code", - "execution_count": 23, + "execution_count": 10, "metadata": { "tags": [ "equation1" @@ -363,7 +363,7 @@ "[nan, nan]" ] }, - "execution_count": 23, + "execution_count": 10, "metadata": {}, "output_type": "execute_result" } @@ -388,7 +388,7 @@ }, { "cell_type": "code", - "execution_count": 24, + "execution_count": 11, "metadata": { "tags": [ "equation2" @@ -401,7 +401,7 @@ "[0.0, 0.0]" ] }, - "execution_count": 24, + "execution_count": 11, "metadata": {}, "output_type": "execute_result" } @@ -409,7 +409,7 @@ "source": [ "a_mo.set_info(1)\n", "\n", - "time.sleep(0.020)\n", + "time.sleep(0.1)\n", "\n", "result_mo.get_info()" ] @@ -423,7 +423,7 @@ }, { "cell_type": "code", - "execution_count": 25, + "execution_count": 12, "metadata": { "tags": [ "equation3" @@ -436,7 +436,7 @@ "[-0.0, 2.0]" ] }, - "execution_count": 25, + "execution_count": 12, "metadata": {}, "output_type": "execute_result" } @@ -446,7 +446,7 @@ "b_mo.set_info(8)\n", "c_mo.set_info(0)\n", "\n", - "time.sleep(0.020)\n", + "time.sleep(0.1)\n", "\n", "result_mo.get_info()" ] @@ -460,7 +460,7 @@ }, { "cell_type": "code", - "execution_count": 26, + "execution_count": 13, "metadata": { "tags": [ "equation4" @@ -473,7 +473,7 @@ "[3.0, 3.0]" ] }, - "execution_count": 26, + "execution_count": 13, "metadata": {}, "output_type": "execute_result" } @@ -483,7 +483,7 @@ "b_mo.set_info(-6)\n", "c_mo.set_info(9)\n", "\n", - "time.sleep(0.020)\n", + "time.sleep(0.1)\n", "\n", "result_mo.get_info()" ] @@ -497,7 +497,7 @@ }, { "cell_type": "code", - "execution_count": 27, + "execution_count": 14, "metadata": {}, "outputs": [], "source": [