From c3a0595cda61ccd6e4ea7a3fd93ea8f20d20f3dd Mon Sep 17 00:00:00 2001 From: evelynmitchell <efmphone@gmail.com> Date: Thu, 23 Nov 2023 08:25:22 -0700 Subject: [PATCH 01/35] increase max line pylint ruff --- pyproject.toml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 075bbd15..6320615e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -84,4 +84,7 @@ recursive = true aggressive = 3 [tool.ruff] -line-length = 120 \ No newline at end of file +line-length = 200 + +[tool.pylint] +max-line-length = 200 \ No newline at end of file From 11009c469dcc86452acb0e1f9051e49392b791ea Mon Sep 17 00:00:00 2001 From: evelynmitchell <efmphone@gmail.com> Date: Thu, 23 Nov 2023 08:29:55 -0700 Subject: [PATCH 02/35] whitespace blank line flake8 remove --- .flake8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.flake8 b/.flake8 index d148ed3e..efe02440 100644 --- a/.flake8 +++ b/.flake8 @@ -1,2 +1,2 @@ [flake8] -extend-ignore = E501, W292, W291 \ No newline at end of file +extend-ignore = E501, W292, W291, W293 \ No newline at end of file From ea77dda4b361d9564633694df4137187cfd4551b Mon Sep 17 00:00:00 2001 From: evelynmitchell <efmphone@gmail.com> Date: Thu, 23 Nov 2023 08:30:30 -0700 Subject: [PATCH 03/35] flake8 whitespace --- pyproject.toml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 6320615e..f7071d94 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -87,4 +87,7 @@ aggressive = 3 line-length = 200 [tool.pylint] -max-line-length = 200 \ No newline at end of file +max-line-length = 200 + +[tool.flake8] +extend-ignore = E501, W292, W291, W293 \ No newline at end of file From 90aeff766e199075f430ee9b59ee618c5ba46f70 Mon Sep 17 00:00:00 2001 From: evelynmitchell <efmphone@gmail.com> Date: Thu, 23 Nov 2023 08:39:43 -0700 Subject: [PATCH 04/35] delete quality.yml --- .github/workflows/quality.yml | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 .github/workflows/quality.yml diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml deleted file mode 100644 index 9b09cfa9..00000000 --- a/.github/workflows/quality.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Quality - -on: - push: - branches: [ "master" ] - pull_request: - branches: [ "master" ] - -jobs: - lint: - runs-on: ubuntu-latest - strategy: - fail-fast: false - steps: - - name: Checkout actions - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Init environment - uses: ./.github/actions/init-environment - - name: Run linter - run: | - pylint `git diff --name-only --diff-filter=d origin/master HEAD | grep -E '\.py$' | tr '\n' ' '` \ No newline at end of file From f3eb001944d45334a142d3a001c120cb1992fa2f Mon Sep 17 00:00:00 2001 From: evelynmitchell <efmphone@gmail.com> Date: Thu, 23 Nov 2023 08:41:53 -0700 Subject: [PATCH 05/35] delete lints.yml --- .github/workflows/lints.yml | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 .github/workflows/lints.yml diff --git a/.github/workflows/lints.yml b/.github/workflows/lints.yml deleted file mode 100644 index 216903d5..00000000 --- a/.github/workflows/lints.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: Linting - -on: - push: - branches: - - master - -jobs: - lint: - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: 3.x - - - name: Install dependencies - run: pip install -r requirements.txt - - - name: Run linters - run: pylint swarms \ No newline at end of file From 9300fbaadc2f6953508e104e0be2cc5b95478bb7 Mon Sep 17 00:00:00 2001 From: evelynmitchell <efmphone@gmail.com> Date: Thu, 23 Nov 2023 08:43:52 -0700 Subject: [PATCH 06/35] toml format fix --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f7071d94..518107c1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -90,4 +90,4 @@ line-length = 200 max-line-length = 200 [tool.flake8] -extend-ignore = E501, W292, W291, W293 \ No newline at end of file +extend-ignore = "E501, W292, W291, W293" \ No newline at end of file From 1169e2692cac86465538deb517f6fb98a0e5adc3 Mon Sep 17 00:00:00 2001 From: evelynmitchell <efmphone@gmail.com> Date: Thu, 23 Nov 2023 08:46:36 -0700 Subject: [PATCH 07/35] leading hypen flake8 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 518107c1..6b9b191e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -90,4 +90,4 @@ line-length = 200 max-line-length = 200 [tool.flake8] -extend-ignore = "E501, W292, W291, W293" \ No newline at end of file +extend-ignore = "E266, E501, W292, W291, W293i" \ No newline at end of file From 045bd5cadc7ea765ba985e76537fcc2f359fa1fd Mon Sep 17 00:00:00 2001 From: evelynmitchell <efmphone@gmail.com> Date: Thu, 23 Nov 2023 08:48:19 -0700 Subject: [PATCH 08/35] removed pylint.yml --- .github/workflows/pylint.yml | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 .github/workflows/pylint.yml diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml deleted file mode 100644 index 3f3ba2e2..00000000 --- a/.github/workflows/pylint.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Pylint - -on: [push] - -jobs: - build: - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.8", "3.9", "3.10"] - steps: - - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install pylint - - name: Analysing the code with pylint - run: | - pylint $(git ls-files '*.py') From ae7852fbf2c8c071bb416702543d4d522e2767bd Mon Sep 17 00:00:00 2001 From: evelynmitchell <efmphone@gmail.com> Date: Thu, 23 Nov 2023 08:51:05 -0700 Subject: [PATCH 09/35] delete code_quality_control.yml --- .github/workflows/code_quality_control.yml | 30 ---------------------- 1 file changed, 30 deletions(-) delete mode 100644 .github/workflows/code_quality_control.yml diff --git a/.github/workflows/code_quality_control.yml b/.github/workflows/code_quality_control.yml deleted file mode 100644 index a0a49572..00000000 --- a/.github/workflows/code_quality_control.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: Linting and Formatting - -on: - push: - branches: - - master - -jobs: - lint_and_format: - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: 3.x - - - name: Install dependencies - run: pip install -r requirements.txt - - - name: Find Python files - run: find swarms -name "*.py" -type f -exec autopep8 --in-place --aggressive --aggressive {} + - - - name: Push changes - uses: ad-m/github-push-action@master - with: - github_token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From 4c983227d6d12d5fde6c806e40d458fe15427d20 Mon Sep 17 00:00:00 2001 From: evelynmitchell <efmphone@gmail.com> Date: Thu, 23 Nov 2023 09:16:56 -0700 Subject: [PATCH 10/35] remove run_test --- .github/workflows/run_test.yml | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 .github/workflows/run_test.yml diff --git a/.github/workflows/run_test.yml b/.github/workflows/run_test.yml deleted file mode 100644 index 172dc64b..00000000 --- a/.github/workflows/run_test.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Python application test - -on: [push] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - name: Set up Python 3.8 - uses: actions/setup-python@v4 - with: - python-version: 3.8 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install pytest - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - - name: Run tests with pytest - run: | - find tests/ -name "*.py" | xargs pytest From 8be82e0c649dbf69f04e6225d6153f752ad28c03 Mon Sep 17 00:00:00 2001 From: evelynmitchell <efmphone@gmail.com> Date: Thu, 23 Nov 2023 09:18:23 -0700 Subject: [PATCH 11/35] remove cos_integration --- .github/workflows/cos_integration.yml | 42 --------------------------- 1 file changed, 42 deletions(-) delete mode 100644 .github/workflows/cos_integration.yml diff --git a/.github/workflows/cos_integration.yml b/.github/workflows/cos_integration.yml deleted file mode 100644 index 3bfb587c..00000000 --- a/.github/workflows/cos_integration.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: Continuous Integration - -on: - push: - branches: - - master - -jobs: - test: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: 3.x - - - name: Install dependencies - run: pip install -r requirements.txt - - - name: Run unit tests - run: pytest tests/unit - - - name: Run integration tests - run: pytest tests/integration - - - name: Run code coverage - run: pytest --cov=swarms tests/ - - - name: Run linters - run: pylint swarms - - - name: Build documentation - run: make docs - - - name: Validate documentation - run: sphinx-build -b linkcheck docs build/docs - - - name: Run performance tests - run: find ./tests -name '*.py' -exec pytest {} \; \ No newline at end of file From bf47cf4e207d6ed339206e6433f94375b0fcff2a Mon Sep 17 00:00:00 2001 From: evelynmitchell <efmphone@gmail.com> Date: Thu, 23 Nov 2023 09:29:23 -0700 Subject: [PATCH 12/35] remove doxs_test --- .github/workflows/docs_test.yml | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 .github/workflows/docs_test.yml diff --git a/.github/workflows/docs_test.yml b/.github/workflows/docs_test.yml deleted file mode 100644 index 35d2ca91..00000000 --- a/.github/workflows/docs_test.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Documentation Tests - -on: - push: - branches: - - master - -jobs: - test: - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: 3.x - - - name: Install dependencies - run: pip install -r requirements.txt - - - name: Build documentation - run: make docs - - - name: Validate documentation - run: sphinx-build -b linkcheck docs build/docs \ No newline at end of file From d5a418c25b5ff59e80fb8fc71d78d936041ff215 Mon Sep 17 00:00:00 2001 From: evelynmitchell <efmphone@gmail.com> Date: Thu, 23 Nov 2023 10:25:20 -0700 Subject: [PATCH 13/35] added poetry install action --- .github/workflows/test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 65dc68d9..f05b275e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,6 +22,8 @@ jobs: test_type: - "core" - "extended" + - name: Install Poetry + uses: snok/install-poetry@v1 name: Python ${{ matrix.python-version }} ${{ matrix.test_type }} steps: - uses: actions/checkout@v4 From f3eaa813b5801ff24782304eb87e989446438761 Mon Sep 17 00:00:00 2001 From: evelynmitchell <efmphone@gmail.com> Date: Thu, 23 Nov 2023 10:26:44 -0700 Subject: [PATCH 14/35] typo --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f05b275e..ec47ba26 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,7 +22,7 @@ jobs: test_type: - "core" - "extended" - - name: Install Poetry + name: Install Poetry uses: snok/install-poetry@v1 name: Python ${{ matrix.python-version }} ${{ matrix.test_type }} steps: From d6f9d1e90d57157e6c668b7916dcf6dc696193b2 Mon Sep 17 00:00:00 2001 From: evelynmitchell <efmphone@gmail.com> Date: Thu, 23 Nov 2023 10:27:45 -0700 Subject: [PATCH 15/35] typo 26 --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ec47ba26..73a33f17 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,7 +23,7 @@ jobs: - "core" - "extended" name: Install Poetry - uses: snok/install-poetry@v1 + uses: snok/install-poetry@v1 name: Python ${{ matrix.python-version }} ${{ matrix.test_type }} steps: - uses: actions/checkout@v4 From 50b482244dfd3c9783d30886bea4bb9da22f8204 Mon Sep 17 00:00:00 2001 From: evelynmitchell <efmphone@gmail.com> Date: Thu, 23 Nov 2023 10:35:37 -0700 Subject: [PATCH 16/35] added test step before build --- .github/workflows/test.yml | 40 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 73a33f17..65ca4e78 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,8 +9,7 @@ on: env: POETRY_VERSION: "1.4.2" -jobs: - build: + test: runs-on: ubuntu-latest strategy: matrix: @@ -25,6 +24,43 @@ jobs: name: Install Poetry uses: snok/install-poetry@v1 name: Python ${{ matrix.python-version }} ${{ matrix.test_type }} + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: "./.github/actions/poetry_setup" + with: + python-version: ${{ matrix.python-version }} + poetry-version: "1.4.2" + cache-key: ${{ matrix.test_type }} + install-command: | + if [ "${{ matrix.test_type }}" == "core" ]; then + echo "Running core tests, installing dependencies with poetry..." + poetry install + else + echo "Running extended tests, installing dependencies with poetry..." + poetry install -E extended_testing + fi + - name: Run ${{matrix.test_type}} tests + run: | + if [ "${{ matrix.test_type }}" == "core" ]; then + make test + else + make extended_tests + fi + shell: bash + build: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: + - "3.8" + - "3.9" + - "3.10" + - "3.11" + test_type: + - "core" + - "extended" + name: Python ${{ matrix.python-version }} ${{ matrix.test_type }} steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} From c0c87982b9c4083f9a8b594556d4deed1b2c91ed Mon Sep 17 00:00:00 2001 From: evelynmitchell <efmphone@gmail.com> Date: Thu, 23 Nov 2023 10:41:11 -0700 Subject: [PATCH 17/35] added yaml lint --- .github/workflows/lint.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 97aa4732..e04004f1 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -5,6 +5,16 @@ name: Lint on: [push, pull_request] jobs: + yaml-lint: + runs-on: ubuntu-latest + steps: + - name: Check out source repository + uses: actions/checkout@v4 + - name: yaml Lint + uses: ibiqlik/action-yamllint@v3 + with: + file_or_dir: *.yaml + config_file: .yamllint.yml flake8-lint: runs-on: ubuntu-latest name: Lint From 23b6e50ee0ddcd633b534d8e130114408282419c Mon Sep 17 00:00:00 2001 From: evelynmitchell <efmphone@gmail.com> Date: Thu, 23 Nov 2023 10:42:23 -0700 Subject: [PATCH 18/35] typo yaml lint --- .github/workflows/lint.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index e04004f1..8a19200e 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -12,9 +12,6 @@ jobs: uses: actions/checkout@v4 - name: yaml Lint uses: ibiqlik/action-yamllint@v3 - with: - file_or_dir: *.yaml - config_file: .yamllint.yml flake8-lint: runs-on: ubuntu-latest name: Lint From 91b2e37f8f09938ccd0291e6de5f63f9d997c8e7 Mon Sep 17 00:00:00 2001 From: evelynmitchell <efmphone@gmail.com> Date: Thu, 23 Nov 2023 10:46:49 -0700 Subject: [PATCH 19/35] flake8 yaml lint fix --- .github/workflows/lint.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 8a19200e..908b6c1f 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -14,13 +14,9 @@ jobs: uses: ibiqlik/action-yamllint@v3 flake8-lint: runs-on: ubuntu-latest - name: Lint + name: flake8 Lint steps: - name: Check out source repository uses: actions/checkout@v4 - name: Set up Python environment - uses: actions/setup-python@v4 - with: - python-version: "3.11" - - name: flake8 Lint - uses: py-actions/flake8@v2 \ No newline at end of file + uses: py-actions/flake8@v2 From 1b6a3a0b2023d02d3397edf93a9ee1f1a4e4693d Mon Sep 17 00:00:00 2001 From: evelynmitchell <efmphone@gmail.com> Date: Thu, 23 Nov 2023 15:39:53 -0700 Subject: [PATCH 20/35] delete python-app --- .github/workflows/python-app.yml | 39 -------------------------------- 1 file changed, 39 deletions(-) delete mode 100644 .github/workflows/python-app.yml diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml deleted file mode 100644 index 1f634309..00000000 --- a/.github/workflows/python-app.yml +++ /dev/null @@ -1,39 +0,0 @@ -# This workflow will install Python dependencies, run tests and lint with a single version of Python -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python - -name: Python application - -on: - push: - branches: [ "master" ] - pull_request: - branches: [ "master" ] - -permissions: - contents: read - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - name: Set up Python 3.10 - uses: actions/setup-python@v4 - with: - python-version: "3.10" - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install flake8 pytest - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - - name: Lint with flake8 - run: | - # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - - name: Test with pytest - run: | - pytest From 19f5c1429ca4a293f4ed0d0aed3288a63df862e3 Mon Sep 17 00:00:00 2001 From: evelynmitchell <efmphone@gmail.com> Date: Thu, 23 Nov 2023 15:44:52 -0700 Subject: [PATCH 21/35] moved ruff to lint --- .github/workflows/lint.yml | 6 ++++++ .github/workflows/ruff.yml | 8 -------- 2 files changed, 6 insertions(+), 8 deletions(-) delete mode 100644 .github/workflows/ruff.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 908b6c1f..a6034eb4 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -20,3 +20,9 @@ jobs: uses: actions/checkout@v4 - name: Set up Python environment uses: py-actions/flake8@v2 + ruff-lint: + runs-on: ubuntu-latest + name: ruff Lint + steps: + - uses: actions/checkout@v4 + - uses: chartboost/ruff-action@v1 diff --git a/.github/workflows/ruff.yml b/.github/workflows/ruff.yml deleted file mode 100644 index ef06d34a..00000000 --- a/.github/workflows/ruff.yml +++ /dev/null @@ -1,8 +0,0 @@ -name: Ruff -on: [ push, pull_request ] -jobs: - ruff: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: chartboost/ruff-action@v1 From 72faadbdc36db14009bca60cbd5dce4ffd9e6182 Mon Sep 17 00:00:00 2001 From: evelynmitchell <efmphone@gmail.com> Date: Thu, 23 Nov 2023 15:47:08 -0700 Subject: [PATCH 22/35] added name of docker build step --- .github/workflows/docker-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 793d8e0e..0b09ad0c 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -11,7 +11,7 @@ jobs: build: runs-on: ubuntu-latest - + name: Build Docker image steps: - uses: actions/checkout@v4 - name: Build the Docker image From e7cbb29e49eba2050342fa4169bf309338939965 Mon Sep 17 00:00:00 2001 From: evelynmitchell <efmphone@gmail.com> Date: Thu, 23 Nov 2023 15:48:25 -0700 Subject: [PATCH 23/35] fix yaml lint --- .github/workflows/docker-image.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 0b09ad0c..3df1a9ca 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -2,9 +2,9 @@ name: Docker Image CI on: push: - branches: [ "master" ] + branches: ["master"] pull_request: - branches: [ "master" ] + branches: ["master"] jobs: @@ -13,6 +13,6 @@ jobs: runs-on: ubuntu-latest name: Build Docker image steps: - - uses: actions/checkout@v4 - - name: Build the Docker image - run: docker build . --file Dockerfile --tag my-image-name:$(date +%s) + - uses: actions/checkout@v4 + - name: Build the Docker image + run: docker build . --file Dockerfile --tag my-image-name:$(date +%s) From e36cf6b435807c4533f24ea356fb3bb50b8ed494 Mon Sep 17 00:00:00 2001 From: evelynmitchell <efmphone@gmail.com> Date: Thu, 23 Nov 2023 16:11:08 -0700 Subject: [PATCH 24/35] lots of indents mkdocs --- mkdocs.yml | 157 +++++++++++++++++++++++++++-------------------------- 1 file changed, 79 insertions(+), 78 deletions(-) diff --git a/mkdocs.yml b/mkdocs.yml index e70e1a39..8616cc2f 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,3 +1,4 @@ +--- site_name: Swarms Docs plugins: - glightbox @@ -19,15 +20,15 @@ extra: - icon: fontawesome/brands/python link: https://pypi.org/project/Swarms/ theme: - name: material - custom_dir: docs/overrides - logo: assets/img/SwarmsLogoIcon.png - palette: - # Palette toggle for light mode + name: material + custom_dir: docs/overrides + logo: assets/img/SwarmsLogoIcon.png + palette: + # Palette toggle for light mode - scheme: default primary: black toggle: - icon: material/brightness-7 + icon: material/brightness-7 name: Switch to dark mode # Palette toggle for dark mode - scheme: slate @@ -35,14 +36,14 @@ theme: toggle: icon: material/brightness-4 name: Switch to light mode - features: - - content.code.copy - - content.code.annotate - - navigation.tabs - - navigation.sections - - navigation.expand - - navigation.top - - announce.dismiss + features: + - content.code.copy + - content.code.annotate + - navigation.tabs + - navigation.sections + - navigation.expand + - navigation.top + - announce.dismiss markdown_extensions: - pymdownx.highlight: anchor_linenums: true @@ -58,25 +59,25 @@ markdown_extensions: - def_list - footnotes nav: -- Home: - - Overview: "index.md" - - Contributing: "contributing.md" - - Docker Container Setup: "docker_setup.md" -- Swarms: - - Overview: "swarms/index.md" + - Home: + - Overview: "index.md" + - Contributing: "contributing.md" + - Docker Container Setup: "docker_setup.md" + - Swarms: + - Overview: "swarms/index.md" - swarms.swarms: - - AbstractSwarm: "swarms/swarms/abstractswarm.md" - - GodMode: "swarms/swarms/godmode.md" - - Groupchat: "swarms/swarms/groupchat.md" + - AbstractSwarm: "swarms/swarms/abstractswarm.md" + - GodMode: "swarms/swarms/godmode.md" + - Groupchat: "swarms/swarms/groupchat.md" - swarms.workers: - - Overview: "swarms/workers/index.md" - - AbstractWorker: "swarms/workers/abstract_worker.md" + - Overview: "swarms/workers/index.md" + - AbstractWorker: "swarms/workers/abstract_worker.md" - swarms.agents: - - AbstractAgent: "swarms/agents/abstract_agent.md" - - OmniModalAgent: "swarms/agents/omni_agent.md" + - AbstractAgent: "swarms/agents/abstract_agent.md" + - OmniModalAgent: "swarms/agents/omni_agent.md" - swarms.models: - - Language: - - Overview: "swarms/models/index.md" + - Language: + - Overview: "swarms/models/index.md" - HuggingFaceLLM: "swarms/models/huggingface.md" - Anthropic: "swarms/models/anthropic.md" - OpenAI: "swarms/models/openai.md" @@ -84,54 +85,54 @@ nav: - BioGPT: "swarms/models/biogpt.md" - MPT7B: "swarms/models/mpt.md" - Mistral: "swarms/models/mistral.md" - - MultiModal: - - Fuyu: "swarms/models/fuyu.md" - - Vilt: "swarms/models/vilt.md" - - Idefics: "swarms/models/idefics.md" - - BingChat: "swarms/models/bingchat.md" - - Kosmos: "swarms/models/kosmos.md" - - Nougat: "swarms/models/nougat.md" - - Dalle3: "swarms/models/dalle3.md" - - GPT4V: "swarms/models/gpt4v.md" - - LayoutLMDocumentQA: "swarms/models/layoutlm_document_qa.md" - - DistilWhisperModel: "swarms/models/distilled_whisperx.md" - - ElevenLabsText2SpeechTool: "swarms/models/elevenlabs.md" + - MultiModal: + - Fuyu: "swarms/models/fuyu.md" + - Vilt: "swarms/models/vilt.md" + - Idefics: "swarms/models/idefics.md" + - BingChat: "swarms/models/bingchat.md" + - Kosmos: "swarms/models/kosmos.md" + - Nougat: "swarms/models/nougat.md" + - Dalle3: "swarms/models/dalle3.md" + - GPT4V: "swarms/models/gpt4v.md" + - LayoutLMDocumentQA: "swarms/models/layoutlm_document_qa.md" + - DistilWhisperModel: "swarms/models/distilled_whisperx.md" + - ElevenLabsText2SpeechTool: "swarms/models/elevenlabs.md" - swarms.structs: - - Overview: "swarms/structs/overview.md" - - AutoScaler: "swarms/swarms/autoscaler.md" - - Flow: "swarms/structs/flow.md" - - SequentialWorkflow: 'swarms/structs/sequential_workflow.md' + - Overview: "swarms/structs/overview.md" + - AutoScaler: "swarms/swarms/autoscaler.md" + - Flow: "swarms/structs/flow.md" + - SequentialWorkflow: 'swarms/structs/sequential_workflow.md' - swarms.memory: - - PineconeVectorStoreStore: "swarms/memory/pinecone.md" - - PGVectorStore: "swarms/memory/pg.md" - # - swarms.chunkers: - # - BaseChunker: "swarms/chunkers/basechunker.md" - # - PdfChunker: "swarms/chunkers/pdf_chunker.md" -- Guides: - - Overview: "examples/index.md" - - Agents: - - Flow: "examples/flow.md" - - SequentialWorkflow: "examples/reliable_autonomous_agents.md" - - OmniAgent: "examples/omni_agent.md" - - 2O+ Autonomous Agent Blogs: "examples/ideas.md" -- Applications: - - CustomerSupport: - - Overview: "applications/customer_support.md" - - Marketing: - - Overview: "applications/marketing_agencies.md" -- Corporate: - - FAQ: "corporate/faq.md" - - Purpose: "corporate/purpose.md" - - Roadmap: "corporate/roadmap.md" - - Weaknesses: "corporate/failures.md" - - Design: "corporate/design.md" - - Flywheel: "corporate/flywheel.md" - - Bounties: "corporate/bounties.md" - - Metric: "corporate/metric.md" - - Distribution: "corporate/distribution" - - Research: "corporate/research.md" - - Demos: "corporate/demos.md" - - Architecture: "corporate/architecture.md" - - Checklist: "corporate/checklist.md" - - Hiring: "corporate/hiring.md" - - SwarmCloud: "corporate/swarm_cloud.md" + - PineconeVectorStoreStore: "swarms/memory/pinecone.md" + - PGVectorStore: "swarms/memory/pg.md" +# - swarms.chunkers: +# - BaseChunker: "swarms/chunkers/basechunker.md" +# - PdfChunker: "swarms/chunkers/pdf_chunker.md" + - Guides: + - Overview: "examples/index.md" + - Agents: + - Flow: "examples/flow.md" + - SequentialWorkflow: "examples/reliable_autonomous_agents.md" + - OmniAgent: "examples/omni_agent.md" + - 2O+ Autonomous Agent Blogs: "examples/ideas.md" + - Applications: + - CustomerSupport: + - Overview: "applications/customer_support.md" + - Marketing: + - Overview: "applications/marketing_agencies.md" + - Corporate: + - FAQ: "corporate/faq.md" + - Purpose: "corporate/purpose.md" + - Roadmap: "corporate/roadmap.md" + - Weaknesses: "corporate/failures.md" + - Design: "corporate/design.md" + - Flywheel: "corporate/flywheel.md" + - Bounties: "corporate/bounties.md" + - Metric: "corporate/metric.md" + - Distribution: "corporate/distribution" + - Research: "corporate/research.md" + - Demos: "corporate/demos.md" + - Architecture: "corporate/architecture.md" + - Checklist: "corporate/checklist.md" + - Hiring: "corporate/hiring.md" + - SwarmCloud: "corporate/swarm_cloud.md" From d533afa5cff56af863187a0570a59df2bd7a8ca3 Mon Sep 17 00:00:00 2001 From: evelynmitchell <efmphone@gmail.com> Date: Thu, 23 Nov 2023 16:13:58 -0700 Subject: [PATCH 25/35] lint readthedocs yml --- .readthedocs.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index fbdc74ec..d51bc576 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -1,3 +1,4 @@ +--- version: 2 build: @@ -9,5 +10,5 @@ mkdocs: configuration: mkdocs.yml python: - install: - - requirements: requirements.txt \ No newline at end of file + install: + - requirements: requirements.txt From 381a01ccf91f143e354a2f5ee3712899f09a5a70 Mon Sep 17 00:00:00 2001 From: evelynmitchell <efmphone@gmail.com> Date: Thu, 23 Nov 2023 16:17:40 -0700 Subject: [PATCH 26/35] pre commit yml lint --- .pre-commit-config.yaml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ae0a4fc0..29e78560 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,8 +1,9 @@ +--- repos: - repo: https://github.com/ambv/black rev: 22.3.0 hooks: - - id: black + - id: black - repo: https://github.com/charliermarsh/ruff-pre-commit rev: 'v0.0.255' hooks: @@ -11,8 +12,8 @@ repos: - repo: https://github.com/nbQA-dev/nbQA rev: 1.6.3 hooks: - - id: nbqa-black - additional_dependencies: [ipython==8.12, black] - - id: nbqa-ruff - args: ["--ignore=I001"] - additional_dependencies: [ipython==8.12, ruff] \ No newline at end of file + - id: nbqa-black + additional_dependencies: [ipython==8.12, black] + - id: nbqa-ruff + args: ["--ignore=I001"] + additional_dependencies: [ipython==8.12, ruff] From fabf51c23239798a5517a511bfead826d43e32c4 Mon Sep 17 00:00:00 2001 From: evelynmitchell <efmphone@gmail.com> Date: Thu, 23 Nov 2023 16:24:47 -0700 Subject: [PATCH 27/35] dependabot yml lint --- .github/dependabot.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 34b75fb9..b523994a 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,3 +1,4 @@ +--- # https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/configuration-options-for-dependency-updates version: 2 @@ -11,4 +12,3 @@ updates: directory: "/" schedule: interval: "weekly" - From 630a6a5f69b7b779f3949c82d4369b4e09d7a541 Mon Sep 17 00:00:00 2001 From: evelynmitchell <efmphone@gmail.com> Date: Thu, 23 Nov 2023 16:27:26 -0700 Subject: [PATCH 28/35] labeler yml lint --- .github/labeler.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/labeler.yml b/.github/labeler.yml index 72ccc40a..1fb9d7ec 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -1,12 +1,14 @@ +--- # this is a config file for the github action labeler # Add 'label1' to any changes within 'example' folder or any subfolders example_change: -- example/** + - example/** # Add 'label2' to any file changes within 'example2' folder example2_change: example2/* -# Add label3 to any change to .txt files within the entire repository. Quotation marks are required for the leading asterisk +# Add label3 to any change to .txt files within the entire repository. +# Quotation marks are required for the leading asterisk text_files: -- '**/*.txt' \ No newline at end of file + - '**/*.txt' From 73efdb08049901f7e225e645270b7e0359a629cb Mon Sep 17 00:00:00 2001 From: evelynmitchell <efmphone@gmail.com> Date: Thu, 23 Nov 2023 16:39:05 -0700 Subject: [PATCH 29/35] FUNDING yml lint --- .github/FUNDING.yml | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index c626b001..e3733b98 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,13 +1,14 @@ +--- # These are supported funding model platforms github: [kyegomez] -patreon: # Replace with a single Patreon username -open_collective: # Replace with a single Open Collective username -ko_fi: # Replace with a single Ko-fi username -tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: # Replace with a single Liberapay username -issuehunt: # Replace with a single IssueHunt username -otechie: # Replace with a single Otechie username -lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry -custom: #Nothing +# patreon: # Replace with a single Patreon username +# open_collective: # Replace with a single Open Collective username +# ko_fi: # Replace with a single Ko-fi username +# tidelift: # Replace with a single Tidelift platform-name/package-name +# community_bridge: # Replace with a single Community Bridge project-name +# liberapay: # Replace with a single Liberapay username +# issuehunt: # Replace with a single IssueHunt username +# otechie: # Replace with a single Otechie username +# lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name +# custom: #Nothing From c711da8c5917c15dfaf1c83b52bfe43f76f05d66 Mon Sep 17 00:00:00 2001 From: evelynmitchell <efmphone@gmail.com> Date: Thu, 23 Nov 2023 16:42:57 -0700 Subject: [PATCH 30/35] yamllint rule, pr_requesr lint --- .github/workflows/pr_request_checks.yml | 3 ++- pyproject.toml | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr_request_checks.yml b/.github/workflows/pr_request_checks.yml index 56b8c1f7..ad7b691f 100644 --- a/.github/workflows/pr_request_checks.yml +++ b/.github/workflows/pr_request_checks.yml @@ -1,3 +1,4 @@ +--- name: Pull Request Checks on: @@ -24,4 +25,4 @@ jobs: - name: Run tests and checks run: | find tests/ -name "*.py" | xargs pytest - pylint swarms \ No newline at end of file + pylint swarms diff --git a/pyproject.toml b/pyproject.toml index 6b9b191e..7679f823 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -90,4 +90,7 @@ line-length = 200 max-line-length = 200 [tool.flake8] -extend-ignore = "E266, E501, W292, W291, W293i" \ No newline at end of file +extend-ignore = "E266, E501, W292, W291, W293i" + +[tool.yamllint] +disable-line rule:truthy \ No newline at end of file From 903ffc83b994f13fb97d736b73f840eea3d8b93a Mon Sep 17 00:00:00 2001 From: evelynmitchell <efmphone@gmail.com> Date: Thu, 23 Nov 2023 16:50:38 -0700 Subject: [PATCH 31/35] dockerfile yml lint --- .github/workflows/docker-image.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 3df1a9ca..6ed5bcba 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -1,6 +1,7 @@ +--- name: Docker Image CI -on: +on: # yamllint disable-line rule:truthy push: branches: ["master"] pull_request: From 06428bad864128b1ffe16c12ef55f91cc69431b7 Mon Sep 17 00:00:00 2001 From: evelynmitchell <efmphone@gmail.com> Date: Thu, 23 Nov 2023 16:52:33 -0700 Subject: [PATCH 32/35] lint lint.yml --- .github/workflows/lint.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index a6034eb4..8a6f374c 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,8 +1,9 @@ +--- # This is a basic workflow to help you get started with Actions name: Lint -on: [push, pull_request] +on: [push, pull_request] # yamllint disable-line rule:truthy jobs: yaml-lint: From ae5f2eaecd3360787c74d421b2834edc57031c5c Mon Sep 17 00:00:00 2001 From: evelynmitchell <efmphone@gmail.com> Date: Thu, 23 Nov 2023 17:07:40 -0700 Subject: [PATCH 33/35] yamllint conf, python-publish lint --- .github/workflows/python-publish.yml | 36 ++++++++++++++-------------- .yamllint | 4 ++++ 2 files changed, 22 insertions(+), 18 deletions(-) create mode 100644 .yamllint diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index c8f4ba0c..9fc16341 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -1,7 +1,7 @@ - +--- name: Upload Python Package -on: +on: # yamllint disable-line rule:truthy release: types: [published] @@ -14,19 +14,19 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: '3.x' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install build - - name: Build package - run: python -m build - - name: Publish package - uses: pypa/gh-action-pypi-publish@b7f401de30cb6434a1e19f805ff006643653240e - with: - user: __token__ - password: ${{ secrets.PYPI_API_TOKEN }} \ No newline at end of file + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.x' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install build + - name: Build package + run: python -m build + - name: Publish package + uses: pypa/gh-action-pypi-publish@b7f401de30cb6434a1e19f805ff006643653240e + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/.yamllint b/.yamllint new file mode 100644 index 00000000..c58fcd8f --- /dev/null +++ b/.yamllint @@ -0,0 +1,4 @@ +rules: + line-length: + level: warning + allow-non-breakable-inline-mappings: true \ No newline at end of file From 9f7e20b06ecade1b08e3612e9461d9a04c9bc7b9 Mon Sep 17 00:00:00 2001 From: evelynmitchell <efmphone@gmail.com> Date: Thu, 23 Nov 2023 17:40:18 -0700 Subject: [PATCH 34/35] add poetry to test yml --- .github/workflows/test.yml | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 65ca4e78..87976258 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,4 +1,6 @@ +--- name: test + - jobs: poetry testing on: push: @@ -21,8 +23,30 @@ env: test_type: - "core" - "extended" - name: Install Poetry - uses: snok/install-poetry@v1 + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: "snok/install-poetry@v1" + with: + python-version: ${{ matrix.python-version }} + poetry-version: "1.4.2" + cache-key: ${{ matrix.test_type }} + install-command: | + if [ "${{ matrix.test_type }}" == "core" ]; then + echo "Running core tests, installing dependencies with poetry..." + poetry install + else + echo "Running extended tests, installing dependencies with poetry..." + poetry install -E extended_testing + fi + - name: Run ${{matrix.test_type}} tests + run: | + if [ "${{ matrix.test_type }}" == "core" ]; then + make test + else + make extended_tests + fi + shell: bash name: Python ${{ matrix.python-version }} ${{ matrix.test_type }} steps: - uses: actions/checkout@v4 From 25b9efb9be12a696ff07dcc15d56ab480cc39ad9 Mon Sep 17 00:00:00 2001 From: evelynmitchell <efmphone@gmail.com> Date: Thu, 23 Nov 2023 17:42:11 -0700 Subject: [PATCH 35/35] correct error in test.yml --- .github/workflows/test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 87976258..d9dafc76 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,6 +1,5 @@ --- name: test - - jobs: poetry testing on: push: