ultralytics-actions 0.2.0__py3-none-any.whl → 0.2.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of ultralytics-actions might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ultralytics-actions
3
- Version: 0.2.0
3
+ Version: 0.2.2
4
4
  Summary: Ultralytics Actions for GitHub automation and PR management.
5
5
  Author-email: Glenn Jocher <glenn.jocher@ultralytics.com>
6
6
  Maintainer-email: Ultralytics <hello@ultralytics.com>
@@ -30,7 +30,6 @@ Description-Content-Type: text/markdown
30
30
  License-File: LICENSE
31
31
  Requires-Dist: requests>=2.28.1
32
32
  Requires-Dist: ruff>=0.9.1
33
- Requires-Dist: docformatter>=1.7.5
34
33
  Provides-Extra: dev
35
34
  Requires-Dist: pytest; extra == "dev"
36
35
  Requires-Dist: pytest-cov; extra == "dev"
@@ -38,111 +37,160 @@ Dynamic: license-file
38
37
 
39
38
  <a href="https://www.ultralytics.com/"><img src="https://raw.githubusercontent.com/ultralytics/assets/main/logo/Ultralytics_Logotype_Original.svg" width="320" alt="Ultralytics logo"></a>
40
39
 
41
- # 🚀 Ultralytics Actions: AI-powered formatting, labeling & PR summaries for Python and Markdown
40
+ # 🚀 Ultralytics Actions
42
41
 
43
- Welcome to the [Ultralytics Actions](https://github.com/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 and enhancing project maintainability.
42
+ Welcome to [Ultralytics Actions](https://github.com/ultralytics/actions) - a collection of GitHub Actions and Python tools for automating code quality, PR management, and CI/CD workflows across Ultralytics projects.
44
43
 
45
44
  [![GitHub Actions Marketplace](https://img.shields.io/badge/Marketplace-Ultralytics_Actions-blue?style=flat&logo=github)](https://github.com/marketplace/actions/ultralytics-actions)
46
45
 
47
46
  [![Actions CI](https://github.com/ultralytics/actions/actions/workflows/ci.yml/badge.svg)](https://github.com/ultralytics/actions/actions/workflows/ci.yml)
48
47
  [![Ultralytics Actions](https://github.com/ultralytics/actions/actions/workflows/format.yml/badge.svg)](https://github.com/ultralytics/actions/actions/workflows/format.yml)
49
- [![List Open PRs](https://github.com/ultralytics/actions/actions/workflows/open-prs.yml/badge.svg)](https://github.com/ultralytics/actions/actions/workflows/open-prs.yml)
48
+ [![Scan PRs](https://github.com/ultralytics/actions/actions/workflows/scan-prs.yml/badge.svg)](https://github.com/ultralytics/actions/actions/workflows/scan-prs.yml)
50
49
  [![codecov](https://codecov.io/github/ultralytics/actions/graph/badge.svg?token=DoizJ1WS6j)](https://codecov.io/github/ultralytics/actions)
51
50
 
52
51
  [![Ultralytics Discord](https://img.shields.io/discord/1089800235347353640?logo=discord&logoColor=white&label=Discord&color=blue)](https://discord.com/invite/ultralytics)
53
52
  [![Ultralytics Forums](https://img.shields.io/discourse/users?server=https%3A%2F%2Fcommunity.ultralytics.com&logo=discourse&label=Forums&color=blue)](https://community.ultralytics.com/)
54
53
  [![Ultralytics Reddit](https://img.shields.io/reddit/subreddit-subscribers/ultralytics?style=flat&logo=reddit&logoColor=white&label=Reddit&color=blue)](https://reddit.com/r/ultralytics)
55
54
 
56
- ## 📄 Actions Description
57
-
58
- Ultralytics Actions automatically applies formats, updates, and enhancements using a suite of powerful tools:
59
-
60
- - **Python Code:** Formatted using [Ruff](https://github.com/astral-sh/ruff), an extremely fast Python linter and formatter.
61
- - **Markdown Files:** Styled with [Prettier](https://github.com/prettier/prettier) to ensure consistent documentation appearance.
62
- - **Docstrings:** Cleaned and standardized using [docformatter](https://github.com/PyCQA/docformatter).
63
- - **Swift Code:** Formatted with [`swift-format`](https://github.com/swiftlang/swift-format) to maintain a uniform coding style across Swift projects. _(Note: Requires the `macos-latest` runner.)_
64
- - **Spell Check:** Common misspellings are caught using [codespell](https://github.com/codespell-project/codespell).
65
- - **Broken Links Check:** Broken links in documentation and Markdown files are identified using [Lychee](https://github.com/lycheeverse/lychee).
66
- - **PR Summary:** Concise Pull Request summaries are generated using [OpenAI](https://openai.com/) GPT-5, improving clarity and review efficiency.
67
- - **PR Review:** AI-powered code reviews identify critical bugs, security issues, and code quality concerns with suggested fixes.
68
- - **Auto-labeling:** Applies relevant labels to issues and PRs via [OpenAI](https://openai.com/) GPT-5 for intelligent categorization.
69
-
70
- ## 🛠️ How It Works
55
+ ## 📦 Repository Contents
56
+
57
+ This repository provides three main components:
58
+
59
+ 1. **[Ultralytics Actions](#ultralytics-actions-main-action)** - Main GitHub Action for AI-powered code formatting, PR summaries, and auto-labeling
60
+ 2. **[Standalone Actions](#standalone-actions)** - Reusable composite actions for common CI/CD tasks
61
+ 3. **[Python Package](#python-package)** - `ultralytics-actions` package for programmatic use
62
+
63
+ ## Ultralytics Actions (Main Action)
64
+
65
+ AI-powered formatting, labeling, and PR summaries for Python, Swift, and Markdown files.
66
+
67
+ ### 📄 Features
68
+
69
+ - **Python Code:** Formatted using [Ruff](https://github.com/astral-sh/ruff), an extremely fast Python linter and formatter
70
+ - **Python Docstrings:** Google-style formatting enforced with Ultralytics Python docstring formatter (optional)
71
+ - **Markdown Files:** Styled with [Prettier](https://github.com/prettier/prettier) to ensure consistent documentation appearance
72
+ - **Swift Code:** Formatted with [`swift-format`](https://github.com/swiftlang/swift-format) _(requires `macos-latest` runner)_
73
+ - **Spell Check:** Common misspellings caught using [codespell](https://github.com/codespell-project/codespell)
74
+ - **Broken Links Check:** Broken links identified using [Lychee](https://github.com/lycheeverse/lychee)
75
+ - **PR Summary:** Concise Pull Request summaries generated using [OpenAI](https://openai.com/) GPT-5
76
+ - **PR Review:** AI-powered code reviews identify critical bugs, security issues, and quality concerns with suggested fixes
77
+ - **Auto-labeling:** Applies relevant labels to issues and PRs via [OpenAI](https://openai.com/) GPT-5
78
+
79
+ ### 🛠️ How It Works
80
+
81
+ Triggers on GitHub events to streamline workflows:
82
+
83
+ - **Push Events:** Automatically formats code when changes are pushed to `main`
84
+ - **Pull Requests:** Ensures formatting standards, generates summaries, provides AI reviews, and applies labels
85
+ - **Issues:** Automatically applies relevant labels using GPT-5
86
+
87
+ ### 🔧 Setup
88
+
89
+ Create `.github/workflows/ultralytics-actions.yml`:
90
+
91
+ ```yaml
92
+ # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
93
+
94
+ # Ultralytics Actions https://github.com/ultralytics/actions
95
+ # This workflow formats code and documentation in PRs to Ultralytics standards
96
+
97
+ name: Ultralytics Actions
98
+
99
+ on:
100
+ issues:
101
+ types: [opened]
102
+ pull_request:
103
+ branches: [main]
104
+ types: [opened, closed, synchronize, review_requested]
105
+
106
+ permissions:
107
+ contents: write # Modify code in PRs
108
+ pull-requests: write # Add comments and labels to PRs
109
+ issues: write # Add comments and labels to issues
110
+
111
+ jobs:
112
+ actions:
113
+ runs-on: ubuntu-latest
114
+ steps:
115
+ - name: Run Ultralytics Actions
116
+ uses: ultralytics/actions@main
117
+ with:
118
+ token: ${{ secrets.GITHUB_TOKEN }} # Auto-generated token
119
+ labels: true # Auto-label issues/PRs using AI
120
+ python: true # Format Python with Ruff
121
+ python_docstrings: false # Format Python docstrings (default: false)
122
+ prettier: true # Format YAML, JSON, Markdown, CSS
123
+ swift: false # Format Swift (requires macos-latest)
124
+ dart: false # Format Dart/Flutter
125
+ spelling: true # Check spelling with codespell
126
+ links: true # Check broken links with Lychee
127
+ summary: true # Generate AI-powered PR summaries
128
+ openai_api_key: ${{ secrets.OPENAI_API_KEY }} # Powers PR summaries, labels and reviews
129
+ brave_api_key: ${{ secrets.BRAVE_API_KEY }} # Used for broken link resolution
130
+ ```
71
131
 
72
- Ultralytics Actions triggers on various GitHub events to streamline workflows:
132
+ ## Standalone Actions
73
133
 
74
- - **Push Events:** Automatically formats code when changes are pushed to the `main` branch.
75
- - **Pull Requests:**
76
- - Ensures contributions meet formatting standards before merging.
77
- - Generates a concise summary of changes using GPT-5.
78
- - Provides AI-powered inline code reviews with suggested fixes for critical issues.
79
- - Applies relevant labels using GPT-5 for intelligent categorization.
80
- - **Issues:** Automatically applies relevant labels using GPT-5 when new issues are created.
134
+ Reusable composite actions for common CI/CD tasks. Each can be used independently in your workflows.
81
135
 
82
- These automated actions help maintain high code quality, improve documentation clarity, and streamline the review process by providing consistent formatting, informative summaries, and appropriate categorization.
136
+ ### 1. Retry Action
83
137
 
84
- ## 🔧 Setting Up the Action
138
+ Retry failed commands with exponential backoff.
85
139
 
86
- To integrate this action into your Ultralytics repository:
140
+ ```yaml
141
+ - uses: ultralytics/actions/retry@main
142
+ with:
143
+ command: npm install
144
+ max_attempts: 3
145
+ timeout_minutes: 5
146
+ ```
87
147
 
88
- 1. **Create a Workflow File:** In your repository, create a YAML file under `.github/workflows/`, for example, `ultralytics-actions.yml`.
148
+ [**📖 Full Documentation →**](retry/README.md)
89
149
 
90
- 2. **Add the Action:** Configure the Ultralytics Actions in your workflow file as shown below:
150
+ ### 2. Cleanup Disk Action
91
151
 
92
- ```yaml
93
- # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
152
+ Free up disk space on GitHub runners by removing unnecessary packages and files.
94
153
 
95
- # Ultralytics Actions https://github.com/ultralytics/actions
96
- # This workflow formats code and documentation in PRs to Ultralytics standards
154
+ ```yaml
155
+ - uses: ultralytics/actions/cleanup-disk@main
156
+ ```
97
157
 
98
- name: Ultralytics Actions
158
+ [**📖 Full Documentation →**](cleanup-disk/README.md)
99
159
 
100
- on:
101
- issues:
102
- types: [opened]
103
- pull_request:
104
- branches: [main]
105
- types: [opened, closed, synchronize, review_requested]
160
+ ### 3. Scan PRs Action
106
161
 
107
- permissions:
108
- contents: write # Modify code in PRs
109
- pull-requests: write # Add comments and labels to PRs
110
- issues: write # Add comments and labels to issues
162
+ List open PRs across an organization and auto-merge eligible Dependabot PRs.
111
163
 
112
- jobs:
113
- actions:
114
- runs-on: ubuntu-latest
115
- steps:
116
- - name: Run Ultralytics Actions
117
- uses: ultralytics/actions@main
118
- with:
119
- token: ${{ secrets.GITHUB_TOKEN }} # Auto-generated token
120
- labels: true # Auto-label issues/PRs using AI
121
- python: true # Format Python with Ruff and docformatter
122
- prettier: true # Format YAML, JSON, Markdown, CSS
123
- swift: false # Format Swift (requires macos-latest)
124
- dart: false # Format Dart/Flutter
125
- spelling: true # Check spelling with codespell
126
- links: true # Check broken links with Lychee
127
- summary: true # Generate AI-powered PR summaries
128
- openai_api_key: ${{ secrets.OPENAI_API_KEY }} # Powers PR summaries, labels and comments
129
- brave_api_key: ${{ secrets.BRAVE_API_KEY }} # Used for broken link resolution
130
- ```
164
+ ```yaml
165
+ - uses: ultralytics/actions/scan-prs@main
166
+ with:
167
+ token: ${{ secrets.GITHUB_TOKEN }}
168
+ org: ultralytics # Optional: defaults to ultralytics
169
+ visibility: private,internal # Optional: public, private, internal, all, or comma-separated
170
+ ```
131
171
 
132
- 3. **Customize:** Adjust the `runs-on` runner and the boolean flags (`labels`, `python`, `prettier`, `swift`, `spelling`, `links`, `summary`) based on your project's needs. Remember to add your `OPENAI_API_KEY` as a secret in your repository settings if you enable `labels` or `summary`.
172
+ [**📖 Full Documentation →**](scan-prs/README.md)
133
173
 
134
174
  ## Python Package
135
175
 
136
- Install the `ultralytics-actions` Python package directly with Pip:
176
+ Install `ultralytics-actions` for programmatic access to action utilities.
137
177
 
138
178
  [![PyPI - Version](https://img.shields.io/pypi/v/ultralytics-actions?logo=pypi&logoColor=white)](https://pypi.org/project/ultralytics-actions/)
139
179
  [![Ultralytics Downloads](https://static.pepy.tech/badge/ultralytics-actions)](https://clickpy.clickhouse.com/dashboard/ultralytics-actions)
140
180
  [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/ultralytics-actions?logo=python&logoColor=gold)](https://pypi.org/project/ultralytics-actions/)
141
181
 
142
- ```sh
182
+ ```bash
143
183
  pip install ultralytics-actions
144
184
  ```
145
185
 
186
+ **Available Modules:**
187
+
188
+ - `actions.review_pr` - AI-powered PR review
189
+ - `actions.summarize_pr` - Generate PR summaries
190
+ - `actions.scan_prs` - Scan and manage organization PRs
191
+ - `actions.first_interaction` - Welcome message for new contributors
192
+ - And more in `actions/` directory
193
+
146
194
  ## 💡 Contribute
147
195
 
148
196
  Ultralytics thrives on community collaboration, and we deeply value your contributions! Please see our [Contributing Guide](https://docs.ultralytics.com/help/contributing/) for details on how you can get involved. We also encourage you to share your feedback through our [Survey](https://www.ultralytics.com/survey?utm_source=github&utm_medium=social&utm_campaign=Survey). A huge thank you 🙏 to all our contributors!
@@ -0,0 +1,21 @@
1
+ actions/__init__.py,sha256=GaEFrlnYBqX5C9GJF1MEGHZP1TVWbOfa7VSXFMaffHQ,927
2
+ actions/dispatch_actions.py,sha256=ljlFR1o8m1qTHbStsJJVMVDdJv7iVqMfdPzKlZyKXl8,6743
3
+ actions/first_interaction.py,sha256=FTPcXjtBkM0Egc6VR5eVMvjF6uvarditTx9qaaoPcnU,9809
4
+ actions/format_python_docstrings.py,sha256=prK0U2EpwBlhkXgNnr72NsJFtSXTJaTCzMBcqL1N7wo,17150
5
+ actions/review_pr.py,sha256=wuPYqtDwt92e990mx1kSyfciICgZ1ZxduCyhpx4tc4M,19790
6
+ actions/scan_prs.py,sha256=y0J0PvEFVfWyB8SpGqyMXMhuPG7rGwrzkbkRL8VBS6A,8483
7
+ actions/summarize_pr.py,sha256=NChej-45frhhYLiNZ67DqhaHbxMhsjzYQqIE6FoAOcs,5707
8
+ actions/summarize_release.py,sha256=W1lgMdArgcte-_4h408eQH17t6H1giVnoIvnm-jR02g,9074
9
+ actions/update_file_headers.py,sha256=E5fKYLdeW16-BHCcuqxohGpGZqgEh-WX4ZmCQJw2R90,6684
10
+ actions/update_markdown_code_blocks.py,sha256=l3_nWNvujplYlY-Db3JOCG-qwMigp6BADjd7SaIEBpQ,8550
11
+ actions/utils/__init__.py,sha256=RcmBEPaQIR9mtNt2rO96Eru69EkSOaJwP2Eb9SogQbY,1111
12
+ actions/utils/common_utils.py,sha256=InBc-bsXcwzQYjuDxtrrm3bj7J-70U54G0s2nQKgCg8,12052
13
+ actions/utils/github_utils.py,sha256=5yzNIiu7-WBmH1-gSi4O31m1Fwd4k8pfbwM2BPVGf88,19989
14
+ actions/utils/openai_utils.py,sha256=XnteiRDrhQZRm9TTszM0qGO9fxSafRPJwQKM_zXuKvA,12753
15
+ actions/utils/version_utils.py,sha256=EIbm3iZVNyNl3dh8aNz_9ITeTC93ZxfyUzIRkO3tSXw,3242
16
+ ultralytics_actions-0.2.2.dist-info/licenses/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
17
+ ultralytics_actions-0.2.2.dist-info/METADATA,sha256=Kt1MSjpUo7mgHfd6NTI8mJqEtJmjrMUxXXrFEolAsO0,12542
18
+ ultralytics_actions-0.2.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
19
+ ultralytics_actions-0.2.2.dist-info/entry_points.txt,sha256=HZhkijH7tyA2igb3OoS9K4xc-_yAl8kYNRVUobqeq7w,581
20
+ ultralytics_actions-0.2.2.dist-info/top_level.txt,sha256=5apM5x80QlJcGbACn1v3fkmIuL1-XQCKcItJre7w7Tw,8
21
+ ultralytics_actions-0.2.2.dist-info/RECORD,,
@@ -1,5 +1,6 @@
1
1
  [console_scripts]
2
2
  ultralytics-actions-first-interaction = actions.first_interaction:main
3
+ ultralytics-actions-format-python-docstrings = actions.format_python_docstrings:main
3
4
  ultralytics-actions-headers = actions.update_file_headers:main
4
5
  ultralytics-actions-info = actions.utils:ultralytics_actions_info
5
6
  ultralytics-actions-review-pr = actions.review_pr:main
@@ -1,19 +0,0 @@
1
- actions/__init__.py,sha256=Ms2e2jGfy0slxc1dw9maEddDHLCkempqURchc3G3TRw,772
2
- actions/dispatch_actions.py,sha256=ljlFR1o8m1qTHbStsJJVMVDdJv7iVqMfdPzKlZyKXl8,6743
3
- actions/first_interaction.py,sha256=c8I6trXvsgii3B3k_HFWOYmLqbyz_oimHD2BeTGPoUM,9795
4
- actions/review_pr.py,sha256=JSAHyqoVty6Ob8_08zfllCynI6cY_3rcZT6ZLz5OHFU,17041
5
- actions/summarize_pr.py,sha256=0y4Cl4_ZMMtDWVhxwWasn3mHo_4GCnegJrf29yujUYM,5715
6
- actions/summarize_release.py,sha256=8D5EOQ36mho1HKtWD2J-IDH_xJJb3q0shgXZSdemmDM,9078
7
- actions/update_file_headers.py,sha256=E5fKYLdeW16-BHCcuqxohGpGZqgEh-WX4ZmCQJw2R90,6684
8
- actions/update_markdown_code_blocks.py,sha256=w3DTRltg2Rmr4-qrNawv_S2vJbheKE0tne1iz79FzXg,8692
9
- actions/utils/__init__.py,sha256=Uf7S5qYHS59zoAP9uKVIZwhpUbgyI947dD9jAWu50Lg,1115
10
- actions/utils/common_utils.py,sha256=InBc-bsXcwzQYjuDxtrrm3bj7J-70U54G0s2nQKgCg8,12052
11
- actions/utils/github_utils.py,sha256=5yzNIiu7-WBmH1-gSi4O31m1Fwd4k8pfbwM2BPVGf88,19989
12
- actions/utils/openai_utils.py,sha256=gblrRoWND0AMlN9AYmMxIPAnppK9ZWrsYR5547_5zUU,11839
13
- actions/utils/version_utils.py,sha256=EIbm3iZVNyNl3dh8aNz_9ITeTC93ZxfyUzIRkO3tSXw,3242
14
- ultralytics_actions-0.2.0.dist-info/licenses/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
15
- ultralytics_actions-0.2.0.dist-info/METADATA,sha256=CbtP6vJwbnRoElLzOPgYDRYMSZsEEZGUjHyZvkWWlb4,12368
16
- ultralytics_actions-0.2.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
17
- ultralytics_actions-0.2.0.dist-info/entry_points.txt,sha256=n_VbDs3Xj33daaeN_2D72UTEuyeH8hVc6-CPH55ymkY,496
18
- ultralytics_actions-0.2.0.dist-info/top_level.txt,sha256=5apM5x80QlJcGbACn1v3fkmIuL1-XQCKcItJre7w7Tw,8
19
- ultralytics_actions-0.2.0.dist-info/RECORD,,