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
53 changes: 0 additions & 53 deletions .github/workflows/development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,59 +180,6 @@ jobs:
- name: Run integration tests
run: npm run test:integration

build:
# Only build if the PR branch is local
if: github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
strategy:
matrix:
python: ["3.9"]
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: pip install tox
- name: Build the package
run: |
export GUIDELLM_BUILD_TYPE=dev
export GUIDELLM_BUILD_ITERATION=${{ github.event.pull_request.number }}
tox -e build
- name: Upload build artifacts
id: artifact-upload
uses: actions/upload-artifact@v4
with:
name: build-artifacts
path: dist/*
compression-level: 6
if-no-files-found: error
retention-days: 30
- name: Generate GitHub App token
id: app-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.GH_NM_REDHAT_AUTOMATION_APP_ID }}
private-key: ${{ secrets.GH_NM_REDHAT_AUTOMATION_APP_PRIVATE_KEY }}
- name: Comment Install instructions
uses: actions/github-script@v7
with:
github-token: ${{ steps.app-token.outputs.token }}
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `📦 **Build Artifacts Available**
The build artifacts (\`.whl\` and \`.tar.gz\`) have been successfully generated and are available for download: ${{ steps.artifact-upload.outputs.artifact-url }}.
They will be retained for **up to 30 days**.
`
})

ui-pr-preview:
needs: [ui-quality-checks, ui-precommit-checks, ui-unit-tests, ui-integration-tests]
permissions:
Expand Down
39 changes: 6 additions & 33 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v6.0.0
hooks:
- id: trailing-whitespace
exclude: ^tests/?.*/assets/.+
- id: end-of-file-fixer
exclude: ^tests/?.*/assets/.+
- repo: https://github.com/pdm-project/pdm
rev: 2.25.6
hooks:
- id: pdm-lock-check
name: check lock file matches pyproject
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.11.7
hooks:
Expand All @@ -14,35 +19,3 @@ repos:
args: [ --fix, --show-fixes ]
- id: ruff-format
name: run formatter
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.15.0
hooks:
- id: mypy
args: [--check-untyped-defs]
additional_dependencies:
[
# main dependencies
click,
datasets,
ftfy,
loguru,
numpy,
pillow,
pydantic,
pydantic_settings,
pyyaml,
respx,
rich,
setuptools,
setuptools-git-versioning,
transformers,

# dev dependencies
pytest,
pydantic_settings,

# types
types-PyYAML,
types-requests,
types-toml,
]
2 changes: 2 additions & 0 deletions pdm.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[lock]
format = "pylock"
3,366 changes: 3,366 additions & 0 deletions pylock.toml

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ include = ["*"]
[tool.setuptools.package-data]
"guidellm.data" = ["*.gz"]

[tool.pdm]
distribution = true


# ************************************************
# ********** Project Metadata **********
Expand Down Expand Up @@ -100,6 +103,10 @@ dev = [
"mkdocs-linkcheck~=1.0.6",
]

# For PEP 735 compliant tools
[dependency-groups]
dev = [ "guidellm[dev]" ]

[project.urls]
homepage = "https://github.com/vllm-project/guidellm"
source = "https://github.com/vllm-project/guidellm"
Expand Down
2 changes: 1 addition & 1 deletion src/guidellm/utils/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def __init__(self, *types: click.ParamType):
self.types = types
self.name = "".join(t.name for t in types)

def convert(self, value, param, ctx):
def convert(self, value, param, ctx): # noqa: RET503
fails = []
for t in self.types:
try:
Expand Down
2 changes: 0 additions & 2 deletions tests/unit/preprocess/test_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,6 @@ def test_process_dataset_non_empty(
mock_save_to_file,
tokenizer_mock,
):
from guidellm.preprocess.dataset import process_dataset

mock_dataset = [{"prompt": "Hello"}, {"prompt": "How are you?"}]
mock_load_dataset.return_value = (mock_dataset, {"prompt_column": "prompt"})
mock_check_processor.return_value = tokenizer_mock
Expand Down
6 changes: 3 additions & 3 deletions tests/unit/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
Unit tests for CLI functionality, specifically the version flag.
"""

import importlib.metadata
import re

import pytest
from click.testing import CliRunner

Expand All @@ -26,7 +29,6 @@ def test_version_flag_displays_actual_version():
result = runner.invoke(cli, ["--version"])

assert result.exit_code == 0
import re

version_pattern = r"guidellm version: \d+\.\d+"
assert re.search(version_pattern, result.output)
Expand Down Expand Up @@ -84,8 +86,6 @@ def test_version_flag_case_sensitivity():
@pytest.mark.integration
def test_version_integration_with_actual_version():
"""Integration test to verify version matches importlib.metadata."""
import importlib.metadata

try:
actual_version = importlib.metadata.version("guidellm")

Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]
min_version = 4.0
env_list = py38,py39,py310,py311,py312
env_list = py3{9,10,11,12,13}


[testenv]
Expand Down