Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
47e4d7f
feat: Add competing risks models and enhance data visualization
DiogoRibeiro7 Jul 10, 2025
7f7c28a
feat: Add competing risks models and enhance data visualization
DiogoRibeiro7 Jul 10, 2025
db49738
chore: fixes
DiogoRibeiro7 Jul 11, 2025
79f6a8b
chore: fixes unit test
DiogoRibeiro7 Jul 11, 2025
93b7f1e
chore: solve issues with formatting
DiogoRibeiro7 Jul 11, 2025
56e9e99
Add files via upload
DiogoRibeiro7 Jul 24, 2025
05c693b
docs: update fix reference (#37)
DiogoRibeiro7 Jul 26, 2025
4ba1b79
Add missing dependencies and configure quality tools (#39)
DiogoRibeiro7 Jul 28, 2025
5a184ca
feat: add dataset export utility (#41)
DiogoRibeiro7 Jul 28, 2025
c3571dd
Fix black formatting (#43)
DiogoRibeiro7 Jul 29, 2025
1671a02
Add extensive summary tests (#45)
DiogoRibeiro7 Jul 30, 2025
9036686
Add visualization CLI tests (#47)
DiogoRibeiro7 Jul 30, 2025
533f118
Expand validate tests (#49)
DiogoRibeiro7 Jul 30, 2025
9106058
docs: rewrite README (#51)
DiogoRibeiro7 Jul 30, 2025
74b4021
Increase test coverage (#52)
DiogoRibeiro7 Jul 30, 2025
908e6d1
Fix docs build and sort imports (#54)
DiogoRibeiro7 Jul 30, 2025
c10e62f
Add scikit-survival integration (#56)
DiogoRibeiro7 Jul 30, 2025
aa6ee6d
chore: finalize 1.0.9 release metadata (#58)
DiogoRibeiro7 Aug 2, 2025
f92a584
refactor: unify error handling (#60)
DiogoRibeiro7 Aug 2, 2025
717cee8
Feat/consolidate and optimize (#63)
DiogoRibeiro7 Aug 2, 2025
9961ad2
feat: expose dev extras (#65)
DiogoRibeiro7 Aug 3, 2025
77b9f06
test: broaden competing risks coverage (#67)
DiogoRibeiro7 Aug 4, 2025
8e7b800
fix: ensure doc links and tag workflow (#69)
DiogoRibeiro7 Aug 4, 2025
1717ef9
ci: streamline coverage and install flags (#71)
DiogoRibeiro7 Aug 5, 2025
9fa0e5d
feat: share covariate utilities (#73)
DiogoRibeiro7 Aug 5, 2025
c0417fb
ci: separate manual pypi publish (#76)
DiogoRibeiro7 Aug 5, 2025
b0633d3
Revert 78 feat/remove ignore errors in mypy settings (#79)
DiogoRibeiro7 Aug 8, 2025
42d59df
fix: tighten sequence checks and streamline competing-risk helpers (#81)
DiogoRibeiro7 Aug 8, 2025
892ca6b
Mege Main in to branch (#82)
DiogoRibeiro7 Aug 8, 2025
2f47196
chore: sync version and tidy changelog (#84)
DiogoRibeiro7 Aug 9, 2025
9111394
Merge main in to branch (#85)
DiogoRibeiro7 Aug 9, 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
53 changes: 6 additions & 47 deletions .github/workflows/bump-version.yml
Original file line number Diff line number Diff line change
@@ -1,67 +1,26 @@
# .github/workflows/bump-version.yml
name: Bump Version on Merge to Main
name: Sync Version on Merge to Main

on:
push:
branches:
- main

jobs:
bump-version:
tag-version:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for all branches and tags
fetch-depth: 0

- uses: actions/setup-python@v5
with:
python-version: "3.11"

- run: pip install python-semantic-release

- name: Configure Git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"

- name: Run Semantic Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: semantic-release version
- name: Synchronize tag and pyproject version
run: python scripts/check_version_match.py --fix --write

- name: Push changes
run: |
git push --follow-tags
- name: "Install Poetry"
run: pip install poetry
- name: "Determine version bump type"
run: |
git fetch --tags
# This defaults to a patch type, unless a feature commit was pushed, then set type to minor
LAST_TAG=$(git describe --tags $(git rev-list --tags --max-count=1))
LAST_COMMIT=$(git log -1 --format='%H')
echo "Last git tag: $LAST_TAG"
echo "Last git commit: $LAST_COMMIT"
echo "Commits:"
git log --no-merges --pretty=oneline $LAST_TAG...$LAST_COMMIT
git log --no-merges --pretty=format:"%s" $LAST_TAG...$LAST_COMMIT | grep -q ^feat: && BUMP_TYPE="minor" || BUMP_TYPE="patch"
echo "Version bump type: $BUMP_TYPE"
echo "BUMP_TYPE=$BUMP_TYPE" >> $GITHUB_ENV
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "Version bump"
run: |
poetry version $BUMP_TYPE
- name: "Push new version"
run: |
git add pyproject.toml
git commit -m "Update version to $(poetry version -s)"
git pull --ff-only origin main
git push origin main --follow-tags
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
96 changes: 96 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
name: CI

on:
push:
branches:
- main
tags:
- 'v*'
pull_request:
branches:
- main

jobs:
test:
name: Test with Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "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 Poetry dependencies
uses: actions/cache@v4
with:
path: ~/.cache/pypoetry
key: ${{ runner.os }}-poetry-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}

- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
echo "$HOME/.local/bin" >> $GITHUB_PATH

- name: Install dependencies
run: poetry install --with dev --no-interaction

- name: Check runtime dependencies
run: |
poetry run python - <<'PY'
import importlib, sys
missing = [m for m in ("pandas",) if importlib.util.find_spec(m) is None]
if missing:
print("Missing dependencies:", ", ".join(missing))
sys.exit(1)
PY

- name: Verify version matches tag
if: startsWith(github.ref, 'refs/tags/')
run: python scripts/check_version_match.py

- name: Run tests with coverage
run: poetry run pytest --cov=gen_surv --cov-report=xml --cov-report=term

- name: Upload coverage to Codecov
if: matrix.python-version == '3.11'
uses: codecov/codecov-action@v5
with:
files: coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}

lint:
name: Code Quality
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: Cache Poetry dependencies
uses: actions/cache@v4
with:
path: ~/.cache/pypoetry
key: ${{ runner.os }}-poetry-3.11-${{ hashFiles('**/poetry.lock') }}

- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
echo "$HOME/.local/bin" >> $GITHUB_PATH

- name: Install dependencies
run: poetry install --with dev --no-interaction

- name: Run pre-commit checks
run: poetry run pre-commit run --all-files
34 changes: 34 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Documentation Build

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Cache Poetry dependencies
uses: actions/cache@v4
with:
path: ~/.cache/pypoetry
key: ${{ runner.os }}-poetry-3.11-${{ hashFiles('**/poetry.lock') }}
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Install dependencies
run: poetry install --with docs
- name: Build documentation
run: poetry run sphinx-build -W -b html docs/source docs/build
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: documentation
path: docs/build/
27 changes: 27 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Publish to PyPI

on:
workflow_dispatch:

jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Verify version matches tag
run: python scripts/check_version_match.py
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Publish
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
run: poetry publish --build --no-interaction
38 changes: 0 additions & 38 deletions .github/workflows/test.yml

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,4 @@ dist/
# Temporary
*.log
*.tmp
.hypothesis/
20 changes: 20 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
repos:
- repo: https://github.com/psf/black
rev: 24.1.0
hooks:
- id: black
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
- repo: https://github.com/pycqa/flake8
rev: 6.1.0
hooks:
- id: flake8
additional_dependencies: [flake8-pyproject]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.15.0
hooks:
- id: mypy
pass_filenames: false
args: [--config-file=pyproject.toml, gen_surv]
14 changes: 13 additions & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,22 @@ build:
os: ubuntu-22.04
tools:
python: "3.11"
jobs:
post_create_environment:
- pip install poetry
post_install:
- poetry config virtualenvs.create false
- poetry install --with docs

python:
install:
- requirements: docs/requirements.txt
- method: pip
path: .

sphinx:
configuration: docs/source/conf.py
fail_on_warning: false

formats:
- pdf
- epub
41 changes: 35 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,40 @@
# CHANGELOG

## v1.0.9 (2025-08-02)

### Features
- export datasets to RDS files
- test workflow runs on a Python version matrix
- scikit-learn compatible data generator
- compatibility helpers for lifelines and scikit-survival

### Documentation
- updated usage examples and tutorials
- document optional scikit-survival dependency throughout the docs

### Continuous Integration
- auto-tag releases using the version check script

### Misc
- README quick example uses `covariate_range`

## v1.0.8 (2025-07-30)

### Documentation
- ensure absolute path resolution in `conf.py`
- drop unsupported theme option
- define bibliography anchors and headings
- fix tutorial links to non-existing docs
- add additional references to the bibliography

### Testing
- add CLI integration test
- expand piecewise generator test coverage

### Misc
- remove fix_recommendations.md



## v1.0.0 (2025-06-06)

Expand Down Expand Up @@ -186,9 +221,6 @@
- Update pyproject
([`a4b25e4`](https://github.com/DiogoRibeiro7/genSurvPy/commit/a4b25e470954091254b1384a44a991a47341bf80))

- Work
([`5ac5130`](https://github.com/DiogoRibeiro7/genSurvPy/commit/5ac513098238a8298430d1a95c6fbeed99db4cad))

### Continuous Integration

- Add GitHub Actions workflow for test automation
Expand Down Expand Up @@ -218,6 +250,3 @@

- Implement THMM data generator and finalize full model suite
([`1e667ba`](https://github.com/DiogoRibeiro7/genSurvPy/commit/1e667babf28892c3a85c43477562f2de85f07f3c))

- Work
([`45de359`](https://github.com/DiogoRibeiro7/genSurvPy/commit/45de359bbb0d7fbc671e41fa07d3a37b09e68e18))
Loading
Loading