YAMLLint now passes

pull/387/head
Wyatt Stanke 1 year ago
parent b9b750767c
commit f0c4dfc811
No known key found for this signature in database
GPG Key ID: CE6BA5FFF135536D

55
.github/action.yml vendored

@ -1,37 +1,38 @@
---
name: "Init Environment" name: "Init Environment"
description: "Initialize environment for tests" description: "Initialize environment for tests"
runs: runs:
using: "composite" using: "composite"
steps: steps:
- name: Checkout actions - name: Checkout actions
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }} - name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4 uses: actions/setup-python@v4
with: with:
python-version: ${{ matrix.python-version }} python-version: ${{ matrix.python-version }}
- name: Install and configure Poetry - name: Install and configure Poetry
uses: snok/install-poetry@v1 uses: snok/install-poetry@v1
with: with:
virtualenvs-create: true virtualenvs-create: true
virtualenvs-in-project: true virtualenvs-in-project: true
installer-parallel: true installer-parallel: true
- name: Load cached venv - name: Load cached venv
id: cached-poetry-dependencies id: cached-poetry-dependencies
uses: actions/cache@v3 uses: actions/cache@v3
with: with:
path: .venv path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies - name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root --with test --with dev --all-extras run: poetry install --no-interaction --no-root --with test --with dev --all-extras
shell: bash shell: bash
- name: Activate venv - name: Activate venv
run: | run: |
source .venv/bin/activate source .venv/bin/activate
echo PATH=$PATH >> $GITHUB_ENV echo PATH=$PATH >> $GITHUB_ENV
shell: bash shell: bash

@ -1,3 +1,4 @@
---
name: release name: release
on: on:
@ -7,7 +8,7 @@ on:
branches: branches:
- master - master
paths: paths:
- 'pyproject.toml' - "pyproject.toml"
env: env:
POETRY_VERSION: "1.4.2" POETRY_VERSION: "1.4.2"
@ -15,8 +16,8 @@ env:
jobs: jobs:
if_release: if_release:
if: | if: |
${{ github.event.pull_request.merged == true }} ${{ github.event.pull_request.merged == true }}
&& ${{ contains(github.event.pull_request.labels.*.name, 'release') }} && ${{ contains(github.event.pull_request.labels.*.name, 'release') }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4

@ -1,3 +1,4 @@
---
# This workflow uses actions that are not certified by GitHub. # This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by # They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support # separate terms of service, privacy policy, and support
@ -15,12 +16,12 @@ name: Codacy Security Scan
on: on:
push: push:
branches: [ "master" ] branches: ["master"]
pull_request: pull_request:
# The branches below must be a subset of the branches above # The branches below must be a subset of the branches above
branches: [ "master" ] branches: ["master"]
schedule: schedule:
- cron: '18 23 * * 4' - cron: "18 23 * * 4"
permissions: permissions:
contents: read contents: read
@ -28,9 +29,12 @@ permissions:
jobs: jobs:
codacy-security-scan: codacy-security-scan:
permissions: permissions:
contents: read # for actions/checkout to fetch code # for actions/checkout to fetch code
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results contents: read
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status # for github/codeql-action/upload-sarif to upload SARIF results
security-events: write
# only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
actions: read
name: Codacy Security Scan name: Codacy Security Scan
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
@ -42,7 +46,8 @@ jobs:
- name: Run Codacy Analysis CLI - name: Run Codacy Analysis CLI
uses: codacy/codacy-analysis-cli-action@33d455949345bddfdb845fba76b57b70cc83754b uses: codacy/codacy-analysis-cli-action@33d455949345bddfdb845fba76b57b70cc83754b
with: with:
# Check https://github.com/codacy/codacy-analysis-cli#project-token to get your project token from your Codacy repository # Check https://github.com/codacy/codacy-analysis-cli#project-token
# to get your project token from your Codacy repository
# You can also omit the token and run the tools that support default configurations # You can also omit the token and run the tools that support default configurations
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
verbose: true verbose: true

@ -1,3 +1,4 @@
---
# For most projects, this workflow file will not need changing; you simply need # For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository. # to commit it to your repository.
# #
@ -13,12 +14,12 @@ name: "CodeQL"
on: on:
push: push:
branches: [ "master" ] branches: ["master"]
pull_request: pull_request:
# The branches below must be a subset of the branches above # The branches below must be a subset of the branches above
branches: [ "master" ] branches: ["master"]
schedule: schedule:
- cron: '33 12 * * 5' - cron: "33 12 * * 5"
jobs: jobs:
analyze: analyze:
@ -38,45 +39,45 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
language: [ 'python' ] language: ["python"]
# CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ] # CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ]
# Use only 'java-kotlin' to analyze code written in Java, Kotlin or both # Use only 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both # Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v4
# Initializes the CodeQL tools for scanning. # Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL - name: Initialize CodeQL
uses: github/codeql-action/init@v3 uses: github/codeql-action/init@v3
with: with:
languages: ${{ matrix.language }} languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file. # If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file. # By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file. # Prefix the list here with "+" to use these queries and those in the config file.
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs # For more details on CodeQL's query packs, refer to:
# queries: security-extended,security-and-quality # https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v3
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift). # Command-line programs to run using the OS shell.
# If this step fails, then you should remove it and run the build manually (see below) # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
- name: Autobuild
uses: github/codeql-action/autobuild@v3
# Command-line programs to run using the OS shell. # If the Autobuild fails above, remove it and uncomment the following three lines.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
# If the Autobuild fails above, remove it and uncomment the following three lines. # - run: |
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. # echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh
# - run: | - name: Perform CodeQL Analysis
# echo "Run, Build Application using script" uses: github/codeql-action/analyze@v3
# ./location_of_script_within_repo/buildscript.sh with:
category: "/language:${{matrix.language}}"
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"

@ -1,3 +1,4 @@
---
name: Docs WorkAgent name: Docs WorkAgent
on: on:

@ -1,3 +1,4 @@
---
# This workflow will triage pull requests and apply a label based on the # This workflow will triage pull requests and apply a label based on the
# paths that are modified in the pull request. # paths that are modified in the pull request.
# #
@ -10,13 +11,12 @@ on: [pull_request_target]
jobs: jobs:
label: label:
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions: permissions:
contents: read contents: read
pull-requests: write pull-requests: write
steps: steps:
- uses: actions/labeler@v5 - uses: actions/labeler@v5
with: with:
repo-token: "${{ secrets.GITHUB_TOKEN }}" repo-token: "${{ secrets.GITHUB_TOKEN }}"

@ -1,7 +1,7 @@
---
name: Lint name: Lint
on: [push, pull_request] # yamllint disable-line rule:truthy on: [push, pull_request]
jobs: jobs:
yaml-lint: yaml-lint:

@ -1,3 +1,4 @@
---
name: "PR Labeler" name: "PR Labeler"
on: on:
@ -11,5 +12,5 @@ jobs:
pull-requests: write pull-requests: write
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/labeler@v5 - uses: actions/labeler@v5
if: ${{ github.event.pull_request.draft == false }} if: ${{ github.event.pull_request.draft == false }}

@ -1,3 +1,4 @@
---
name: Pull Request Checks name: Pull Request Checks
on: on:

@ -1,3 +1,4 @@
---
name: readthedocs/actions name: readthedocs/actions
on: on:
pull_request_target: pull_request_target:

@ -1,3 +1,4 @@
---
name: Pylint name: Pylint
on: [push] on: [push]
@ -9,15 +10,15 @@ jobs:
matrix: matrix:
python-version: ["3.8", "3.9", "3.10"] python-version: ["3.8", "3.9", "3.10"]
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }} - name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5 uses: actions/setup-python@v5
with: with:
python-version: ${{ matrix.python-version }} python-version: ${{ matrix.python-version }}
- name: Install dependencies - name: Install dependencies
run: | run: |
python -m pip install --upgrade pip python -m pip install --upgrade pip
pip install pylint pip install pylint
- name: Analysing the code with pylint - name: Analysing the code with pylint
run: | run: |
pylint $(git ls-files '*.py') pylint $(git ls-files '*.py')

@ -1,3 +1,4 @@
---
# This workflow will install Python dependencies, run tests and lint with a single version of Python # 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 # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
@ -5,35 +6,34 @@ name: Python application
on: on:
push: push:
branches: [ "master" ] branches: ["master"]
pull_request: pull_request:
branches: [ "master" ] branches: ["master"]
permissions: permissions:
contents: read contents: read
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Set up Python 3.10 - name: Set up Python 3.10
uses: actions/setup-python@v5 uses: actions/setup-python@v5
with: with:
python-version: "3.10" python-version: "3.10"
- name: Install dependencies - name: Install dependencies
run: | run: |
python -m pip install --upgrade pip python -m pip install --upgrade pip
pip install flake8 pytest swarms pip install flake8 pytest swarms
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8 - name: Lint with flake8
run: | run: |
# stop the build if there are Python syntax errors or undefined names # stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide # 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 flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest - name: Test with pytest
run: | run: |
pytest pytest

@ -1,3 +1,4 @@
---
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions # This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
@ -5,13 +6,12 @@ name: Python package
on: on:
push: push:
branches: [ "master" ] branches: ["master"]
pull_request: pull_request:
branches: [ "master" ] branches: ["master"]
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
fail-fast: false fail-fast: false
@ -19,23 +19,23 @@ jobs:
python-version: ["3.7", "3.9", "3.10", "3.11"] python-version: ["3.7", "3.9", "3.10", "3.11"]
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }} - name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5 uses: actions/setup-python@v5
with: with:
python-version: ${{ matrix.python-version }} python-version: ${{ matrix.python-version }}
- name: Install dependencies - name: Install dependencies
run: | run: |
python -m pip install --upgrade pip python -m pip install --upgrade pip
python -m pip install --upgrade swarms python -m pip install --upgrade swarms
python -m pip install flake8 pytest swarms python -m pip install flake8 pytest swarms
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8 - name: Lint with flake8
run: | run: |
# stop the build if there are Python syntax errors or undefined names # stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide # 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 flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest - name: Test with pytest
run: | run: |
pytest pytest

@ -1,6 +1,7 @@
---
name: Upload Python Package name: Upload Python Package
on: # yamllint disable-line rule:truthy on:
release: release:
types: [published] types: [published]
@ -9,7 +10,6 @@ permissions:
jobs: jobs:
deploy: deploy:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
@ -17,7 +17,7 @@ jobs:
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v5 uses: actions/setup-python@v5
with: with:
python-version: '3.x' python-version: "3.x"
- name: Install dependencies - name: Install dependencies
run: | run: |
python -m pip install --upgrade pip python -m pip install --upgrade pip

@ -1,3 +1,4 @@
---
# This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time. # This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time.
# #
# You can adjust the behavior by modifying this file. # You can adjust the behavior by modifying this file.
@ -7,21 +8,20 @@ name: Mark stale issues and pull requests
on: on:
schedule: schedule:
- cron: '26 12 * * *' - cron: "26 12 * * *"
jobs: jobs:
stale: stale:
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions: permissions:
issues: write issues: write
pull-requests: write pull-requests: write
steps: steps:
- uses: actions/stale@v9 - uses: actions/stale@v9
with: with:
repo-token: ${{ secrets.GITHUB_TOKEN }} repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'Stale issue message' stale-issue-message: "Stale issue message"
stale-pr-message: 'Stale pull request message' stale-pr-message: "Stale pull request message"
stale-issue-label: 'no-issue-activity' stale-issue-label: "no-issue-activity"
stale-pr-label: 'no-pr-activity' stale-pr-label: "no-pr-activity"

@ -1,3 +1,4 @@
---
# This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time. # This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time.
# #
# You can adjust the behavior by modifying this file. # You can adjust the behavior by modifying this file.
@ -7,43 +8,41 @@ name: Mark stale issues and pull requests
on: on:
schedule: schedule:
# Scheduled to run at 1.30 UTC everyday # Scheduled to run at 1.30 UTC everyday
- cron: '30 1 * * *' - cron: "30 1 * * *"
jobs: jobs:
stale: stale:
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions: permissions:
issues: write issues: write
pull-requests: write pull-requests: write
steps: steps:
- uses: actions/stale@v9 - uses: actions/stale@v9
with: with:
repo-token: ${{ secrets.GITHUB_TOKEN }} repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-issue-stale: 14 days-before-issue-stale: 14
days-before-issue-close: 14 days-before-issue-close: 14
stale-issue-label: "status:stale" stale-issue-label: "status:stale"
close-issue-reason: not_planned close-issue-reason: not_planned
any-of-labels: "status:awaiting user response,status:more data needed" any-of-labels: "status:awaiting user response,status:more data needed"
stale-issue-message: > stale-issue-message: >
Marking this issue as stale since it has been open for 14 days with no activity. Marking this issue as stale since it has been open for 14 days with no activity.
This issue will be closed if no further activity occurs. This issue will be closed if no further activity occurs.
close-issue-message: > close-issue-message: >
This issue was closed because it has been inactive for 28 days. This issue was closed because it has been inactive for 28 days.
Please post a new issue if you need further assistance. Thanks! Please post a new issue if you need further assistance. Thanks!
days-before-pr-stale: 14 days-before-pr-stale: 14
days-before-pr-close: 14 days-before-pr-close: 14
stale-pr-label: "status:stale" stale-pr-label: "status:stale"
stale-pr-message: > stale-pr-message: >
Marking this pull request as stale since it has been open for 14 days with no activity. Marking this pull request as stale since it has been open for 14 days with no activity.
This PR will be closed if no further activity occurs. This PR will be closed if no further activity occurs.
close-pr-message: > close-pr-message: >
This pull request was closed because it has been inactive for 28 days. This pull request was closed because it has been inactive for 28 days.
Please open a new pull request if you need further assistance. Thanks! Please open a new pull request if you need further assistance. Thanks!
# Label that can be assigned to issues to exclude them from being marked as stale # Label that can be assigned to issues to exclude them from being marked as stale
exempt-issue-labels: 'override-stale' exempt-issue-labels: "override-stale"
# Label that can be assigned to PRs to exclude them from being marked as stale # Label that can be assigned to PRs to exclude them from being marked as stale
exempt-pr-labels: "override-stale" exempt-pr-labels: "override-stale"

@ -1,3 +1,4 @@
---
name: test name: test
on: on:
@ -30,14 +31,13 @@ jobs:
python-version: ${{ matrix.python-version }} python-version: ${{ matrix.python-version }}
poetry-version: "1.4.2" poetry-version: "1.4.2"
cache-key: ${{ matrix.test_type }} cache-key: ${{ matrix.test_type }}
install-command: install-command: if [ "${{ matrix.test_type }}" == "core" ]; then
if [ "${{ matrix.test_type }}" == "core" ]; then echo "Running core tests, installing dependencies with poetry..."
echo "Running core tests, installing dependencies with poetry..." poetry install
poetry install else
else echo "Running extended tests, installing dependencies with poetry..."
echo "Running extended tests, installing dependencies with poetry..." poetry install -E extended_testing
poetry install -E extended_testing fi
fi
- name: Run ${{matrix.test_type}} tests - name: Run ${{matrix.test_type}} tests
run: | run: |
if [ "${{ matrix.test_type }}" == "core" ]; then if [ "${{ matrix.test_type }}" == "core" ]; then
@ -46,9 +46,8 @@ jobs:
make extended_tests make extended_tests
fi fi
shell: bash shell: bash
name: Python ${{ matrix.python-version }} ${{ matrix.test_type }} - name: Python ${{ matrix.python-version }} ${{ matrix.test_type }}
steps: uses: actions/checkout@v4
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }} - name: Set up Python ${{ matrix.python-version }}
uses: "./.github/actions/poetry_setup" uses: "./.github/actions/poetry_setup"
with: with:
@ -56,13 +55,13 @@ jobs:
poetry-version: "1.4.2" poetry-version: "1.4.2"
cache-key: ${{ matrix.test_type }} cache-key: ${{ matrix.test_type }}
install-command: | install-command: |
if [ "${{ matrix.test_type }}" == "core" ]; then if [ "${{ matrix.test_type }}" == "core" ]; then
echo "Running core tests, installing dependencies with poetry..." echo "Running core tests, installing dependencies with poetry..."
poetry install poetry install
else else
echo "Running extended tests, installing dependencies with poetry..." echo "Running extended tests, installing dependencies with poetry..."
poetry install -E extended_testing poetry install -E extended_testing
fi fi
- name: Run ${{matrix.test_type}} tests - name: Run ${{matrix.test_type}} tests
run: | run: |
if [ "${{ matrix.test_type }}" == "core" ]; then if [ "${{ matrix.test_type }}" == "core" ]; then
@ -93,13 +92,13 @@ jobs:
poetry-version: "1.4.2" poetry-version: "1.4.2"
cache-key: ${{ matrix.test_type }} cache-key: ${{ matrix.test_type }}
install-command: | install-command: |
if [ "${{ matrix.test_type }}" == "core" ]; then if [ "${{ matrix.test_type }}" == "core" ]; then
echo "Running core tests, installing dependencies with poetry..." echo "Running core tests, installing dependencies with poetry..."
poetry install poetry install
else else
echo "Running extended tests, installing dependencies with poetry..." echo "Running extended tests, installing dependencies with poetry..."
poetry install -E extended_testing poetry install -E extended_testing
fi fi
- name: Run ${{matrix.test_type}} tests - name: Run ${{matrix.test_type}} tests
run: | run: |
if [ "${{ matrix.test_type }}" == "core" ]; then if [ "${{ matrix.test_type }}" == "core" ]; then

@ -1,3 +1,4 @@
---
# Notebook-related checks # Notebook-related checks
name: Presubmit checks name: Presubmit checks
@ -6,8 +7,8 @@ on:
# Relevant PRs # Relevant PRs
pull_request: pull_request:
paths: paths:
- "swarms/**" - "swarms/**"
- "tests/**" - "tests/**"
# Allow manual runs # Allow manual runs
workflow_dispatch: workflow_dispatch:
@ -16,66 +17,66 @@ jobs:
name: Test Py3.11 name: Test Py3.11
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/setup-python@v5 - uses: actions/setup-python@v5
with: with:
python-version: '3.11' python-version: "3.11"
- name: Run tests - name: Run tests
run: | run: |
python --version python --version
pip install .[dev] pip install .[dev]
python -m pytest python -m pytest
test3_10: test3_10:
name: Test Py3.10 name: Test Py3.10
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/setup-python@v5 - uses: actions/setup-python@v5
with: with:
python-version: '3.10' python-version: "3.10"
- name: Run tests - name: Run tests
run: | run: |
python --version python --version
pip install -q .[dev] pip install -q .[dev]
python -m pytest python -m pytest
test3_9: test3_9:
name: Test Py3.9 name: Test Py3.9
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/setup-python@v5 - uses: actions/setup-python@v5
with: with:
python-version: '3.9' python-version: "3.9"
- name: Run tests - name: Run tests
run: | run: |
python --version python --version
pip install .[dev] pip install .[dev]
python -m pytest python -m pytest
pytype3_10: pytype3_10:
name: pytype 3.10 name: pytype 3.10
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/setup-python@v5 - uses: actions/setup-python@v5
with: with:
python-version: '3.10' python-version: "3.10"
- name: Run pytype - name: Run pytype
run: | run: |
python --version python --version
pip install .[dev] pip install .[dev]
pip install -q gspread ipython pip install -q gspread ipython
pytype pytype
format: format:
name: Check format with black name: Check format with black
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/setup-python@v5 - uses: actions/setup-python@v5
with: with:
python-version: '3.11' python-version: "3.11"
- name: Check format - name: Check format
run: | run: |
python --version python --version
pip install -q . pip install -q .
pip install -q black pip install -q black
black . --check black . --check

@ -1,3 +1,4 @@
---
name: Unit Tests name: Unit Tests
on: on:

@ -1,36 +1,35 @@
---
name: build name: build
on: on:
push: push:
branches: [ main ] branches: [main]
pull_request: pull_request:
branches: [ main ] branches: [main]
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Setup Python - name: Setup Python
uses: actions/setup-python@v5 uses: actions/setup-python@v5
with: with:
python-version: '3.9' python-version: "3.9"
- name: Install dependencies - name: Install dependencies
run: | run: |
pip install -r requirements.txt pip install -r requirements.txt
pip install pytest pip install pytest
pip install swarms pip install swarms
- name: Run Python unit tests - name: Run Python unit tests
run: pytest run: pytest
- name: Verify that the Docker image for the action builds - name: Verify that the Docker image for the action builds
run: docker build . --file Dockerfile run: docker build . --file Dockerfile
- name: Verify integration test results - name: Verify integration test results
run: pytest run: pytest

@ -1,3 +1,4 @@
---
name: Welcome WorkAgent name: Welcome WorkAgent
on: on:
@ -15,5 +16,9 @@ jobs:
- uses: actions/first-interaction@v1.3.0 - uses: actions/first-interaction@v1.3.0
with: with:
repo-token: ${{ secrets.GITHUB_TOKEN }} repo-token: ${{ secrets.GITHUB_TOKEN }}
issue-message: "Hello there, thank you for opening an Issue ! 🙏🏻 The team was notified and they will get back to you asap." issue-message: >-
pr-message: "Hello there, thank you for opening an PR ! 🙏🏻 The team was notified and they will get back to you asap." Hello there, thank you for opening an Issue ! 🙏🏻
The team was notified and they will get back to you asap.
pr-message: >-
Hello there, thank you for opening an PR ! 🙏🏻
The team was notified and they will get back to you asap.

@ -1,18 +1,19 @@
---
repos: repos:
- repo: https://github.com/ambv/black - repo: https://github.com/ambv/black
rev: 22.3.0 rev: 22.3.0
hooks: hooks:
- id: black - id: black
- repo: https://github.com/charliermarsh/ruff-pre-commit - repo: https://github.com/charliermarsh/ruff-pre-commit
rev: 'v0.0.255' rev: "v0.0.255"
hooks: hooks:
- id: ruff - id: ruff
args: [----unsafe-fixes] args: [----unsafe-fixes]
- repo: https://github.com/nbQA-dev/nbQA - repo: https://github.com/nbQA-dev/nbQA
rev: 1.6.3 rev: 1.6.3
hooks: hooks:
- id: nbqa-black - id: nbqa-black
additional_dependencies: [ipython==8.12, black] additional_dependencies: [ipython==8.12, black]
- id: nbqa-ruff - id: nbqa-ruff
args: ["--ignore=I001"] args: ["--ignore=I001"]
additional_dependencies: [ipython==8.12, ruff] additional_dependencies: [ipython==8.12, ruff]

@ -1,3 +1,4 @@
---
version: 2 version: 2
build: build:
@ -9,5 +10,5 @@ mkdocs:
configuration: mkdocs.yml configuration: mkdocs.yml
python: python:
install: install:
- requirements: requirements.txt - requirements: requirements.txt

@ -0,0 +1,9 @@
---
extends: default
rules:
line-length:
max: 127
truthy:
# GitHub Actions
check-keys: false

@ -1,3 +1,4 @@
---
site_name: Swarms Docs site_name: Swarms Docs
plugins: plugins:
- glightbox - glightbox
@ -16,11 +17,11 @@ extra:
- icon: fontawesome/brands/python - icon: fontawesome/brands/python
link: https://pypi.org/project/Swarms/ link: https://pypi.org/project/Swarms/
theme: theme:
name: material name: material
custom_dir: docs/overrides custom_dir: docs/overrides
logo: assets/img/SwarmsLogoIcon.png logo: assets/img/SwarmsLogoIcon.png
palette: palette:
# Palette toggle for light mode # Palette toggle for light mode
- scheme: default - scheme: default
primary: black primary: black
toggle: toggle:
@ -32,14 +33,14 @@ theme:
toggle: toggle:
icon: material/brightness-4 icon: material/brightness-4
name: Switch to light mode name: Switch to light mode
features: features:
- content.code.copy - content.code.copy
- content.code.annotate - content.code.annotate
- navigation.tabs - navigation.tabs
- navigation.sections - navigation.sections
- navigation.expand - navigation.expand
- navigation.top - navigation.top
- announce.dismiss - announce.dismiss
markdown_extensions: markdown_extensions:
- pymdownx.highlight: - pymdownx.highlight:
anchor_linenums: true anchor_linenums: true
@ -55,126 +56,126 @@ markdown_extensions:
- def_list - def_list
- footnotes - footnotes
nav: nav:
- Home: - Home:
- Overview: "index.md" - Overview: "index.md"
- Contributing: "contributing.md" - Contributing: "contributing.md"
- Swarms: - Swarms:
- Overview: "swarms/index.md" - Overview: "swarms/index.md"
- swarms.agents: - swarms.agents:
- Agents: - Agents:
- WorkerAgent: "swarms/agents/workeragent.md" - WorkerAgent: "swarms/agents/workeragent.md"
- OmniAgent: "swarms/agents/omni_agent.md" - OmniAgent: "swarms/agents/omni_agent.md"
- AbstractAgent: "swarms/agents/abstractagent.md" - AbstractAgent: "swarms/agents/abstractagent.md"
- ToolAgent: "swarms/agents/toolagent.md" - ToolAgent: "swarms/agents/toolagent.md"
- swarms.models: - swarms.models:
- Language: - Language:
- BaseLLM: "swarms/models/base_llm.md" - BaseLLM: "swarms/models/base_llm.md"
- Overview: "swarms/models/index.md" - Overview: "swarms/models/index.md"
- HuggingFaceLLM: "swarms/models/huggingface.md" - HuggingFaceLLM: "swarms/models/huggingface.md"
- Anthropic: "swarms/models/anthropic.md" - Anthropic: "swarms/models/anthropic.md"
- OpenAI: "swarms/models/openai.md" - OpenAI: "swarms/models/openai.md"
- Zephyr: "swarms/models/zephyr.md" - Zephyr: "swarms/models/zephyr.md"
- BioGPT: "swarms/models/biogpt.md" - BioGPT: "swarms/models/biogpt.md"
- vLLM: "swarms/models/vllm.md" - vLLM: "swarms/models/vllm.md"
- MPT7B: "swarms/models/mpt.md" - MPT7B: "swarms/models/mpt.md"
- Mistral: "swarms/models/mistral.md" - Mistral: "swarms/models/mistral.md"
- Mixtral: "swarms/models/mixtral.md" - Mixtral: "swarms/models/mixtral.md"
- MultiModal: - MultiModal:
- BaseMultiModalModel: "swarms/models/base_multimodal_model.md" - BaseMultiModalModel: "swarms/models/base_multimodal_model.md"
- Fuyu: "swarms/models/fuyu.md" - Fuyu: "swarms/models/fuyu.md"
- Vilt: "swarms/models/vilt.md" - Vilt: "swarms/models/vilt.md"
- Idefics: "swarms/models/idefics.md" - Idefics: "swarms/models/idefics.md"
- BingChat: "swarms/models/bingchat.md" - BingChat: "swarms/models/bingchat.md"
- Kosmos: "swarms/models/kosmos.md" - Kosmos: "swarms/models/kosmos.md"
- Nougat: "swarms/models/nougat.md" - Nougat: "swarms/models/nougat.md"
- Dalle3: "swarms/models/dalle3.md" - Dalle3: "swarms/models/dalle3.md"
- GPT4V: "swarms/models/gpt4v.md" - GPT4V: "swarms/models/gpt4v.md"
- LayoutLMDocumentQA: "swarms/models/layoutlm_document_qa.md" - LayoutLMDocumentQA: "swarms/models/layoutlm_document_qa.md"
- DistilWhisperModel: "swarms/models/distilled_whisperx.md" - DistilWhisperModel: "swarms/models/distilled_whisperx.md"
- ElevenLabsText2SpeechTool: "swarms/models/elevenlabs.md" - ElevenLabsText2SpeechTool: "swarms/models/elevenlabs.md"
- OpenAITTS: "swarms/models/openai_tts.md" - OpenAITTS: "swarms/models/openai_tts.md"
- Gemini: "swarms/models/gemini.md" - Gemini: "swarms/models/gemini.md"
- ZeroscopeTTV: "swarms/models/zeroscope.md" - ZeroscopeTTV: "swarms/models/zeroscope.md"
- swarms.structs: - swarms.structs:
- Foundational Structures: - Foundational Structures:
- agent: "swarms/structs/agent.md" - agent: "swarms/structs/agent.md"
- basestructure: "swarms/structs/basestructure.md" - basestructure: "swarms/structs/basestructure.md"
- artifactupload: "swarms/structs/artifactupload.md" - artifactupload: "swarms/structs/artifactupload.md"
- taskinput: "swarms/structs/taskinput.md" - taskinput: "swarms/structs/taskinput.md"
- stepinput: "swarms/structs/stepinput.md" - stepinput: "swarms/structs/stepinput.md"
- artifact: "swarms/structs/artifact.md" - artifact: "swarms/structs/artifact.md"
- task: "swarms/structs/task.md" - task: "swarms/structs/task.md"
- Task Queue Base: "swarms/structs/taskqueuebase.md" - Task Queue Base: "swarms/structs/taskqueuebase.md"
- Workflows: - Workflows:
- recursiveworkflow: "swarms/structs/recursiveworkflow.md" - recursiveworkflow: "swarms/structs/recursiveworkflow.md"
- concurrentworkflow: "swarms/structs/concurrentworkflow.md" - concurrentworkflow: "swarms/structs/concurrentworkflow.md"
- nonlinearworkflow: "swarms/structs/nonlinearworkflow.md" - nonlinearworkflow: "swarms/structs/nonlinearworkflow.md"
- sequential_workflow: "swarms/structs/sequential_workflow.md" - sequential_workflow: "swarms/structs/sequential_workflow.md"
- workflow: "swarms/structs/workflow.md" - workflow: "swarms/structs/workflow.md"
- baseworkflow: "swarms/structs/baseworkflow.md" - baseworkflow: "swarms/structs/baseworkflow.md"
- Multi Agent Architectures: - Multi Agent Architectures:
- conversation: "swarms/structs/conversation.md" - conversation: "swarms/structs/conversation.md"
- groupchat: "swarms/structs/groupchat.md" - groupchat: "swarms/structs/groupchat.md"
- swarmnetwork: "swarms/structs/swarmnetwork.md" - swarmnetwork: "swarms/structs/swarmnetwork.md"
- groupchatmanager: "swarms/structs/groupchatmanager.md" - groupchatmanager: "swarms/structs/groupchatmanager.md"
- MajorityVoting: "swarms/structs/majorityvoting.md" - MajorityVoting: "swarms/structs/majorityvoting.md"
- swarms.tokenizers: - swarms.tokenizers:
- Language: - Language:
- Tokenizer: "swarms/tokenizers/tokenizer.md" - Tokenizer: "swarms/tokenizers/tokenizer.md"
- CohereTokenizer: "swarms/tokenizers/coheretokenizer.md" - CohereTokenizer: "swarms/tokenizers/coheretokenizer.md"
- BaseTokenizer: "swarms/tokenizers/basetokenizer.md" - BaseTokenizer: "swarms/tokenizers/basetokenizer.md"
- HuggingfaceTokenizer: "swarms/tokenizers/huggingfacetokenizer.md" - HuggingfaceTokenizer: "swarms/tokenizers/huggingfacetokenizer.md"
- SentencepieceTokenizer: "swarms/tokenizers/sentencepiecetokenizer.md" - SentencepieceTokenizer: "swarms/tokenizers/sentencepiecetokenizer.md"
- AnthropicTokenizer: "swarms/tokenizers/anthropictokenizer.md" - AnthropicTokenizer: "swarms/tokenizers/anthropictokenizer.md"
- OpenaiTokenizer: "swarms/tokenizers/openaitokenizer.md" - OpenaiTokenizer: "swarms/tokenizers/openaitokenizer.md"
- swarms.memory: - swarms.memory:
- Vector Databases: - Vector Databases:
- Weaviate: "swarms/memory/weaviate.md" - Weaviate: "swarms/memory/weaviate.md"
- PineconeDB: "swarms/memory/pinecone.md" - PineconeDB: "swarms/memory/pinecone.md"
- PGVectorStore: "swarms/memory/pg.md" - PGVectorStore: "swarms/memory/pg.md"
- ShortTermMemory: "swarms/memory/short_term_memory.md" - ShortTermMemory: "swarms/memory/short_term_memory.md"
- swarms.utils: - swarms.utils:
- Misc: - Misc:
- pdf_to_text: "swarms/utils/pdf_to_text.md" - pdf_to_text: "swarms/utils/pdf_to_text.md"
- load_model_torch: "swarms/utils/load_model_torch.md" - load_model_torch: "swarms/utils/load_model_torch.md"
- metrics_decorator: "swarms/utils/metrics_decorator.md" - metrics_decorator: "swarms/utils/metrics_decorator.md"
- prep_torch_inference: "swarms/utils/prep_torch_inference.md" - prep_torch_inference: "swarms/utils/prep_torch_inference.md"
- find_image_path: "swarms/utils/find_image_path.md" - find_image_path: "swarms/utils/find_image_path.md"
- print_class_parameters: "swarms/utils/print_class_parameters.md" - print_class_parameters: "swarms/utils/print_class_parameters.md"
- extract_code_from_markdown: "swarms/utils/extract_code_from_markdown.md" - extract_code_from_markdown: "swarms/utils/extract_code_from_markdown.md"
- check_device: "swarms/utils/check_device.md" - check_device: "swarms/utils/check_device.md"
- display_markdown_message: "swarms/utils/display_markdown_message.md" - display_markdown_message: "swarms/utils/display_markdown_message.md"
- phoenix_tracer: "swarms/utils/phoenix_tracer.md" - phoenix_tracer: "swarms/utils/phoenix_tracer.md"
- limit_tokens_from_string: "swarms/utils/limit_tokens_from_string.md" - limit_tokens_from_string: "swarms/utils/limit_tokens_from_string.md"
- math_eval: "swarms/utils/math_eval.md" - math_eval: "swarms/utils/math_eval.md"
- Guides: - Guides:
- Overview: "examples/index.md" - Overview: "examples/index.md"
- Agents: - Agents:
- Agent: "examples/flow.md" - Agent: "examples/flow.md"
- OmniAgent: "examples/omni_agent.md" - OmniAgent: "examples/omni_agent.md"
- Swarms: - Swarms:
- SequentialWorkflow: "examples/reliable_autonomous_agents.md" - SequentialWorkflow: "examples/reliable_autonomous_agents.md"
- 2O+ Autonomous Agent Blogs: "examples/ideas.md" - 2O+ Autonomous Agent Blogs: "examples/ideas.md"
- Applications: - Applications:
- CustomerSupport: - CustomerSupport:
- Overview: "applications/customer_support.md" - Overview: "applications/customer_support.md"
- Marketing: - Marketing:
- Overview: "applications/marketing_agencies.md" - Overview: "applications/marketing_agencies.md"
- Corporate: - Corporate:
- FAQ: "corporate/faq.md" - FAQ: "corporate/faq.md"
- Purpose: "corporate/purpose.md" - Purpose: "corporate/purpose.md"
- Roadmap: "corporate/roadmap.md" - Roadmap: "corporate/roadmap.md"
- Weaknesses: "corporate/failures.md" - Weaknesses: "corporate/failures.md"
- Design: "corporate/design.md" - Design: "corporate/design.md"
- Flywheel: "corporate/flywheel.md" - Flywheel: "corporate/flywheel.md"
- Bounties: "corporate/bounties.md" - Bounties: "corporate/bounties.md"
- Metric: "corporate/metric.md" - Metric: "corporate/metric.md"
- Distribution: "corporate/distribution" - Distribution: "corporate/distribution"
- Research: "corporate/research.md" - Research: "corporate/research.md"
- Demos: "corporate/demos.md" - Demos: "corporate/demos.md"
- Architecture: "corporate/architecture.md" - Architecture: "corporate/architecture.md"
- Checklist: "corporate/checklist.md" - Checklist: "corporate/checklist.md"
- Hiring: "corporate/hiring.md" - Hiring: "corporate/hiring.md"
- SwarmCloud: "corporate/swarm_cloud.md" - SwarmCloud: "corporate/swarm_cloud.md"
- SwarmMemo: "corporate/swarm_memo.md" - SwarmMemo: "corporate/swarm_memo.md"
- Data Room: "corporate/data_room.md" - Data Room: "corporate/data_room.md"

Loading…
Cancel
Save