Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
code

GitHub Action

Ultralytics Actions

v0.0.1

Ultralytics Actions

code

Ultralytics Actions

Optimize code and docs with official Ultralytics Actions for syntax, spelling, and link checks

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Ultralytics Actions

uses: ultralytics/actions@v0.0.1

Learn more about this action in ultralytics/actions

Choose a version


๐Ÿš€ Ultralytics Actions: Auto-Formatting for Python and Markdown

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

Ultralytics Actions

๐Ÿ“„ Actions Description

Ultralytics Actions automatically applies formats and updates:

  • Python Code: Using Ruff, a fast Python auto-formatter.
  • Markdown Files: With mdformat, ensuring a consistent style in documentation.
  • Docstrings: Utilizing docformatter for clean and standardized documentation comments.
  • Spell Check: Employing codespell for catching common misspellings.
  • Broken Links Check: Implementing Lychee to report broken links in docs and markdown files.

๐Ÿ›  How It Works

Upon integration, Ultralytics Actions triggers on:

  • Push Events: Automatically formats code when changes are pushed to the main branch.
  • Pull Requests: Ensures that contributions meet our formatting standards before merging.

๐Ÿ”ง 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., format-code.yml.
  2. Add the Action: Use the Ultralytics Actions in your workflow file as follows:
    name: Ultralytics Actions
    
    on:
      push:
        branches: [main]
      pull_request_target:
        branches: [main]
    
    jobs:
      format:
        runs-on: ubuntu-latest
        steps:
          - name: Run Ultralytics Formatting
            uses: ultralytics/actions@main
            with:
              token: ${{ secrets.GITHUB_TOKEN }}  # automatically generated
              python: true
              docstrings: true
              markdown: true
              spelling: true
              links: true
  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 Instagram space Ultralytics Discord