From 595f851a5cb4aa93c6c32f13ba9beb2507cd1653 Mon Sep 17 00:00:00 2001 From: Mark Daoust Date: Tue, 19 Dec 2023 15:26:26 -0800 Subject: [PATCH 1/2] move notebook tests --- {google/generativeai => tests}/notebook/argument_parser_test.py | 0 {google/generativeai => tests}/notebook/cmd_line_parser_test.py | 0 {google/generativeai => tests}/notebook/flag_def_test.py | 0 {google/generativeai => tests}/notebook/html_utils_test.py | 0 {google/generativeai => tests}/notebook/input_utils_test.py | 0 {google/generativeai => tests}/notebook/lib/llm_function_test.py | 0 .../generativeai => tests}/notebook/lib/llmfn_output_row_test.py | 0 {google/generativeai => tests}/notebook/lib/llmfn_outputs_test.py | 0 .../notebook/lib/llmfn_post_process_cmds_test.py | 0 {google/generativeai => tests}/notebook/lib/prompt_utils_test.py | 0 {google/generativeai => tests}/notebook/lib/unique_fn_test.py | 0 {google/generativeai => tests}/notebook/magics_engine_test.py | 0 {google/generativeai => tests}/notebook/model_registry_test.py | 0 .../generativeai => tests}/notebook/post_process_utils_test.py | 0 {google/generativeai => tests}/notebook/py_utils_test.py | 0 {google/generativeai => tests}/notebook/sheets_id_test.py | 0 .../generativeai => tests}/notebook/sheets_sanitize_url_test.py | 0 {google/generativeai => tests}/notebook/text_model_test.py | 0 18 files changed, 0 insertions(+), 0 deletions(-) rename {google/generativeai => tests}/notebook/argument_parser_test.py (100%) rename {google/generativeai => tests}/notebook/cmd_line_parser_test.py (100%) rename {google/generativeai => tests}/notebook/flag_def_test.py (100%) rename {google/generativeai => tests}/notebook/html_utils_test.py (100%) rename {google/generativeai => tests}/notebook/input_utils_test.py (100%) rename {google/generativeai => tests}/notebook/lib/llm_function_test.py (100%) rename {google/generativeai => tests}/notebook/lib/llmfn_output_row_test.py (100%) rename {google/generativeai => tests}/notebook/lib/llmfn_outputs_test.py (100%) rename {google/generativeai => tests}/notebook/lib/llmfn_post_process_cmds_test.py (100%) rename {google/generativeai => tests}/notebook/lib/prompt_utils_test.py (100%) rename {google/generativeai => tests}/notebook/lib/unique_fn_test.py (100%) rename {google/generativeai => tests}/notebook/magics_engine_test.py (100%) rename {google/generativeai => tests}/notebook/model_registry_test.py (100%) rename {google/generativeai => tests}/notebook/post_process_utils_test.py (100%) rename {google/generativeai => tests}/notebook/py_utils_test.py (100%) rename {google/generativeai => tests}/notebook/sheets_id_test.py (100%) rename {google/generativeai => tests}/notebook/sheets_sanitize_url_test.py (100%) rename {google/generativeai => tests}/notebook/text_model_test.py (100%) diff --git a/google/generativeai/notebook/argument_parser_test.py b/tests/notebook/argument_parser_test.py similarity index 100% rename from google/generativeai/notebook/argument_parser_test.py rename to tests/notebook/argument_parser_test.py diff --git a/google/generativeai/notebook/cmd_line_parser_test.py b/tests/notebook/cmd_line_parser_test.py similarity index 100% rename from google/generativeai/notebook/cmd_line_parser_test.py rename to tests/notebook/cmd_line_parser_test.py diff --git a/google/generativeai/notebook/flag_def_test.py b/tests/notebook/flag_def_test.py similarity index 100% rename from google/generativeai/notebook/flag_def_test.py rename to tests/notebook/flag_def_test.py diff --git a/google/generativeai/notebook/html_utils_test.py b/tests/notebook/html_utils_test.py similarity index 100% rename from google/generativeai/notebook/html_utils_test.py rename to tests/notebook/html_utils_test.py diff --git a/google/generativeai/notebook/input_utils_test.py b/tests/notebook/input_utils_test.py similarity index 100% rename from google/generativeai/notebook/input_utils_test.py rename to tests/notebook/input_utils_test.py diff --git a/google/generativeai/notebook/lib/llm_function_test.py b/tests/notebook/lib/llm_function_test.py similarity index 100% rename from google/generativeai/notebook/lib/llm_function_test.py rename to tests/notebook/lib/llm_function_test.py diff --git a/google/generativeai/notebook/lib/llmfn_output_row_test.py b/tests/notebook/lib/llmfn_output_row_test.py similarity index 100% rename from google/generativeai/notebook/lib/llmfn_output_row_test.py rename to tests/notebook/lib/llmfn_output_row_test.py diff --git a/google/generativeai/notebook/lib/llmfn_outputs_test.py b/tests/notebook/lib/llmfn_outputs_test.py similarity index 100% rename from google/generativeai/notebook/lib/llmfn_outputs_test.py rename to tests/notebook/lib/llmfn_outputs_test.py diff --git a/google/generativeai/notebook/lib/llmfn_post_process_cmds_test.py b/tests/notebook/lib/llmfn_post_process_cmds_test.py similarity index 100% rename from google/generativeai/notebook/lib/llmfn_post_process_cmds_test.py rename to tests/notebook/lib/llmfn_post_process_cmds_test.py diff --git a/google/generativeai/notebook/lib/prompt_utils_test.py b/tests/notebook/lib/prompt_utils_test.py similarity index 100% rename from google/generativeai/notebook/lib/prompt_utils_test.py rename to tests/notebook/lib/prompt_utils_test.py diff --git a/google/generativeai/notebook/lib/unique_fn_test.py b/tests/notebook/lib/unique_fn_test.py similarity index 100% rename from google/generativeai/notebook/lib/unique_fn_test.py rename to tests/notebook/lib/unique_fn_test.py diff --git a/google/generativeai/notebook/magics_engine_test.py b/tests/notebook/magics_engine_test.py similarity index 100% rename from google/generativeai/notebook/magics_engine_test.py rename to tests/notebook/magics_engine_test.py diff --git a/google/generativeai/notebook/model_registry_test.py b/tests/notebook/model_registry_test.py similarity index 100% rename from google/generativeai/notebook/model_registry_test.py rename to tests/notebook/model_registry_test.py diff --git a/google/generativeai/notebook/post_process_utils_test.py b/tests/notebook/post_process_utils_test.py similarity index 100% rename from google/generativeai/notebook/post_process_utils_test.py rename to tests/notebook/post_process_utils_test.py diff --git a/google/generativeai/notebook/py_utils_test.py b/tests/notebook/py_utils_test.py similarity index 100% rename from google/generativeai/notebook/py_utils_test.py rename to tests/notebook/py_utils_test.py diff --git a/google/generativeai/notebook/sheets_id_test.py b/tests/notebook/sheets_id_test.py similarity index 100% rename from google/generativeai/notebook/sheets_id_test.py rename to tests/notebook/sheets_id_test.py diff --git a/google/generativeai/notebook/sheets_sanitize_url_test.py b/tests/notebook/sheets_sanitize_url_test.py similarity index 100% rename from google/generativeai/notebook/sheets_sanitize_url_test.py rename to tests/notebook/sheets_sanitize_url_test.py diff --git a/google/generativeai/notebook/text_model_test.py b/tests/notebook/text_model_test.py similarity index 100% rename from google/generativeai/notebook/text_model_test.py rename to tests/notebook/text_model_test.py From 7203201ad4a8361e35609f5ef1da4bf6a52dfa51 Mon Sep 17 00:00:00 2001 From: Mark Daoust Date: Tue, 19 Dec 2023 15:41:43 -0800 Subject: [PATCH 2/2] move tests so presubmits test the notebook integration --- CONTRIBUTING.md | 2 +- tests/notebook/__init__.py | 0 tests/notebook/lib/__init__.py | 0 .../notebook/lib/{llm_function_test.py => test_llm_function.py} | 0 .../lib/{llmfn_output_row_test.py => test_llmfn_output_row.py} | 0 .../lib/{llmfn_outputs_test.py => test_llmfn_outputs.py} | 0 ...ost_process_cmds_test.py => test_llmfn_post_process_cmds.py} | 0 .../notebook/lib/{prompt_utils_test.py => test_prompt_utils.py} | 0 .../{argument_parser_test.py => test_argument_parser.py} | 0 .../{cmd_line_parser_test.py => test_cmd_line_parser.py} | 0 tests/notebook/{flag_def_test.py => test_flag_def.py} | 0 tests/notebook/{html_utils_test.py => test_html_utils.py} | 0 tests/notebook/{magics_engine_test.py => test_magics_engine.py} | 0 .../notebook/{model_registry_test.py => test_model_registry.py} | 0 .../{post_process_utils_test.py => test_post_process_utils.py} | 0 tests/notebook/{py_utils_test.py => test_py_utils.py} | 0 tests/notebook/{sheets_id_test.py => test_sheets_id.py} | 0 ...{sheets_sanitize_url_test.py => test_sheets_sanitize_url.py} | 0 tests/notebook/{input_utils_test.py => tet_input_utils.py} | 0 19 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 tests/notebook/__init__.py create mode 100644 tests/notebook/lib/__init__.py rename tests/notebook/lib/{llm_function_test.py => test_llm_function.py} (100%) rename tests/notebook/lib/{llmfn_output_row_test.py => test_llmfn_output_row.py} (100%) rename tests/notebook/lib/{llmfn_outputs_test.py => test_llmfn_outputs.py} (100%) rename tests/notebook/lib/{llmfn_post_process_cmds_test.py => test_llmfn_post_process_cmds.py} (100%) rename tests/notebook/lib/{prompt_utils_test.py => test_prompt_utils.py} (100%) rename tests/notebook/{argument_parser_test.py => test_argument_parser.py} (100%) rename tests/notebook/{cmd_line_parser_test.py => test_cmd_line_parser.py} (100%) rename tests/notebook/{flag_def_test.py => test_flag_def.py} (100%) rename tests/notebook/{html_utils_test.py => test_html_utils.py} (100%) rename tests/notebook/{magics_engine_test.py => test_magics_engine.py} (100%) rename tests/notebook/{model_registry_test.py => test_model_registry.py} (100%) rename tests/notebook/{post_process_utils_test.py => test_post_process_utils.py} (100%) rename tests/notebook/{py_utils_test.py => test_py_utils.py} (100%) rename tests/notebook/{sheets_id_test.py => test_sheets_id.py} (100%) rename tests/notebook/{sheets_sanitize_url_test.py => test_sheets_sanitize_url.py} (100%) rename tests/notebook/{input_utils_test.py => tet_input_utils.py} (100%) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 32ecebfe2..93b9e24db 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -65,7 +65,7 @@ This "editable" mode lets you edit the source without needing to reinstall the p Use the builtin unittest package: ``` - python -m unittest discover --pattern '*test*.py' + python -m unittest ``` Or to debug, use: diff --git a/tests/notebook/__init__.py b/tests/notebook/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/tests/notebook/lib/__init__.py b/tests/notebook/lib/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/tests/notebook/lib/llm_function_test.py b/tests/notebook/lib/test_llm_function.py similarity index 100% rename from tests/notebook/lib/llm_function_test.py rename to tests/notebook/lib/test_llm_function.py diff --git a/tests/notebook/lib/llmfn_output_row_test.py b/tests/notebook/lib/test_llmfn_output_row.py similarity index 100% rename from tests/notebook/lib/llmfn_output_row_test.py rename to tests/notebook/lib/test_llmfn_output_row.py diff --git a/tests/notebook/lib/llmfn_outputs_test.py b/tests/notebook/lib/test_llmfn_outputs.py similarity index 100% rename from tests/notebook/lib/llmfn_outputs_test.py rename to tests/notebook/lib/test_llmfn_outputs.py diff --git a/tests/notebook/lib/llmfn_post_process_cmds_test.py b/tests/notebook/lib/test_llmfn_post_process_cmds.py similarity index 100% rename from tests/notebook/lib/llmfn_post_process_cmds_test.py rename to tests/notebook/lib/test_llmfn_post_process_cmds.py diff --git a/tests/notebook/lib/prompt_utils_test.py b/tests/notebook/lib/test_prompt_utils.py similarity index 100% rename from tests/notebook/lib/prompt_utils_test.py rename to tests/notebook/lib/test_prompt_utils.py diff --git a/tests/notebook/argument_parser_test.py b/tests/notebook/test_argument_parser.py similarity index 100% rename from tests/notebook/argument_parser_test.py rename to tests/notebook/test_argument_parser.py diff --git a/tests/notebook/cmd_line_parser_test.py b/tests/notebook/test_cmd_line_parser.py similarity index 100% rename from tests/notebook/cmd_line_parser_test.py rename to tests/notebook/test_cmd_line_parser.py diff --git a/tests/notebook/flag_def_test.py b/tests/notebook/test_flag_def.py similarity index 100% rename from tests/notebook/flag_def_test.py rename to tests/notebook/test_flag_def.py diff --git a/tests/notebook/html_utils_test.py b/tests/notebook/test_html_utils.py similarity index 100% rename from tests/notebook/html_utils_test.py rename to tests/notebook/test_html_utils.py diff --git a/tests/notebook/magics_engine_test.py b/tests/notebook/test_magics_engine.py similarity index 100% rename from tests/notebook/magics_engine_test.py rename to tests/notebook/test_magics_engine.py diff --git a/tests/notebook/model_registry_test.py b/tests/notebook/test_model_registry.py similarity index 100% rename from tests/notebook/model_registry_test.py rename to tests/notebook/test_model_registry.py diff --git a/tests/notebook/post_process_utils_test.py b/tests/notebook/test_post_process_utils.py similarity index 100% rename from tests/notebook/post_process_utils_test.py rename to tests/notebook/test_post_process_utils.py diff --git a/tests/notebook/py_utils_test.py b/tests/notebook/test_py_utils.py similarity index 100% rename from tests/notebook/py_utils_test.py rename to tests/notebook/test_py_utils.py diff --git a/tests/notebook/sheets_id_test.py b/tests/notebook/test_sheets_id.py similarity index 100% rename from tests/notebook/sheets_id_test.py rename to tests/notebook/test_sheets_id.py diff --git a/tests/notebook/sheets_sanitize_url_test.py b/tests/notebook/test_sheets_sanitize_url.py similarity index 100% rename from tests/notebook/sheets_sanitize_url_test.py rename to tests/notebook/test_sheets_sanitize_url.py diff --git a/tests/notebook/input_utils_test.py b/tests/notebook/tet_input_utils.py similarity index 100% rename from tests/notebook/input_utils_test.py rename to tests/notebook/tet_input_utils.py