diff --git a/file_list.txt b/file_list.txt new file mode 100644 index 00000000..3fe9ba56 --- /dev/null +++ b/file_list.txt @@ -0,0 +1,12 @@ +- pdf_to_text: "swarms/utils/pdf_to_text.md" +- load_model_torch: "swarms/utils/load_model_torch.md" +- metrics_decorator: "swarms/utils/metrics_decorator.md" +- prep_torch_inference: "swarms/utils/prep_torch_inference.md" +- find_image_path: "swarms/utils/find_image_path.md" +- print_class_parameters: "swarms/utils/print_class_parameters.md" +- extract_code_from_markdown: "swarms/utils/extract_code_from_markdown.md" +- check_device: "swarms/utils/check_device.md" +- display_markdown_message: "swarms/utils/display_markdown_message.md" +- phoenix_tracer: "swarms/utils/phoenix_tracer.md" +- limit_tokens_from_string: "swarms/utils/limit_tokens_from_string.md" +- math_eval: "swarms/utils/math_eval.md" diff --git a/mkdocs.yml b/mkdocs.yml index 431251be..b9f1e856 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -112,20 +112,18 @@ nav: - PGVectorStore: "swarms/memory/pg.md" - ShortTermMemory: "swarms/memory/short_term_memory.md" - swarms.utils: - - phoenix_trace_decorator: "swarms/utils/phoenix_tracer.md" + - pdf_to_text: "swarms/utils/pdf_to_text.md" + - load_model_torch: "swarms/utils/load_model_torch.md" + - metrics_decorator: "swarms/utils/metrics_decorator.md" + - prep_torch_inference: "swarms/utils/prep_torch_inference.md" + - find_image_path: "swarms/utils/find_image_path.md" + - print_class_parameters: "swarms/utils/print_class_parameters.md" + - extract_code_from_markdown: "swarms/utils/extract_code_from_markdown.md" + - check_device: "swarms/utils/check_device.md" + - display_markdown_message: "swarms/utils/display_markdown_message.md" + - phoenix_tracer: "swarms/utils/phoenix_tracer.md" + - limit_tokens_from_string: "swarms/utils/limit_tokens_from_string.md" - math_eval: "swarms/utils/math_eval.md" - - pdf_to_text: "pdf_to_text.md" - - load_model_torch: "load_model_torch.md" - - metrics_decorator: "metrics_decorator.md" - - prep_torch_inference: "prep_torch_inference.md" - - find_image_path: "find_image_path.md" - - print_class_parameters: "print_class_parameters.md" - - extract_code_from_markdown: "extract_code_from_markdown.md" - - check_device: "check_device.md" - - display_markdown_message: "display_markdown_message.md" - - phoenix_tracer: "phoenix_tracer.md" - - limit_tokens_from_string: "limit_tokens_from_string.md" - - math_eval: "math_eval.md" - Guides: - Overview: "examples/index.md" - Agents: diff --git a/pyproject.toml b/pyproject.toml index b8e4fb3a..34339640 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name = "swarms" -version = "2.6.1" +version = "3.1.0" description = "Swarms - Pytorch" license = "MIT" authors = ["Kye Gomez "] diff --git a/scripts/auto_tests_docs/mkdocs_handler.py b/scripts/auto_tests_docs/mkdocs_handler.py index b1cfdaa5..58718bf3 100644 --- a/scripts/auto_tests_docs/mkdocs_handler.py +++ b/scripts/auto_tests_docs/mkdocs_handler.py @@ -1,5 +1,6 @@ import os + def generate_file_list(directory, output_file): """ Generate a list of files in a directory in the specified format and write it to a file. @@ -8,16 +9,21 @@ def generate_file_list(directory, output_file): directory (str): The directory to list the files from. output_file (str): The file to write the output to. """ - with open(output_file, 'w') as f: + with open(output_file, "w") as f: for root, dirs, files in os.walk(directory): for file in files: - if file.endswith('.md'): + if file.endswith(".md"): # Remove the directory from the file path and replace slashes with dots - file_path = os.path.join(root, file).replace(directory + '/', '').replace('/', '.') + file_path = ( + os.path.join(root, file) + .replace(directory + "/", "") + .replace("/", ".") + ) # Remove the file extension file_name, _ = os.path.splitext(file) # Write the file name and path to the output file - f.write(f"- {file_name}: \"{file_path}\"\n") + f.write(f'- {file_name}: "swarms/utils/{file_path}"\n') + # Use the function to generate the file list -generate_file_list('docs/swarms/utils', 'file_list.txt') \ No newline at end of file +generate_file_list("docs/swarms/utils", "file_list.txt")