Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
93b7e5c
Added CI code coverage
JulianOpper Dec 23, 2025
d390eac
Add linting, matrix testing and build verification to CI pipeline
JulianOpper Jan 17, 2026
b0ad54c
Set matrix testing in CI to only include python 3.11 and 3.12
JulianOpper Jan 17, 2026
532cea0
Merge branch 'development' into feature/ci-cd
JulianOpper Jan 19, 2026
e88975d
Improve test assertions in test_ftio.py
JulianOpper Jan 19, 2026
522e96d
Improve test assertions in test_api.py
JulianOpper Jan 19, 2026
8af2630
Overhaul tests in test_filter.py to actually test filters
JulianOpper Jan 19, 2026
113e053
Add basic ioplot tests
lucasch03 Jan 19, 2026
0b7ec3c
Improve tests in test_operations.py
lucasch03 Jan 19, 2026
314f26f
Improve tests in test_scales.py
lucasch03 Jan 19, 2026
8efd30a
Improve tests in test_wavelet.py
lucasch03 Jan 19, 2026
2091b9a
Add test_analysis to test the functions of analysis module
JulianOpper Jan 20, 2026
f777e05
Add tests for files in prediction folder
lucasch03 Jan 20, 2026
a4383e7
Add basic tests for plot subfolder
lucasch03 Jan 21, 2026
0a411b8
Add calculation tests for ftio/parse/bandwidth.py
lucasch03 Jan 22, 2026
e9a413a
Add tests for ftio/parse/csv_reader.py
lucasch03 Jan 22, 2026
906b7e7
Add tests for ftio/parse/helper.py
lucasch03 Jan 22, 2026
085a9d4
Fix failing tests in test/parse/test_bandwidth
lucasch03 Jan 22, 2026
344f815
Add basic tests for ftio/parse/input_template.py
lucasch03 Jan 23, 2026
9cb3578
Add calculation tests for ftio/parse/metrics.py
lucasch03 Jan 23, 2026
57ef2b9
Fix dash_extensions version compatibility
JulianOpper Jan 23, 2026
f2fb5d6
Force dependency upgrade in CI
JulianOpper Jan 23, 2026
d4eae4d
Pin dash<2.18.0 for dash_extensions compatibility
JulianOpper Jan 23, 2026
9f14cd8
Add pytz dependency for plotly_resampler
JulianOpper Jan 23, 2026
908dc83
Merge remote-tracking branch 'origin/feature/ci-cd' into feature/ci-cd
lucasch03 Jan 23, 2026
f7e95c1
Add basic test for ftio/parse/percent.py
lucasch03 Jan 23, 2026
693c5cb
Optimize test structure for previously created tests
lucasch03 Jan 23, 2026
7a14abe
Remove build artifact upload on build verification
JulianOpper Jan 24, 2026
9991dc7
Add JUnit test reporting to CI for test visibility
JulianOpper Jan 24, 2026
86284e8
Add __init__.py files to fix pytest module name conflicts
JulianOpper Jan 24, 2026
deb66c1
Fix MockTime in test_percent to include all required attributes
JulianOpper Jan 24, 2026
14faf3f
Add permissions for test-reporter to create check runs
JulianOpper Jan 24, 2026
03820ab
Apply ruff and black auto-fixes to reduce linting errors
JulianOpper Jan 24, 2026
0f6fad1
Fix linting errors and add ignores for manual fixes
JulianOpper Jan 24, 2026
b85531d
Write coverage to job summary instead of an artifact
JulianOpper Jan 26, 2026
9cbeecd
Match all branches for CI run
JulianOpper Jan 26, 2026
077f887
Add draft release workflow on PR merge to main
JulianOpper Jan 26, 2026
abeb7fa
Add Docker image build to CD pipeline with ghcr.io and Docker Hub sup…
JulianOpper Jan 26, 2026
62fb8ca
Disable Docker Hub job with if: false instead of secrets check
JulianOpper Jan 26, 2026
49392b4
Merge branch 'development' into feature/ci-cd
JulianOpper Jan 26, 2026
67a3950
Fix ruff linting and black formatting errors
JulianOpper Jan 26, 2026
e964e33
Remove Codecov upload and simplify test job
JulianOpper Jan 26, 2026
7e6ede2
fixed warning
A-Tarraf Jan 27, 2026
f9a48f5
added ruff and contributing instructions
A-Tarraf Jan 27, 2026
940f5b9
Merge branch 'development' into feature/ci-cd
A-Tarraf Jan 27, 2026
644f3d8
minor update
A-Tarraf Jan 27, 2026
829f872
added missing package
A-Tarraf Jan 27, 2026
6bf9c89
added contributors
A-Tarraf Jan 27, 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
169 changes: 148 additions & 21 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,170 @@
name: CI
name: CI

on:
push:
branches:
- '*' # Trigger on push to any branch
# - 'development' # Trigger on push to any branch
# - 'main' # Trigger on push to any branch
# - '!development' # Exclude the branch
- '**'
pull_request:
branches:
- 'main' # Run tests on pull requests targeting the main branch
- 'main'
workflow_dispatch:

# Cancel in-progress runs for the same branch
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read
checks: write

jobs:
build:
# ============================================
# Code Quality: Linting and Formatting
# ============================================
lint:
name: Lint & Format Check
runs-on: ubuntu-latest
continue-on-error: true # Non-blocking

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

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

- name: Install linting tools
run: |
python -m pip install --upgrade pip
pip install ruff black

- name: Run Ruff linter
run: ruff check . --output-format=github

- name: Check code formatting with Black
run: black --check --diff .

# ============================================
# Tests: Multi-Python Version Matrix
# ============================================
test:
name: Test Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
needs: [lint]

strategy:
fail-fast: false
matrix:
python-version: ['3.11', '3.12']

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

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

- name: Cache pip dependencies
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.python-version }}-
${{ runner.os }}-pip-

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest
pip install --upgrade .[external-libs] || pip install --upgrade . --no-cache-dir

- name: Run tests
run: |
cd test
pytest --junitxml=test-results.xml -v

- name: Test Report
uses: dorny/test-reporter@v1
if: always()
with:
name: Test Results (Python ${{ matrix.python-version }})
path: test/test-results.xml
reporter: java-junit

# ============================================
# Coverage Report (Primary Python Version)
# ============================================
coverage:
name: Coverage Report
runs-on: ubuntu-latest
needs: [lint]

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

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

- name: Install FTIO and dependencies
- name: Cache pip dependencies
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-3.11-${{ hashFiles('pyproject.toml') }}
restore-keys: |
${{ runner.os }}-pip-3.11-
${{ runner.os }}-pip-

- name: Install dependencies
run: |
python -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install .[external-libs] || \
{ echo "::error::External dependencies installation failed, falling back to standard install."; \
pip install . --no-cache-dir; }
python -m pip install --upgrade pip
pip install pytest pytest-cov
pip install --upgrade .[external-libs] || pip install --upgrade . --no-cache-dir

- name: Run tests with coverage
run: |
cd test
pytest --cov=ftio --cov-report=term -v

- name: Test FTIO
- name: Write coverage to job summary
run: |
source .venv/bin/activate # Just activate the existing .venv
cd test
python3 -m pytest
rm -rf io_results __pycache__ *.json*
echo "## Coverage Report" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
coverage report --format=markdown >> $GITHUB_STEP_SUMMARY

# ============================================
# Build Verification
# ============================================
build:
name: Build Package
runs-on: ubuntu-latest
needs: [test]

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

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

- name: Install build tools
run: |
python -m pip install --upgrade pip
pip install build twine

- name: Build package
run: python -m build

- name: Check package with twine
run: twine check dist/*
71 changes: 0 additions & 71 deletions .github/workflows/CI_multisteps.yml

This file was deleted.

47 changes: 47 additions & 0 deletions .github/workflows/draft-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Draft Release

on:
pull_request:
types: [closed]
branches:
- main

permissions:
contents: write

jobs:
draft-release:
name: Create Draft Release
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest

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

- name: Get version
id: version
run: |
VERSION=$(python -c "exec(open('ftio/__init__.py').read()); print(__version__)")
echo "version=$VERSION" >> $GITHUB_OUTPUT

- name: Check if release already exists
id: check
env:
GH_TOKEN: ${{ github.token }}
run: |
if gh release view "v${{ steps.version.outputs.version }}" > /dev/null 2>&1; then
echo "exists=true" >> $GITHUB_OUTPUT
else
echo "exists=false" >> $GITHUB_OUTPUT
fi

- name: Create draft release
if: steps.check.outputs.exists == 'false'
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release create "v${{ steps.version.outputs.version }}" \
--title "v${{ steps.version.outputs.version }}" \
--generate-notes \
--draft
Loading