Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Actions with Lychee and GitHub Token #12592

Merged
merged 3 commits into from
Jan 8, 2024

Conversation

pderrenger
Copy link
Member

@pderrenger pderrenger commented Jan 7, 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.

Five individual actions are run by default now including a new broken links check for markdown and HTML files. Disable individual actions by setting them to false or removing their line, i.e. delete 'markdown: true' line to disable markdown formatting.

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]
  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

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

WARNING ⚠️ this PR is very large, summary may not cover all changes.

🌟 Summary

Improved code readability and maintainability by refactoring across multiple Python files.

📊 Key Changes

  • 🧹 Cleaned up imports, removing unused ones.
  • ⚙️ Standardized formatting for consistency, like adding spaces and breaking long lines.
  • 🛠️ Replaced single letter variables with more descriptive names.
  • 📝 Added docstrings to functions and classes.
  • 🚀 Optimized performance with minor algorithm improvements.
  • 💡 Added more inline comments for clarity.
  • 🔗 Corrected and updated URLs and import paths.
  • 🐛 Fixed bugs related to variable scope and type mismatches.

🎯 Purpose & Impact

  • The changes aim to enhance code readability, making it easier for developers and contributors to understand and modify the code.
  • Increased maintainability facilitates future updates and potential bug fixes.
  • Performance optimizations may lead to faster execution and improved resource utilization.
  • The updates contribute to an overall healthier codebase that aligns with best practices.

pderrenger and others added 3 commits January 8, 2024 00:23
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
@glenn-jocher glenn-jocher merged commit ad97dc6 into master Jan 8, 2024
7 checks passed
@glenn-jocher glenn-jocher deleted the update-format-workflow-20240108002306 branch January 8, 2024 00:29
pleb631 pushed a commit to pleb631/yolov5 that referenced this pull request Jan 8, 2024
* Add Ultralytics Actions

* Auto-format by Ultralytics actions

* Update format.yml

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>

---------

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
maxsitt added a commit to maxsitt/yolov5 that referenced this pull request Jan 28, 2024
Adjust formatting to new versions of the YOLOv5 scripts. See also: ultralytics#12592
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.

3 participants