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
63 changes: 63 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: CI

on:
push:
branches: [master, styx-ci-cd, "chore/styx--github-actions", KAVR_12182025]
pull_request:
branches: [master, styx-ci-cd, KAVR_12182025]
workflow_dispatch:

jobs:
lint-and-test:
name: Python ${{ matrix.python-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ["3.10", "3.11", "3.12"]

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for pre-commit to compare

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

- name: Install uv
uses: astral-sh/setup-uv@v4
with:
enable-cache: true
cache-dependency-glob: "qualibration_graphs/superconducting/pyproject.toml"

- name: Install dependencies
run: |
cd qualibration_graphs/superconducting
uv sync --group dev --prerelease=allow

- name: Run pre-commit on changed files
run: |
cd qualibration_graphs/superconducting
if [ "${{ github.event_name }}" == "pull_request" ]; then
uv run pre-commit run --from-ref origin/${{ github.base_ref }} --to-ref HEAD
else
uv run pre-commit run --from-ref HEAD~1 --to-ref HEAD
fi

- name: Run tests with pytest
run: |
cd qualibration_graphs/superconducting
uv run pytest --verbose --cov --cov-report=xml --cov-report=term

- name: Upload coverage to Codecov
if: matrix.python-version == '3.12' && matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v4
with:
file: ./qualibration_graphs/superconducting/coverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: false
53 changes: 50 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,50 @@
.idea
__pycache__
.pytest_cache/
# Python
__pycache__/
*.py[cod]
*$py.class
*.so
.Python

# Virtual environments
.venv/
venv/
ENV/
env/

# Testing
.pytest_cache/
.coverage
htmlcov/
.tox/
.nox/

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

# Distribution / packaging
build/
dist/
*.egg-info/
.eggs/

# Jupyter Notebook
.ipynb_checkpoints

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Ruff
.ruff_cache/

# Pre-commit
.pre-commit-cache/

# Project specific
*.log
43 changes: 43 additions & 0 deletions qualibration_graphs/superconducting/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
repos:
# 1. Generic hygiene hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-merge-conflict
- id: check-added-large-files
- id: check-yaml
- id: check-json

# 2. Black: code formatting
- repo: https://github.com/psf/black
rev: 24.10.0
hooks:
- id: black
language_version: python3

# 3. Pylint: linting
- repo: https://github.com/pycqa/pylint
rev: v3.3.1
hooks:
- id: pylint
exclude: /tests/

# 4. Type checking – heavier, so run on push instead of every commit
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.11.1
hooks:
- id: mypy
stages: [pre-push]
additional_dependencies:
# Add stubs/internal deps here as needed
- types-setuptools

# 5. Conventional commit messages (commitizen)
- repo: https://github.com/commitizen-tools/commitizen
rev: v3.29.0
hooks:
- id: commitizen
stages: [commit-msg]
additional_dependencies: ["commitizen"]
26 changes: 26 additions & 0 deletions qualibration_graphs/superconducting/.pylintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@

[MESSAGES CONTROL]
# Enable ONLY:
# E = Errors
# R = Refactor suggestions
# C = Convention checks
# F = fatal
enable=E, R, F, C

# Disable W (Warnings), and I (Information)
disable=W, I


[REPORTS]
# Cleaner output, no extra reports
reports=no


[MASTER]
# You can add folders to ignore if needed
ignore=venv


[FORMAT]
# Optional — set your preferred line length
max-line-length=120
Loading
Loading