From 4af1cb42fe3ba2c49bd1ed6d239e1b77528271fe Mon Sep 17 00:00:00 2001 From: Kye Date: Wed, 8 Nov 2023 17:52:26 -0500 Subject: [PATCH] clean up Former-commit-id: fe19f21bceef17429294fe2f14b5e19fca2c2cf9 --- CONTRIBUTING.md | 29 +++++++++++++++++++ quality.sh => code_quality.sh | 0 .../multi_modal_auto_agent.py | 0 example.py | 2 +- pyproject.toml | 2 +- swarms/models/__init__.py | 4 +-- 6 files changed, 33 insertions(+), 4 deletions(-) rename quality.sh => code_quality.sh (100%) rename multi_modal_auto_agent.py => demos/multi_modal_auto_agent.py (100%) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index bd9090de..be04abaa 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -100,6 +100,35 @@ You can learn more about mkdocs on the [mkdocs website](https://www.mkdocs.org/) - Run all the tests in the tests folder `find ./tests -name '*.py' -exec pytest {} \;` +## Code Quality +`quality.sh` runs 4 different code formatters for ultra reliable code cleanup using Autopep8, Black, Ruff, YAPF +1. Open your terminal. + +2. Change directory to where `quality.sh` is located using `cd` command: + ```sh + cd /path/to/directory + ``` + +3. Make sure the script has execute permissions: + ```sh + chmod +x quality.sh + ``` + +4. Run the script: + ```sh + ./quality.sh + ``` + +If the script requires administrative privileges, you might need to run it with `sudo`: +```sh +sudo ./quality.sh +``` + +Please replace `/path/to/directory` with the actual path where the `quality.sh` script is located on your system. + +If you're asking for a specific content or functionality inside `quality.sh` related to YAPF or other code quality tools, you would need to edit the `quality.sh` script to include the desired commands, such as running YAPF on a directory. The contents of `quality.sh` would dictate exactly what happens when you run it. + + ## 📄 license By contributing, you agree that your contributions will be licensed under an [MIT license](https://github.com/kyegomez/swarms/blob/develop/LICENSE.md). \ No newline at end of file diff --git a/quality.sh b/code_quality.sh similarity index 100% rename from quality.sh rename to code_quality.sh diff --git a/multi_modal_auto_agent.py b/demos/multi_modal_auto_agent.py similarity index 100% rename from multi_modal_auto_agent.py rename to demos/multi_modal_auto_agent.py diff --git a/example.py b/example.py index 6c27bceb..c84448a8 100644 --- a/example.py +++ b/example.py @@ -1,7 +1,7 @@ from swarms.models import OpenAIChat from swarms.structs import Flow -api_key = "" +api_key = "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" # Initialize the language model, this model can be swapped out with Anthropic, ETC, Huggingface Models like Mistral, ETC llm = OpenAIChat( diff --git a/pyproject.toml b/pyproject.toml index 62c0ec13..bad710f4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name = "swarms" -version = "2.1.3" +version = "2.1.4" description = "Swarms - Pytorch" license = "MIT" authors = ["Kye Gomez "] diff --git a/swarms/models/__init__.py b/swarms/models/__init__.py index 6f6ea8ba..c0e55db5 100644 --- a/swarms/models/__init__.py +++ b/swarms/models/__init__.py @@ -19,7 +19,7 @@ from swarms.models.layoutlm_document_qa import LayoutLMDocumentQA # from swarms.models.gpt4v import GPT4Vision # from swarms.models.dalle3 import Dalle3 # from swarms.models.distilled_whisperx import DistilWhisperModel -from swarms.models.fuyu import Fuyu # Not working, wait until they update +# from swarms.models.fuyu import Fuyu # Not working, wait until they update import sys @@ -45,5 +45,5 @@ __all__ = [ "WizardLLMStoryTeller", # "GPT4Vision", # "Dalle3", - "Fuyu", + # "Fuyu", ]