Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
9886ce7
Add CWLFloatInput to the available annotations
gfenoy Oct 6, 2025
ec40ad7
Detect and evaluate the outputs annoted with CWLFilePathOutput
gfenoy Oct 29, 2025
9cca56c
Add support for requirements definition annoted as CWLRequirement
gfenoy Oct 29, 2025
a8bfb8e
Add support for metadata annotation in the notebook
gfenoy Oct 29, 2025
71e6125
Use 0000-0002-9617-8641 orcid id as example
gfenoy Oct 29, 2025
a57a253
Add automated testing on Python 3.10-3.11
gfenoy Oct 30, 2025
70ff706
Merge pull request #1 from gfenoy/feature/run-tests
gfenoy Oct 30, 2025
85ac018
Fix issue with validation job from the GitHub Action Tests
gfenoy Oct 30, 2025
1267738
Merge pull request #2 from gfenoy/feature/run-tests
gfenoy Oct 30, 2025
ee735c1
Fix coverage usage
gfenoy Oct 30, 2025
a29db67
Merge pull request #3 from gfenoy/feature/run-tests
gfenoy Oct 30, 2025
d0a7c01
Fix issue with coverage in pyproject.toml
gfenoy Oct 30, 2025
72eba96
Merge pull request #4 from gfenoy/feature/run-tests
gfenoy Oct 30, 2025
5a8c207
Do not use the deprecated pkg_resources Python module
gfenoy Oct 30, 2025
8b23842
Merge pull request #5 from gfenoy/feature/run-tests
gfenoy Oct 30, 2025
6e2181e
Use upload-artifact v4
gfenoy Oct 30, 2025
d44fc38
Update parameterrs for safety and remove complexity-report
gfenoy Oct 30, 2025
ff1452c
Fix parameters passed to mypy
gfenoy Oct 30, 2025
d9a3a74
Update version of codeql-action
gfenoy Oct 30, 2025
bf584e7
Update codecov-action to version 5 and use the CODECOV_TOKEN repo token
gfenoy Oct 30, 2025
54a7d85
Add CWLDirectoryPathOutput annotation
gfenoy Nov 3, 2025
4e95c17
Fix output type for dumpable files
gfenoy Nov 3, 2025
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
61 changes: 61 additions & 0 deletions .ci-config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Configuration for ipython2cwl-gfenoy-new CI/CD

[project]
name = "ipython2cwl-gfenoy-new"
version = "0.0.4"
description = "Enhanced ipython2cwl with advanced CWL features"

[ci]
# Python versions to test against
python_versions = ["3.8", "3.9", "3.10", "3.11"]

# Test configuration
test_directories = [
"tests/test_cwltoolextractor.py",
"tests/test_requirements_manager.py"
]

# Docker-dependent tests (may fail in CI)
docker_tests = [
"tests/test_system_tests.py",
"tests/test_ipython2cwl_from_repo.py"
]

# Coverage configuration
coverage_min = 80
coverage_exclude = [
"*/tests/*",
"*/venv/*",
"*/__pycache__/*"
]

[quality]
# Code style tools
use_black = true
use_flake8 = true
use_isort = true
use_mypy = false # Disabled due to type annotation complexities

# Security tools
use_bandit = true
use_safety = true

# Quality thresholds
complexity_max = 10
line_length = 88

[docker]
# Docker configuration
base_image = "python:3.10-slim"
registry = "ghcr.io"
platforms = ["linux/amd64"]

[release]
# Release configuration
pypi_enabled = true
test_pypi_enabled = true
docker_enabled = true
github_releases = true

# Version bumping
version_pattern = "semantic" # major.minor.patch
64 changes: 57 additions & 7 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,61 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: "pip" # See documentation for possible values
directory: "/" # Location of package manifests
# GitHub Actions dependencies
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
time: "09:00"
open-pull-requests-limit: 5
assignees:
- "gerald-fenoy"
labels:
- "dependencies"
- "github-actions"
commit-message:
prefix: "chore(deps):"
include: "scope"

# Python dependencies
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
time: "09:00"
open-pull-requests-limit: 10
assignees:
- "gerald-fenoy"
labels:
- "dependencies"
- "python"
commit-message:
prefix: "chore(deps):"
include: "scope"
ignore:
# Ignore major version updates for these packages (stability)
- dependency-name: "jupyter*"
update-types: ["version-update:semver-major"]
- dependency-name: "nbconvert"
update-types: ["version-update:semver-major"]
allow:
# Allow all dependency types for security updates
- dependency-type: "all"

# Docker dependencies
- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
time: "09:00"
open-pull-requests-limit: 3
assignees:
- "gerald-fenoy"
labels:
- "dependencies"
- "docker"
commit-message:
prefix: "chore(deps):"
include: "scope"
178 changes: 178 additions & 0 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,178 @@
name: Security & Quality

on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main ]
schedule:
# Run security checks weekly on Mondays at 9 AM UTC
- cron: '0 9 * * 1'

jobs:
security:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

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

- name: Install security tools
run: |
python -m pip install --upgrade pip
pip install bandit safety

- name: Run Bandit security scan
run: |
bandit -r ipython2cwl/ -f json -o bandit-report.json || true
bandit -r ipython2cwl/ || echo "Bandit found security issues"

- name: Run Safety check
run: |
safety check --save-json safety-report.json || true
safety check || echo "Safety found vulnerable dependencies"

- name: Upload security reports
uses: actions/upload-artifact@v4
if: always()
with:
name: security-reports
path: |
bandit-report.json
safety-report.json

dependency-review:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'

steps:
- name: Dependency Review
uses: actions/dependency-review-action@v3

codeql:
runs-on: ubuntu-latest
permissions:
security-events: write

steps:
- uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: python

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3

quality:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

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

- name: Install quality tools
run: |
python -m pip install --upgrade pip
pip install pylint mypy radon

- name: Install package dependencies
run: |
pip install numpy pandas matplotlib jupyter nbconvert ipython
pip install astor gitpython jupyter-repo2docker
pip install -e .

- name: Run Pylint
run: |
pylint ipython2cwl/ --output-format=json --reports=yes > pylint-report.json || true
pylint ipython2cwl/ || echo "Pylint found issues"

- name: Run MyPy type checking
run: |
mypy ipython2cwl/ --ignore-missing-imports --txt-report mypy-report --html-report mypy-report-html || echo "MyPy found type issues"
mypy ipython2cwl/ --ignore-missing-imports || echo "MyPy found type issues"

- name: Calculate code complexity
run: |
radon cc ipython2cwl/ --json > complexity-report.json || true
radon cc ipython2cwl/ || echo "Complexity analysis completed"

- name: Upload quality reports
uses: actions/upload-artifact@v4
if: always()
with:
name: quality-reports
path: |
pylint-report.json
mypy-report/
mypy-report-html/
complexity-report.json

documentation:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

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

- name: Install documentation dependencies
run: |
python -m pip install --upgrade pip
pip install sphinx sphinx-rtd-theme pydoc-markdown

- name: Check documentation coverage
run: |
# Generate documentation coverage report
python -c "
import ast
import os

def check_docstrings(filepath):
with open(filepath, 'r') as f:
tree = ast.parse(f.read())

functions = [node for node in ast.walk(tree) if isinstance(node, ast.FunctionDef)]
classes = [node for node in ast.walk(tree) if isinstance(node, ast.ClassDef)]

documented = 0
total = len(functions) + len(classes)

for item in functions + classes:
if ast.get_docstring(item):
documented += 1

return documented, total

total_documented = 0
total_items = 0

for root, dirs, files in os.walk('ipython2cwl'):
for file in files:
if file.endswith('.py'):
filepath = os.path.join(root, file)
doc, tot = check_docstrings(filepath)
total_documented += doc
total_items += tot
print(f'{filepath}: {doc}/{tot} documented')

coverage = (total_documented / total_items * 100) if total_items > 0 else 0
print(f'Overall documentation coverage: {coverage:.1f}% ({total_documented}/{total_items})')
"

- name: Generate API documentation
run: |
mkdir -p docs/api
pydoc-markdown --render-toc > docs/api/README.md || echo "API documentation generation completed"
Loading