From 2deab5d802d8b71d282c4cb17d1a8488ecb489eb Mon Sep 17 00:00:00 2001 From: Wyatt Stanke Date: Fri, 12 Apr 2024 15:59:42 -0400 Subject: [PATCH] YAML DONE! --- .github/FUNDING.yml | 1 + .github/action.yml | 4 +++- .github/dependabot.yml | 1 + .github/labeler.yml | 1 + .github/library/setup/action.yml | 4 +++- .github/workflows/RELEASE.yml | 1 + .github/workflows/codacy.yml | 6 ++++-- .github/workflows/codeql.yml | 11 ++++++----- .github/workflows/cron_job_tests.yml | 1 + .github/workflows/docs.yml | 1 + .github/workflows/label.yml | 1 + .github/workflows/lint.yml | 1 + .github/workflows/pr_labeler.yml | 1 + .github/workflows/pr_request_checks.yml | 4 +++- .github/workflows/pull-request-links.yml | 1 + .github/workflows/pylint.yml | 1 + .github/workflows/python-app.yml | 1 + .github/workflows/python-package.yml | 1 + .github/workflows/python-publish.yml | 1 + .github/workflows/run_examples.yml | 1 + .github/workflows/stale.yml | 1 + .github/workflows/stale_issue.yml | 13 +++++++++---- .github/workflows/test.yml | 6 +++++- .github/workflows/test_pr.yml | 1 + .github/workflows/testing.yml | 1 + .github/workflows/unit-test.yml | 1 + .github/workflows/welcome.yml | 7 +++++-- .pre-commit-config.yaml | 1 + .readthedocs.yml | 1 + .yamlfmt.yaml | 2 ++ .yamllint.yaml | 3 +++ mkdocs.yml | 1 + 32 files changed, 65 insertions(+), 17 deletions(-) create mode 100644 .yamllint.yaml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 4203b99b..17d44f5d 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,3 +1,4 @@ +--- # These are supported funding model platforms github: [kyegomez] # patreon: # Replace with a single Patreon username diff --git a/.github/action.yml b/.github/action.yml index dd40a722..a4477583 100644 --- a/.github/action.yml +++ b/.github/action.yml @@ -1,3 +1,4 @@ +--- name: "Init Environment" description: "Initialize environment for tests" runs: @@ -20,7 +21,8 @@ runs: uses: actions/cache@v3 with: 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 if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' run: poetry install --no-interaction --no-root --with test --with dev --all-extras diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 6b10ed04..3b365943 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 updates: diff --git a/.github/labeler.yml b/.github/labeler.yml index 05bdfe5b..5b3c064a 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -1,3 +1,4 @@ +--- # this is a config file for the github action labeler # Add 'label1' to any changes within 'example' folder or any subfolders diff --git a/.github/library/setup/action.yml b/.github/library/setup/action.yml index faf529c5..1e0e9999 100644 --- a/.github/library/setup/action.yml +++ b/.github/library/setup/action.yml @@ -1,3 +1,4 @@ +--- name: "Setup environment" description: "Setup environment for the CI" runs: @@ -13,7 +14,8 @@ runs: poetry config virtualenvs.in-project true --local shell: bash - uses: actions/cache@v3 - name: Define a cache for the virtual environment based on the dependencies lock file + name: Define a cache for the virtual environment + file with: path: ./.venv key: venv-${{ hashFiles('poetry.lock') }} diff --git a/.github/workflows/RELEASE.yml b/.github/workflows/RELEASE.yml index eb3619b3..c6150561 100644 --- a/.github/workflows/RELEASE.yml +++ b/.github/workflows/RELEASE.yml @@ -1,3 +1,4 @@ +--- name: release on: pull_request: diff --git a/.github/workflows/codacy.yml b/.github/workflows/codacy.yml index c04900b8..b3f4315e 100644 --- a/.github/workflows/codacy.yml +++ b/.github/workflows/codacy.yml @@ -1,3 +1,4 @@ +--- # This workflow uses actions that are not certified by GitHub. # They are provided by a third-party and are governed by # separate terms of service, privacy policy, and support @@ -19,7 +20,7 @@ on: # The branches below must be a subset of the branches above branches: ["master"] schedule: - - cron: '18 23 * * 4' + - cron: "18 23 * * 4" permissions: contents: read jobs: @@ -38,7 +39,8 @@ jobs: - name: Run Codacy Analysis CLI uses: codacy/codacy-analysis-cli-action@33d455949345bddfdb845fba76b57b70cc83754b 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 project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} verbose: true diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 7881eaed..9ade6f78 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -1,3 +1,4 @@ +--- # For most projects, this workflow file will not need changing; you simply need # to commit it to your repository. # @@ -26,7 +27,9 @@ jobs: # - https://gh.io/supported-runners-and-hardware-resources # - https://gh.io/using-larger-runners # Consider using larger runners for possible analysis time improvements. - runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} + runs-on: + ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' + }} timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }} permissions: actions: read @@ -54,13 +57,9 @@ jobs: # 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 - # 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 # queries: security-extended,security-and-quality uses: github/codeql-action/autobuild@v3 - # If the Autobuild fails above, remove it and uncomment the following three lines. - # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. - # - run: | # echo "Run, Build Application using script" # ./location_of_script_within_repo/buildscript.sh @@ -68,6 +67,8 @@ jobs: # ℹī¸ Command-line programs to run using the OS shell. # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun + # If the Autobuild fails above, remove it and uncomment the following three lines. + # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. uses: github/codeql-action/analyze@v3 with: category: "/language:${{matrix.language}}" diff --git a/.github/workflows/cron_job_tests.yml b/.github/workflows/cron_job_tests.yml index d91c3cb9..1292a441 100644 --- a/.github/workflows/cron_job_tests.yml +++ b/.github/workflows/cron_job_tests.yml @@ -1,3 +1,4 @@ +--- name: Run pytest on: schedule: diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 321ca45d..b4b08dc4 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -1,3 +1,4 @@ +--- name: Docs WorkAgent on: push: diff --git a/.github/workflows/label.yml b/.github/workflows/label.yml index 62df9dd3..d8ab919c 100644 --- a/.github/workflows/label.yml +++ b/.github/workflows/label.yml @@ -1,3 +1,4 @@ +--- # This workflow will triage pull requests and apply a label based on the # paths that are modified in the pull request. # diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 3453aac0..7c984979 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,3 +1,4 @@ +--- name: Lint on: [push, pull_request] # yamllint disable-line rule:truthy jobs: diff --git a/.github/workflows/pr_labeler.yml b/.github/workflows/pr_labeler.yml index af914dc8..43182dd3 100644 --- a/.github/workflows/pr_labeler.yml +++ b/.github/workflows/pr_labeler.yml @@ -1,3 +1,4 @@ +--- name: "PR Labeler" on: pull_request_target: diff --git a/.github/workflows/pr_request_checks.yml b/.github/workflows/pr_request_checks.yml index 34b77de9..bcd992e9 100644 --- a/.github/workflows/pr_request_checks.yml +++ b/.github/workflows/pr_request_checks.yml @@ -1,3 +1,4 @@ +--- name: Pull Request Checks on: pull_request: @@ -14,7 +15,8 @@ jobs: with: python-version: 3.x - name: Install dependencies - run: "pip install -r requirements.txt\npip install swarms\npip install pytest \n" + run: "pip install -r requirements.txt\npip install swarms\npip install pytest + \n" - name: Run tests and checks run: | pytest diff --git a/.github/workflows/pull-request-links.yml b/.github/workflows/pull-request-links.yml index 96846d2f..b801a86d 100644 --- a/.github/workflows/pull-request-links.yml +++ b/.github/workflows/pull-request-links.yml @@ -1,3 +1,4 @@ +--- name: readthedocs/actions on: pull_request_target: diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml index c9c7ac2f..59eea4f2 100644 --- a/.github/workflows/pylint.yml +++ b/.github/workflows/pylint.yml @@ -1,3 +1,4 @@ +--- name: Pylint on: [push] jobs: diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 5d39cc0f..f6aef90b 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -1,3 +1,4 @@ +--- # 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 diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index b9266b12..943e996a 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -1,3 +1,4 @@ +--- # 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 diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index b6ddeb5f..b4e54559 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -1,3 +1,4 @@ +--- name: Upload Python Package on: # yamllint disable-line rule:truthy release: diff --git a/.github/workflows/run_examples.yml b/.github/workflows/run_examples.yml index 1988948e..73e5eeb1 100644 --- a/.github/workflows/run_examples.yml +++ b/.github/workflows/run_examples.yml @@ -1,3 +1,4 @@ +--- name: Run Examples Script on: push: diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index f43cdfbf..a44aa349 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -1,3 +1,4 @@ +--- # 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. diff --git a/.github/workflows/stale_issue.yml b/.github/workflows/stale_issue.yml index 9bb11d88..47120202 100644 --- a/.github/workflows/stale_issue.yml +++ b/.github/workflows/stale_issue.yml @@ -1,3 +1,4 @@ +--- # 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. @@ -24,19 +25,23 @@ jobs: close-issue-reason: not_planned any-of-labels: "status:awaiting user response,status:more data needed" stale-issue-message: > - 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. + 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. close-issue-message: > - This issue was closed because it has been inactive for 28 days. Please post a new issue if you need further assistance. Thanks! + This issue was closed because it has been inactive for 28 days. Please + post a new issue if you need further assistance. Thanks! days-before-pr-stale: 14 days-before-pr-close: 14 stale-pr-label: "status:stale" stale-pr-message: > - 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. + 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. close-pr-message: > - 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! + 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! # Label that can be assigned to issues to exclude them from being marked as stale exempt-issue-labels: 'override-stale' diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 09b6c51e..bab4f644 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,3 +1,4 @@ +--- name: test on: push: @@ -27,7 +28,10 @@ jobs: 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 + 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 diff --git a/.github/workflows/test_pr.yml b/.github/workflows/test_pr.yml index 56b077b0..1f982dff 100644 --- a/.github/workflows/test_pr.yml +++ b/.github/workflows/test_pr.yml @@ -1,3 +1,4 @@ +--- # Notebook-related checks name: Presubmit checks diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index d4567904..554798ef 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -1,3 +1,4 @@ +--- name: Unit Tests on: push: diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 09b42750..0aa7aeba 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -1,3 +1,4 @@ +--- name: build on: push: diff --git a/.github/workflows/welcome.yml b/.github/workflows/welcome.yml index 978cb5b0..0e13ef36 100644 --- a/.github/workflows/welcome.yml +++ b/.github/workflows/welcome.yml @@ -1,3 +1,4 @@ +--- name: Welcome WorkAgent on: issues: @@ -13,5 +14,7 @@ jobs: - uses: actions/first-interaction@v1.3.0 with: 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." - pr-message: "Hello there, thank you for opening an PR ! 🙏đŸģ The team was notified and they will get back to you asap." + issue-message: "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." diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b7bd5eeb..4db17393 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,3 +1,4 @@ +--- repos: - repo: https://github.com/ambv/black rev: 22.3.0 diff --git a/.readthedocs.yml b/.readthedocs.yml index dc508ab2..26919b99 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -1,3 +1,4 @@ +--- version: 2 build: os: ubuntu-22.04 diff --git a/.yamlfmt.yaml b/.yamlfmt.yaml index 1c326de1..1460034a 100644 --- a/.yamlfmt.yaml +++ b/.yamlfmt.yaml @@ -1,3 +1,5 @@ +--- formatter: + type: basic include_document_start: true max_line_length: 80 diff --git a/.yamllint.yaml b/.yamllint.yaml new file mode 100644 index 00000000..3169f48d --- /dev/null +++ b/.yamllint.yaml @@ -0,0 +1,3 @@ +rules: + line-length: + max: 127 diff --git a/mkdocs.yml b/mkdocs.yml index fa99710d..8e1c702e 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,3 +1,4 @@ +--- site_name: Swarms Docs plugins: - glightbox