Skip to content

Commit

Permalink
Notebook tests fix
Browse files Browse the repository at this point in the history
  • Loading branch information
renan-souza committed Dec 9, 2024
1 parent c2d67ff commit 55a6123
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/run-tests-py11-simple.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
make tests
- name: Test notebooks with pytest and redis
run: pytest --nbmake "notebooks/" --nbmake-timeout=600 --ignore=notebooks/dask_from_CLI.ipynb,notebooks/analytics.ipynb
run: pytest --nbmake "notebooks/" --nbmake-timeout=600 --ignore="notebooks/dask_from_CLI.ipynb" --ignore="notebooks/analytics.ipynb"

- name: Stop services
run: make services-stop-mongo
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run-tests-simple.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
make tests
- name: Test notebooks with pytest and redis
run: pytest --nbmake "notebooks/" --nbmake-timeout=600 --ignore=notebooks/dask_from_CLI.ipynb,notebooks/analytics.ipynb
run: pytest --nbmake "notebooks/" --nbmake-timeout=600 --ignore="notebooks/dask_from_CLI.ipynb" --ignore="notebooks/analytics.ipynb"

- name: Shut down docker compose
run: make services-stop
Expand Down
2 changes: 1 addition & 1 deletion examples/simple_instrumented_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def mult_two(n):
return n * 2


with Flowcept(workflow_name="test_workflow"):
with Flowcept():
n = 3
o1 = sum_one(n)
o2 = mult_two(o1)
Expand Down
26 changes: 3 additions & 23 deletions notebooks/tensorboard.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -259,14 +259,6 @@
"epochs_params"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "7c268ab5-a9f8-4da8-ab83-37aad729000e",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"id": "48eb62a2-f9af-45a1-8291-e3c25b6a01a0",
Expand Down Expand Up @@ -329,22 +321,10 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"id": "19a4adc3-55c0-4d1e-bb83-a8b48351481e",
"metadata": {},
"outputs": [
{
"ename": "NameError",
"evalue": "name 'epochs_params' is not defined",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)",
"Cell \u001b[0;32mIn[1], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m epochs_params \u001b[38;5;241m=\u001b[39m epochs_params \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mlen\u001b[39m(\u001b[43mepochs_params\u001b[49m) \u001b[38;5;28;01melse\u001b[39;00m {\u001b[38;5;241m1\u001b[39m}\n",
"\u001b[0;31mNameError\u001b[0m: name 'epochs_params' is not defined"
]
}
],
"outputs": [],
"source": [
"epochs_params = epochs_params if len(epochs_params) else {1}"
]
Expand Down Expand Up @@ -417,7 +397,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.19"
"version": "3.10.15"
}
},
"nbformat": 4,
Expand Down
2 changes: 1 addition & 1 deletion src/flowcept/flowcept_api/task_query_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def query(
raise Exception(r.text)

else:
dao = DocumentDBDAO.build(create_index=False)
dao = DocumentDBDAO.build(create_indices=False)
docs = dao.task_query(
filter,
projection,
Expand Down

0 comments on commit 55a6123

Please sign in to comment.