Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
a6a842d
Define Python project dependencies and quality tools
DataTideHH Jul 28, 2026
e72c7fa
Replace ML demo with deterministic baseline check
DataTideHH Jul 28, 2026
56a75de
Make example modules importable for tests
DataTideHH Jul 28, 2026
595f8e7
Create optional example namespace
DataTideHH Jul 28, 2026
4166dab
Move logistic regression into optional example
DataTideHH Jul 28, 2026
f904835
Replace local freeze with project dependency wrapper
DataTideHH Jul 28, 2026
69a04f5
Add development dependency wrapper
DataTideHH Jul 28, 2026
1079ee4
Remove redundant core requirements file
DataTideHH Jul 28, 2026
a4b053d
Clean notebook outputs and Python metadata
DataTideHH Jul 28, 2026
ada8caf
Add deterministic baseline tests
DataTideHH Jul 28, 2026
2afc870
Verify public notebook hygiene
DataTideHH Jul 28, 2026
57a7763
Test optional logistic regression example
DataTideHH Jul 28, 2026
e44c63a
Add cross-platform Python quality workflow
DataTideHH Jul 28, 2026
75ab912
Ignore generated CI notebook output
DataTideHH Jul 28, 2026
2a49448
Document cross-platform Python setup
DataTideHH Jul 28, 2026
ced33cf
Document hardened Python data baseline
DataTideHH Jul 28, 2026
60da350
Preserve cross-platform quality diagnostics
DataTideHH Jul 28, 2026
f64a766
Normalize legacy example imports
DataTideHH Jul 28, 2026
e3383d1
Normalize legacy example imports
DataTideHH Jul 28, 2026
8054819
Normalize legacy example imports
DataTideHH Jul 28, 2026
b94a0f7
Normalize legacy example imports
DataTideHH Jul 28, 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
131 changes: 131 additions & 0 deletions .github/workflows/python-quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
name: Python quality

on:
pull_request:
branches:
- main
paths:
- ".github/workflows/python-quality.yml"
- "*.py"
- "*.ipynb"
- "pyproject.toml"
- "requirements*.txt"
- "examples/**"
- "tests/**"
push:
branches:
- main
paths:
- ".github/workflows/python-quality.yml"
- "*.py"
- "*.ipynb"
- "pyproject.toml"
- "requirements*.txt"
- "examples/**"
- "tests/**"
workflow_dispatch:

permissions:
contents: read

concurrency:
group: python-quality-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
quality:
name: Python 3.12 · ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 15

strategy:
fail-fast: false
matrix:
os:
- ubuntu-24.04
- windows-2025

env:
PYTHONUTF8: "1"

steps:
- name: Check out repository
uses: actions/checkout@v6
with:
persist-credentials: false

- name: Set up Python 3.12
uses: actions/setup-python@v6
with:
python-version: "3.12"
cache: pip
cache-dependency-path: pyproject.toml

- name: Show Python and pip versions
run: |
python --version
python -m pip --version

- name: Install project and quality dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e ".[dev,ml,notebook]"

- name: Compile Python sources
run: python -m compileall -q main.py examples tests

- name: Run Ruff lint checks
id: ruff-lint
continue-on-error: true
shell: pwsh
run: |
$output = & python -m ruff check main.py examples tests 2>&1
$exitCode = $LASTEXITCODE
$output | Tee-Object -FilePath ruff-lint.txt
exit $exitCode

- name: Verify Ruff formatting
id: ruff-format
continue-on-error: true
shell: pwsh
run: |
$output = & python -m ruff format --check main.py examples tests 2>&1
$exitCode = $LASTEXITCODE
$output | Tee-Object -FilePath ruff-format.txt
exit $exitCode

- name: Run pytest suite
run: python -m pytest

- name: Run baseline entry point
run: python main.py

- name: Run optional ML example
run: python examples/optional/logistic_regression_basics.py

- name: Execute clean notebook copy
run: |
python -c "from pathlib import Path; Path('.ci-output').mkdir(exist_ok=True)"
jupyter nbconvert --to notebook --execute dataspell_test.ipynb --output environment-check.executed.ipynb --output-dir .ci-output --ExecutePreprocessor.timeout=120

- name: Upload quality diagnostics
if: always()
uses: actions/upload-artifact@v7
with:
name: quality-diagnostics-${{ matrix.os }}
path: |
ruff-lint.txt
ruff-format.txt
if-no-files-found: ignore
retention-days: 3

- name: Enforce Ruff quality gate
if: always()
shell: pwsh
run: |
$lintOutcome = "${{ steps.ruff-lint.outcome }}"
$formatOutcome = "${{ steps.ruff-format.outcome }}"

if ($lintOutcome -ne "success" -or $formatOutcome -ne "success") {
throw "Ruff quality gate failed. Download the quality diagnostics artifact for details."
}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ __pycache__/

# Jupyter
.ipynb_checkpoints/
.ci-output/

# Test / tooling caches
.pytest_cache/
Expand All @@ -29,6 +30,8 @@ dist/

# macOS
.DS_Store

# Local configuration and credentials
.env
*.env
credentials.json
Expand Down
Loading