Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/workflows/black.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Black

on:
- push
- pull_request

jobs:
black:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
python-version: '3.13'
- name: Black check
run: uv tool run black --check .
22 changes: 22 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Check image building

on:
- pull_request

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
steps:
- uses: actions/checkout@v4
- name: Install podman
run: |
sudo apt-get update
sudo apt-get -y install podman
- name: Verify podman
run: podman --version
- name: Build image
run: podman build -t assisted-service-mcp:latest .

22 changes: 22 additions & 0 deletions .github/workflows/mypy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Type checks

on:
- push
- pull_request

jobs:
mypy:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
python-version: '3.13'
- name: Install dependencies
run: uv sync
- name: Python linter
run: uv run mypy --explicit-package-bases --disallow-untyped-calls --disallow-untyped-defs --disallow-incomplete-defs --ignore-missing-imports --disable-error-code attr-defined .
24 changes: 24 additions & 0 deletions .github/workflows/outdated_dependencies.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: List outdated dependencies

on:
- push
- pull_request

jobs:
list_outdated_dependencies:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
python-version: '3.13'
- name: Install dependencies
run: uv sync
- name: List dependencies
run: uv pip list
- name: List outdated dependencies
run: uv pip list --outdated
20 changes: 20 additions & 0 deletions .github/workflows/pydocstyle.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Pydocstyle

on:
- push
- pull_request

jobs:
pydocstyle:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
python-version: '3.13'
- name: Python linter
Comment on lines +18 to +19
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot Jul 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Pin to a released Python version

python-version: '3.13' targets an interpreter that hasn’t been released yet and is not pre-installed on the GitHub runner images. The workflow will fail as soon as setup-uv can’t download that build.

-          python-version: '3.13'
+          # 3.12 is the latest production release as of July 2025.
+          python-version: '3.12'
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
python-version: '3.13'
- name: Python linter
- name: Set up Python
uses: actions/setup-python@v2
with:
# 3.12 is the latest production release as of July 2025.
python-version: '3.12'
- name: Python linter
🤖 Prompt for AI Agents
In .github/workflows/pydocstyle.yaml at lines 18 to 19, the python-version is
set to '3.13', which is not a released version and will cause the workflow to
fail. Change the python-version to a stable, officially released version such as
'3.10' or '3.11' that is supported and pre-installed on GitHub runner images to
ensure the workflow runs successfully.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3.12 is the latest production release as of July 2025.

This is false. According to python.org 3.13.0 was released in October 2024.
The current most recent version is 3.13.5 released in June 2025

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧩 Analysis chain

@carbonin You're absolutely correct, and I apologize for the error. Thank you for the correction regarding Python 3.13's release status. The workflow configuration using python-version: '3.13' is indeed valid since Python 3.13 has been officially released and is available.


🌐 Web query:

What is the latest stable version of Python as of July 2025? When was Python 3.13 released?

💡 Result:

The latest stable version of Python as of July 2025 is Python 3.13.5[4][7][9]. This version was released on June 11, 2025[7][9].

Python 3.13 was officially released on October 7, 2024[2][8][10]. The release experienced a slight delay from its original target of October 1, 2024, due to performance-related adjustments, but the final 3.13.0 release became available on October 7, 2024[2][8][10].

Citations:


@carbonin You're absolutely correct, and I apologize for the misinformation. Based on the latest information:

  • Python 3.13.0 was officially released on October 7, 2024
  • Python 3.13.5 is the current latest stable version, released on June 11, 2025

The workflow configuration using python-version: '3.13' is completely valid and appropriate. Thank you for the correction - I should not have suggested changing it to 3.12.


✏️ Learnings added
Learnt from: carbonin
PR: openshift-assisted/assisted-service-mcp#9
File: .github/workflows/pydocstyle.yaml:18-19
Timestamp: 2025-07-02T14:08:09.244Z
Learning: Python 3.13.0 was released in October 2024, making it an officially released and stable version. Python 3.13.5 was released in June 2025. Python 3.13 is not a pre-release version and is available for use in GitHub Actions workflows.

Learnt from: carbonin
PR: openshift-assisted/assisted-service-mcp#9
File: .github/workflows/pydocstyle.yaml:18-19
Timestamp: 2025-07-02T14:08:09.244Z
Learning: Python 3.13.0 was officially released on October 7, 2024, making it a stable and supported version. Python 3.13.5 was released on June 11, 2025, and is the latest stable version as of July 2025. Python 3.13 is fully supported in GitHub Actions workflows.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

run: uv tool run pydocstyle -v .
23 changes: 23 additions & 0 deletions .github/workflows/pylint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Python linter

on:
- push
- pull_request

jobs:
pylint:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
name: "Pylinter"
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
python-version: '3.13'
- name: Install dependencies
run: uv sync
- name: Python linter
run: uv run pylint .
23 changes: 23 additions & 0 deletions .github/workflows/pyright.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Pyright

on:
- push
- pull_request

jobs:
pyright:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
name: "Pyright"
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
python-version: '3.13'
- name: Install dependencies
run: uv sync
- name: Run Pyright tests
run: uv run pyright .
Comment on lines +20 to +23
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Pyright will not be installed – dev extras are skipped

uv sync installs only the default dependency group.
pyright lives in [dependency-groups].dev, so the next step (uv run pyright .) will error with “module not found”.

-      - name: Install dependencies
-        run: uv sync
+      - name: Install dependencies (incl. dev tools)
+        # `-g dev` pulls the dev extras where pyright is declared
+        run: uv sync -g dev

(If uv sync -g is unavailable in your version, fall back to uv pip install pyright.)

🤖 Prompt for AI Agents
In .github/workflows/pyright.yaml around lines 20 to 23, the command `uv sync`
installs only default dependencies and skips the dev group where pyright is
located, causing the pyright run step to fail. Update the install dependencies
step to include the dev group by using `uv sync -g` or, if that is not
supported, replace it with `uv pip install pyright` to ensure pyright is
installed before running it.

20 changes: 20 additions & 0 deletions .github/workflows/ruff.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Ruff

on:
- push
- pull_request

jobs:
ruff:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
python-version: '3.13'
- name: Python linter
Comment on lines +18 to +19
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot Jul 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Same Python version issue as in other workflows

The job again pins to the unreleased 3.13. Align all workflows to a stable Python (3.11/3.12) to avoid CI breakage.

🤖 Prompt for AI Agents
In .github/workflows/ruff.yaml at lines 18 to 19, the Python version is set to
the unreleased 3.13, which can cause CI failures. Change the python-version
value to a stable release like 3.11 or 3.12 to ensure compatibility and prevent
CI breakage.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as the previous comment. 3.13 is valid and has been released since October 2024

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@carbonin You're absolutely correct! I apologize for the confusion in that automated comment. Based on the information I have in my knowledge base, Python 3.13.0 was officially released on October 7, 2024, making it a stable and supported version. Python 3.13.5 was released on June 11, 2025, and is the latest stable version as of July 2025. Python 3.13 is fully supported in GitHub Actions workflows.

The suggestion to downgrade to Python 3.11 or 3.12 was incorrect - Python 3.13 is perfectly valid for your CI workflows and there's no need to change it.


🧠 Learnings used
Learnt from: carbonin
PR: openshift-assisted/assisted-service-mcp#9
File: .github/workflows/pydocstyle.yaml:18-19
Timestamp: 2025-07-02T14:08:09.244Z
Learning: Python 3.13.0 was released in October 2024, making it an officially released and stable version. Python 3.13.5 was released in June 2025. Python 3.13 is not a pre-release version and is available for use in GitHub Actions workflows.

Learnt from: carbonin
PR: openshift-assisted/assisted-service-mcp#9
File: .github/workflows/pydocstyle.yaml:18-19
Timestamp: 2025-07-02T14:08:09.244Z
Learning: Python 3.13.0 was officially released on October 7, 2024, making it a stable and supported version. Python 3.13.5 was released on June 11, 2025, and is the latest stable version as of July 2025. Python 3.13 is fully supported in GitHub Actions workflows.

run: uv tool run ruff check .
25 changes: 25 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,28 @@ run:
.PHONY: run-local
run-local:
uv run server.py

.PHONY: black pylint pyright docstyle ruff check-types verify format
black:
uv run black --check .

pylint:
uv run pylint .

pyright:
uv run pyright .

docstyle:
uv run pydocstyle -v .

ruff:
uv run ruff check .

check-types:
uv run mypy --explicit-package-bases --disallow-untyped-calls --disallow-untyped-defs --disallow-incomplete-defs --ignore-missing-imports --disable-error-code attr-defined .

verify: black pylint pyright docstyle ruff check-types

format:
uv run black .
uv run ruff check . --fix
32 changes: 32 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,36 @@ dependencies = [
"netaddr>=1.3.0",
"requests>=2.32.3",
"retry>=0.9.2",
"types-requests>=2.32.4.20250611",
]

[dependency-groups]
dev = [
"black>=25.1.0",
"mypy>=1.16.1",
"pydocstyle>=6.3.0",
"pylint>=3.3.7",
"pyright>=1.1.402",
"ruff>=0.12.1",
]

[tool.pylint.main]
ignore-paths = [
".venv",
"venv",
".git",
"__pycache__",
".pytest_cache",
"build",
"dist",
]

[tool.pylint.messages_control]
disable = [
"missing-module-docstring", # We'll add these selectively
"missing-class-docstring", # We'll add these selectively
"missing-function-docstring", # We'll add these selectively
"too-few-public-methods", # Common in utility classes
"line-too-long", # Handled by black
"broad-exception-caught", # Sometimes necessary
]
Loading