Skip to content
Merged

Dev #200

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
a77ff24
Python versions updated
JoseCorCab Feb 9, 2026
b409cc7
GH actions activated for dev branch
JoseCorCab Feb 9, 2026
318b584
Configure GHA to run in Python versions (minimun and last)
JoseCorCab Feb 9, 2026
1b84538
Genome installation during test changed to CLI
JoseCorCab Feb 10, 2026
c62adac
Genome installation using install_genome.py has been disabled
JoseCorCab Feb 10, 2026
4dc59c6
CLI controller has been corrected for parsing comma sepparated argume…
JoseCorCab Feb 10, 2026
5249dd4
str2list function tested
JoseCorCab Feb 10, 2026
60b7f6d
Test documentation wiki
JoseCorCab Feb 12, 2026
a24a4f0
tests moved for rendering documentation
JoseCorCab Feb 12, 2026
1f0d8da
Tests has been restored
JoseCorCab Feb 12, 2026
bbe4d6b
security issue in dependences fixed
JoseCorCab Feb 12, 2026
7c0fcb9
test gh pages from GH actions
JoseCorCab Feb 17, 2026
ad6f96e
Documentation index corrected
JoseCorCab Feb 17, 2026
41ba91e
Style updated
JoseCorCab Feb 17, 2026
98ee6ad
Documentation has been updated
JoseCorCab Feb 18, 2026
571ea9d
Advanced mode specified
JoseCorCab Feb 18, 2026
1b961ab
Readme has been simplified
JoseCorCab Feb 18, 2026
9534d49
Refactor README structure and add documentation sections
marcos-diazg Feb 19, 2026
b964468
Update README
marcos-diazg Feb 19, 2026
f2e621b
Fix sample reconstruction plots to support custom signature databases…
JoseCorCab Jun 18, 2026
19540d9
Documentation badge has been corrected
JoseCorCab Jun 26, 2026
b8445b9
Figure moved to assets
JoseCorCab Jun 26, 2026
d58bcfd
ci test activated
JoseCorCab Jun 26, 2026
d47b69c
ci temp file removed
JoseCorCab Jun 26, 2026
702a9f5
update: new autorelease mecanism has been created
JoseCorCab Jul 2, 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
67 changes: 21 additions & 46 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- main
- dev
pull_request:
branches:
- main
Expand All @@ -17,78 +18,52 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.12']
python-version: ['3.9', '3.14']

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

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

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y poppler-utils

- name: Upgrade pip, setuptools, and packaging
run: |
python -m pip install --upgrade pip setuptools packaging

- name: Cache src directory
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: ./src/
path: ${{ github.workspace }}/src/
key: ${{ runner.os }}-src-grch37
restore-keys: |
${{ runner.os }}-src-

- name: Download GRCh37.tar.gz if not present
run: |
if [ ! -f ./src/GRCh37.tar.gz ]; then
wget --connect-timeout=10 --tries=20 ftp://alexandrovlab-ftp.ucsd.edu/pub/tools/SigProfilerMatrixGenerator/GRCh37.tar.gz -P ./src/
if [ ! -f ${{ github.workspace }}/src/GRCh37.tar.gz ]; then
wget --connect-timeout=10 --tries=20 ftp://alexandrovlab-ftp.ucsd.edu/pub/tools/SigProfilerMatrixGenerator/GRCh37.tar.gz -P ${{ github.workspace }}/src/
fi

- name: Install package with tests
run: |
pip install .[tests]

- name: Install genome
run: |
python install_genome.py ${{ github.workspace }}/src/
SigProfilerMatrixGenerator install GRCh37 --local_genome ${{ github.workspace }}/src/

- name: Run unit tests
run: |
pytest tests

pip install pytest
pytest -s -rw tests

- name: Run integration test
run: |
python3 test.py

- name: Build and push Docker image
if: github.ref == 'refs/heads/main' && github.event_name == 'push' && matrix.python-version == '3.12'
run: |
echo "Starting Docker deployment to GHCR for sigprofilersuite..."

VERSION_TAG=$(grep "VERSION = " setup.py | cut -d'"' -f2)

# Get the repository name and convert it to lowercase
REPO_NAME=$(basename ${{ github.repository }} | tr '[:upper:]' '[:lower:]')
IMAGE_NAME="ghcr.io/sigprofilersuite/$REPO_NAME"

echo "Building version: $VERSION_TAG for image: $IMAGE_NAME"

echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io \
--username "${{ github.actor }}" \
--password-stdin

docker build \
--build-arg COMMIT_SHA=${{ github.sha }} \
-t $IMAGE_NAME:$VERSION_TAG \
-t $IMAGE_NAME:latest .

docker push $IMAGE_NAME:$VERSION_TAG
docker push $IMAGE_NAME:latest

echo "Docker deployment to GHCR successful"
55 changes: 55 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Docs

on:
push:
branches:
- master
- dev
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: github-pages
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.x"

- name: Configure Pages
uses: actions/configure-pages@v5

- name: Install docs dependencies
run: |
python -m pip install --upgrade pip
python -m pip install mkdocs mkdocs-material pymdown-extensions

- name: Build site
run: |
mkdocs build --clean

- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: site

deploy:
runs-on: ubuntu-latest
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v4

125 changes: 125 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
name: Create Release from setup.py

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

jobs:
release:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest

permissions:
contents: write

outputs:
version: ${{ steps.get_version.outputs.VERSION }}

steps:
- name: Checkout repo
uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.14"

- name: Upgrade pip, setuptools, packaging and install git-cliff
run: |
python -m pip install --upgrade pip setuptools packaging
pip install git-cliff

- name: Extract version from setup.py
id: get_version
run: |
VERSION=$(python setup.py --version)
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT

- name: Get latest release tag
id: get_last_release
run: |
latest=$(curl -s \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
https://api.github.com/repos/${{ github.repository }}/releases/latest \
| jq -r '.tag_name // "v0.0.0"' | sed 's/^v//')
echo "LATEST_RELEASE=$latest" >> $GITHUB_ENV

- name: Check release version
run: |
echo "New version: ${{ steps.get_version.outputs.VERSION }}"
echo "Latest release: $LATEST_RELEASE"
python - <<EOF
from packaging.version import parse

new_version = parse("${{ steps.get_version.outputs.VERSION }}")
latest_version = parse("$LATEST_RELEASE")

if new_version <= latest_version:
raise SystemExit(f"Error: New version ({new_version}) is not higher than latest release ({latest_version})")
EOF

- name: Generate release notes and update CHANGELOG.md
run: |
git-cliff --unreleased --strip all --tag "v${{ steps.get_version.outputs.VERSION }}" > RELEASE_NOTES.md
git-cliff --unreleased --tag "v${{ steps.get_version.outputs.VERSION }}" --prepend CHANGELOG.md

- name: Commit and push CHANGELOG.md
run: |
git config user.name "github-actions"
git config user.email "github-actions@github.com"
git add CHANGELOG.md
git commit -m "chore: update CHANGELOG.md for v${{ steps.get_version.outputs.VERSION }}"
git push origin HEAD:main

- name: Create Git tag
run: |
git tag v${{ steps.get_version.outputs.VERSION }}
git push origin v${{ steps.get_version.outputs.VERSION }}

- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ steps.get_version.outputs.VERSION }}
body_path: RELEASE_NOTES.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

sync-dev:
needs: release
runs-on: ubuntu-latest

permissions:
contents: write
pull-requests: write

steps:
- name: Checkout repo
uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Merge main into a sync branch off dev
run: |
git config user.name "github-actions"
git config user.email "github-actions@github.com"
git fetch origin main dev
git checkout -b sync/main-into-dev-${{ github.run_id }} origin/dev
git merge origin/main --no-edit

- name: Push sync branch
run: git push origin sync/main-into-dev-${{ github.run_id }}

- name: Open PR into dev
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh pr create \
--base dev \
--head sync/main-into-dev-${{ github.run_id }} \
--title "chore: sync main into dev after v${{ needs.release.outputs.version }}" \
--body "Automated sync of \`main\` into \`dev\` after release v${{ needs.release.outputs.version }}."
Loading
Loading