Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
85b1ecb
gitlab-pkg-upload: Add initial package structure and shared module
jetm Jan 9, 2026
90911cb
gitlab-pkg-upload: Add file validation utilities for package uploads
jetm Jan 9, 2026
8a7a0b1
gitlab_pkg_upload: Add file collection and checksum utilities
jetm Jan 9, 2026
ef10f34
gitlab_pkg_upload: Add Git URL parsing and configuration utilities
jetm Jan 9, 2026
a21ec5d
gitlab_pkg_upload: Add comprehensive configuration validation functions
jetm Jan 9, 2026
609ffed
gitlab-pkg-upload: Add upload orchestration with retry handling
jetm Jan 9, 2026
f887c9a
gitlab_pkg_upload: Add output formatting module
jetm Jan 9, 2026
27f16fc
tests: Add comprehensive unit tests for formatters module
jetm Jan 9, 2026
9050199
cli: Implement full argument parsing and validation
jetm Jan 9, 2026
f67930e
gitlab_pkg_upload/cli: Add GitLab project auto-detection and resolution
jetm Jan 10, 2026
9fe5f6e
gitlab-pkg-upload: Add context building phase with structured logging
jetm Jan 10, 2026
a384515
gitlab_pkg_upload/cli: Implement upload orchestration phase
jetm Jan 10, 2026
0f14407
tests: Add comprehensive unit tests for models and validators
jetm Jan 10, 2026
3fc546a
gitlab_pkg_upload: Add comprehensive duplicate detector unit tests
jetm Jan 10, 2026
3f48101
gitlab_pkg_upload: Add comprehensive unit tests for uploader module
jetm Jan 10, 2026
a6e8f64
tests: Add comprehensive unit tests for CLI module
jetm Jan 10, 2026
a264997
tests: Add integration test suite using direct module invocation
jetm Jan 10, 2026
b14be02
tests: Migrate test infrastructure to new gitlab_pkg_upload module
jetm Jan 10, 2026
1c83461
tests: Add centralized integration test environment validation
jetm Jan 10, 2026
b395041
gitlab_pkg_upload: refactor into installable package with modular CLI
jetm Jan 10, 2026
6aa4868
ci: Add GitHub Actions workflow for automated testing
jetm Jan 10, 2026
06e410c
github: Add CI workflows for linting, docs validation, and publishing
jetm Jan 10, 2026
b459ca7
Add pre-commit hooks for automated code quality checks
jetm Jan 10, 2026
3c60303
Add automated versioning with bump-my-version
jetm Jan 10, 2026
685b1a2
Big refactor
jetm Jan 10, 2026
8baf779
ci: Add test coverage reporting and integration test opt-in
jetm Jan 10, 2026
35a00bb
glpkg/cli: Add shell completion installation for bash and zsh
jetm Jan 10, 2026
7cc3876
glpkg: Add universal binary (.pyz) build and release support
jetm Jan 10, 2026
3a7bb5c
ci: Expand documentation workflow to cover new docs
jetm Jan 10, 2026
40a4c26
glpkg: Rename package to glpkg-cli for PyPI availability
jetm Jan 10, 2026
af288be
docs: Add GitHub Actions workflow documentation
jetm Jan 10, 2026
196df7a
docs: Reformat markdown for 72-character line wrapping
jetm Jan 10, 2026
3c7b3a1
glpkg: Fix type annotations and improve code formatting
jetm Jan 10, 2026
27f812a
tests: Add comprehensive unit tests for CLI, formatters, and uploader
jetm Jan 10, 2026
89a549d
readme: Update workflow badge URLs to correct repository
jetm Jan 10, 2026
8578c0f
github/workflows: Switch dependency caching from pip to uv
jetm Jan 10, 2026
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
57 changes: 57 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Documentation Validation

on:
push:
branches:
- "**"
pull_request:
branches:
- main
- master
workflow_dispatch:

jobs:
validate-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install markdownlint-cli2
run: npm install -g markdownlint-cli2

- name: Install markdown-link-check
run: npm install -g markdown-link-check

- name: Lint markdown files
run: markdownlint-cli2 "README.md" "CONTRIBUTING.md" "tests/README.md" "docs/**/*.md"
continue-on-error: false

- name: Check links in README.md
run: markdown-link-check README.md
continue-on-error: false

- name: Check links in CONTRIBUTING.md
run: markdown-link-check CONTRIBUTING.md
continue-on-error: false

- name: Check links in tests/README.md
run: markdown-link-check tests/README.md
continue-on-error: false

- name: Check links in docs/RELEASING.md
run: markdown-link-check docs/RELEASING.md
continue-on-error: false

- name: Check links in docs/SHELL_COMPLETION.md
run: markdown-link-check docs/SHELL_COMPLETION.md
continue-on-error: false

- name: Check links in docs/WORKFLOWS.md
run: markdown-link-check docs/WORKFLOWS.md
continue-on-error: false
41 changes: 41 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Lint

on:
push:
branches:
- '**'
pull_request:
branches:
- main
- master
workflow_dispatch:

jobs:
lint:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v4
with:
enable-cache: true

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Install dependencies
run: uv pip install -e ".[dev]" --system

- name: Run Ruff linting
run: uv run ruff check src/

- name: Run Ruff formatting check
run: uv run ruff format --check src/

- name: Run Mypy type checking
run: uv run mypy src/glpkg/ --strict
48 changes: 48 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Publish to PyPI

on:
release:
types: [published]
workflow_dispatch:

jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install uv
uses: astral-sh/setup-uv@v4

- name: Install build dependencies
run: uv pip install build --system

- name: Install build tools for .pyz
run: uv pip install shiv --system

- name: Build package distributions
run: python -m build

- name: Build .pyz universal binary
run: bash scripts/build_pyz.sh --tool shiv --output-dir dist

- name: List built artifacts
run: ls -la dist/

- name: Upload .pyz to release
if: github.event_name == 'release'
uses: softprops/action-gh-release@v1
with:
files: dist/glpkg.pyz
fail_on_unmatched_files: true

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
90 changes: 90 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
name: Tests

on:
push:
branches:
- '**'
pull_request:
branches:
- main
- master
workflow_dispatch:

jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12", "3.13"]

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v4
with:
enable-cache: true

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install package in editable mode
run: uv pip install -e . --system

- name: Install test dependencies
run: uv pip install -e ".[test]" --system

- name: Run unit tests with coverage
run: uv run pytest tests/unit/ -m unit -v -n auto --cov=glpkg --cov-report=xml --cov-report=term

- name: Upload coverage reports
if: matrix.python-version == '3.11'
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: |
coverage.xml
htmlcov/
retention-days: 7

- name: Check coverage threshold
if: matrix.python-version == '3.11'
run: |
# Extract coverage percentage from XML
COVERAGE=$(python -c "
import xml.etree.ElementTree as ET
tree = ET.parse('coverage.xml')
root = tree.getroot()
line_rate = float(root.get('line-rate', 0))
print(f'{line_rate * 100:.2f}')
")
echo "Coverage: ${COVERAGE}%"

# Check if below 95% warning threshold
if (( $(echo "$COVERAGE < 95" | bc -l) )); then
echo "::warning::Coverage is below 95% target: ${COVERAGE}%"
fi

# The --cov-fail-under=90 in pytest already handles the failure threshold

- name: Run integration tests
if: ${{ secrets.GITLAB_TOKEN != '' && secrets.GITLAB_REPO != '' }}
env:
GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }}
GITLAB_PROJECT_PATH: ${{ secrets.GITLAB_REPO }}
RUN_INTEGRATION_TESTS: "1"
run: uv run pytest tests/integration/ -m integration -v -n auto --no-cov

- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: pytest-results-${{ matrix.python-version }}
path: |
.pytest_cache/
htmlcov/
retention-days: 7
76 changes: 76 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# Shiv/PEX universal binaries
*.pyz
*.pex

# PyInstaller
*.manifest
*.spec

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# IDEs
.vscode/
.idea/
*.swp
*.swo
*~

# Type checking
.mypy_cache/
.dmypy.json
dmypy.json

# Linting
.ruff_cache/

# OS
.DS_Store
Thumbs.db
34 changes: 34 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
repos:
# File maintenance hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-toml
- id: check-added-large-files

# Ruff linting and formatting
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.4
hooks:
- id: ruff
args: [--fix]
files: ^src/
- id: ruff-format
files: ^src/

# Mypy type checking
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.14.1
hooks:
- id: mypy
args: [--strict]
files: ^src/gitlab_pkg_upload/
additional_dependencies:
- python-gitlab
- rich
- GitPython
- tenacity
- argcomplete
Loading
Loading