Skip to main content

Ultralytics Actions for GitHub automation and PR management.

Project description

Ultralytics logo

🚀 Ultralytics Actions: Auto-Formatting for Python, Markdown, and Swift

Welcome to the Ultralytics Actions repository, your go-to solution for maintaining consistent code quality across Ultralytics Python and Swift projects. This GitHub Action is designed to automate the formatting of Python, Markdown, and Swift files, ensuring adherence to our coding standards.

GitHub Actions Marketplace Ultralytics Actions Discord Ultralytics Forums Ultralytics Reddit

PyPI version Downloads

📄 Actions Description

Ultralytics Actions automatically applies formats, updates, and enhancements:

  • Python Code: Using Ruff, a fast Python auto-formatter.
  • Markdown Files: With Prettier, ensuring a consistent style in documentation.
  • Docstrings: Utilizing docformatter for clean and standardized documentation comments.
  • Swift Code: Formatting Swift files using swift-format to ensure consistent coding style across Swift projects. (Requires macos-latest to run correctly.)
  • Spell Check: Employing codespell for catching common misspellings.
  • Broken Links Check: Implementing Lychee to report broken links in docs and markdown files.
  • PR Summary: Generating concise OpenAI GPT4o-powered PR summaries, enhancing PR clarity.
  • Auto-labeling: Applying relevant labels to issues and pull requests using OpenAI GPT-4o for intelligent categorization.

🛠 How It Works

Ultralytics Actions triggers on various GitHub events:

  • Push Events: Automatically formats code when changes are pushed to the main branch.
  • Pull Requests:
    • Ensures that contributions meet our formatting standards before merging.
    • Generates a concise summary of the changes using GPT-4o.
    • Automatically applies relevant labels using GPT-4o for intelligent categorization.
  • Issues: Automatically applies relevant labels using GPT-4o when new issues are created.

These actions help maintain code quality, improve documentation clarity, and streamline the review process by providing consistent formatting, informative summaries, and appropriate categorization of issues and pull requests.

🔧 Setting Up the Action

To use this action in your Ultralytics repository:

  1. Create a Workflow File: In your repository, create a file under .github/workflows/, e.g., ultralytics-actions.yml.

  2. Add the Action: Use the Ultralytics Actions in your workflow file as follows:

    name: Ultralytics Actions
    
    on:
      issues:
        types: [opened]
      pull_request:
        branches: [main]
        types: [opened, closed]
    
    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
              labels: true # autolabel issues and PRs
              python: true # format Python code and docstrings
              prettier: true # format YAML, JSON, Markdown and CSS
              swift: true # format Swift code (requires 'macos-latest')
              spelling: true # check spelling
              links: true # check broken links
              summary: true # print PR summary with GPT4o (requires 'openai_api_key')
              openai_api_key: # your OpenAI API key
    
  3. Customize: Adjust the workflow settings as necessary for your project.

💡 Contribute

Ultralytics thrives on community collaboration; we immensely value your involvement! We urge you to peruse our Contributing Guide for detailed insights on how you can participate. Don't forget to share your feedback with us by contributing to our Survey. A heartfelt thank you 🙏 goes out to everyone who has already contributed!

Ultralytics open-source contributors

📄 License

Ultralytics presents two distinct licensing paths to accommodate a variety of scenarios:

  • AGPL-3.0 License: This official OSI-approved open-source license is perfectly aligned with the goals of students, enthusiasts, and researchers who believe in the virtues of open collaboration and shared wisdom. Details are available in the LICENSE document.
  • Enterprise License: Tailored for commercial deployment, this license authorizes the unfettered integration of Ultralytics software and AI models within commercial goods and services, without the copyleft stipulations of AGPL-3.0. Should your use case demand an enterprise solution, direct your inquiries to Ultralytics Licensing.

📮 Contact

For bugs or feature suggestions pertaining to Ultralytics, please lodge an issue via GitHub Issues. You're also invited to participate in our Discord community to engage in discussions and seek advice!


Ultralytics GitHub space Ultralytics LinkedIn space Ultralytics Twitter space Ultralytics YouTube space Ultralytics TikTok space Ultralytics BiliBili space Ultralytics Discord

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ultralytics_actions-0.0.18.tar.gz (35.0 kB view details)

Uploaded Source

Built Distribution

ultralytics_actions-0.0.18-py3-none-any.whl (35.8 kB view details)

Uploaded Python 3

File details

Details for the file ultralytics_actions-0.0.18.tar.gz.

File metadata

  • Download URL: ultralytics_actions-0.0.18.tar.gz
  • Upload date:
  • Size: 35.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for ultralytics_actions-0.0.18.tar.gz
Algorithm Hash digest
SHA256 c20b7b2b8ac4536e95a61bdeba892cdbcf3ff318013df711ca530f0c736e28d9
MD5 7221e45bd0d7c1510cfceb504577f65e
BLAKE2b-256 b26ee80e472223526f9a86b358630e7721fb69cc85c33453fdeb4677ef907c4d

See more details on using hashes here.

Provenance

The following attestation bundles were made for ultralytics_actions-0.0.18.tar.gz:

Publisher: GitHub
  • Repository: ultralytics/actions
  • Workflow: publish.yml
Attestations:
  • Statement type: https://in-toto.io/Statement/v1
    • Predicate type: https://docs.pypi.org/attestations/publish/v1
    • Subject name: ultralytics_actions-0.0.18.tar.gz
    • Subject digest: c20b7b2b8ac4536e95a61bdeba892cdbcf3ff318013df711ca530f0c736e28d9
    • Transparency log index: 147317592
    • Transparency log integration time:

File details

Details for the file ultralytics_actions-0.0.18-py3-none-any.whl.

File metadata

File hashes

Hashes for ultralytics_actions-0.0.18-py3-none-any.whl
Algorithm Hash digest
SHA256 8e4e1f2ab829f010252410cab04c1831f6ede87e1d5bf153aac957de6a79c64e
MD5 3dc2dda266da8056365bea0d23ea11a1
BLAKE2b-256 6536ef18211788e5b13c75ad46ee1014becbc34f6b135c5b8143e393c65a3f49

See more details on using hashes here.

Provenance

The following attestation bundles were made for ultralytics_actions-0.0.18-py3-none-any.whl:

Publisher: GitHub
  • Repository: ultralytics/actions
  • Workflow: publish.yml
Attestations:
  • Statement type: https://in-toto.io/Statement/v1
    • Predicate type: https://docs.pypi.org/attestations/publish/v1
    • Subject name: ultralytics_actions-0.0.18-py3-none-any.whl
    • Subject digest: 8e4e1f2ab829f010252410cab04c1831f6ede87e1d5bf153aac957de6a79c64e
    • Transparency log index: 147317594
    • Transparency log integration time:

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page