Skip to content

Conversation

pderrenger
Copy link
Member

@pderrenger pderrenger commented Jan 28, 2024

This pull request adds an improved Ultralytics Actions workflow to automatically format code and documentation to the new Ultralytics official standards maintained at https://github.com/ultralytics/actions.

Six individual actions are run by default now including a new PR Summary utilizing OpenAI GPT-4. Disable individual actions by setting them to false or removing their line, i.e. delete 'markdown: true' line to disable markdown formatting.

Note that additional spellings have been added to the Ultralytics spelling dictionary and frontmatter is now ignored by markdown formatters per your feedback.

To customize an action use a pyproject.toml file in this repo. For details see https://github.com/ultralytics/actions.

# Ultralytics 🚀 - AGPL-3.0 license
# Ultralytics Actions https://github.com/ultralytics/actions
# This workflow automatically formats code and documentation in PRs to official Ultralytics standards

name: Ultralytics Actions

on:
  push:
    branches: [main,master]
  pull_request:
    branches: [main,master]

jobs:
  format:
    runs-on: ubuntu-latest
    steps:
      - name: Run Ultralytics Formatting
        uses: ultralytics/actions@main
        with:
          token: ${{ secrets.GITHUB_TOKEN }} # automatically generated, do not modify
          python: true # format Python code and docstrings
          markdown: true # format Markdown and YAML
          spelling: true # check spelling
          links: true # check broken links
          summary: true # print PR summary with GPT4 (requires 'openai_api_key' or 'openai_azure_api_key' and 'openai_azure_endpoint')
          openai_azure_api_key: ${{ secrets.OPENAI_AZURE_API_KEY }}
          openai_azure_endpoint: ${{ secrets.OPENAI_AZURE_ENDPOINT }}

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

🌟 Summary

Enhancement of the formatting workflow in GitHub Actions.

📊 Key Changes

  • Removed the commented out openai_api_key option from the formatting workflow file.

🎯 Purpose & Impact

  • 💡 Purpose: The change simplifies the GitHub Actions workflow file by removing an unnecessary commented out line, which could be related to a shift in how Ultralytics handles API keys or a cleanup of unused code.
  • 🔍 Impact: No immediate functionality change for users, but it indicates a potential update in the way Ultralytics manages external API keys, which could affect how automated tasks are performed internally. It also contributes to better code maintenance and readability.

Copy link

codecov bot commented Jan 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (e096edc) 39.33% compared to head (9fa3b8f) 39.33%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7867   +/-   ##
=======================================
  Coverage   39.33%   39.33%           
=======================================
  Files         117      117           
  Lines       14446    14446           
=======================================
  Hits         5683     5683           
  Misses       8763     8763           
Flag Coverage Δ
GPU 39.33% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@glenn-jocher glenn-jocher changed the title Update Ultralytics Actions with OpenAI GPT-4 PR Summary Ultralytics Actions with OpenAI GPT-4 PR Summary Jan 28, 2024
@glenn-jocher glenn-jocher merged commit 18d7ab0 into main Jan 28, 2024
@glenn-jocher glenn-jocher deleted the update-format-workflow-20240128211508 branch January 28, 2024 23:36
gkinman pushed a commit to Octasic/ultralytics that referenced this pull request May 30, 2024
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
puzhiyuan pushed a commit to puzhiyuan/ultralytics that referenced this pull request Oct 18, 2024
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants