Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
f868dd1
Revert mistaken merge (#209)
JoshLoecker Dec 13, 2024
941e073
chore(deps): bump astral-sh/ruff-action from 2 to 3 (#213)
dependabot[bot] Jan 6, 2025
fdfd0ec
chore(deps): bump astral-sh/setup-uv from 4 to 5
dependabot[bot] Jan 6, 2025
6d74649
Merge pull request #212 from HelikarLab/dependabot/github_actions/ast…
JoshLoecker Jan 6, 2025
5b3e8c0
add python distribution build workflow
Apr 19, 2025
373a056
feat: added builds for macos and windows
JoshLoecker Apr 30, 2025
46b020f
feat: set name of job based on OS & Python version
JoshLoecker Apr 30, 2025
fb28848
chore: bump scanpy version
JoshLoecker Apr 30, 2025
a828348
chore: bump statsmodels version
JoshLoecker Apr 30, 2025
2ad92a3
fix: ruff linting errors
JoshLoecker Apr 30, 2025
83432bc
style: format code, Jupyter Notebook(s), and Python imports with `ruff`
JoshLoecker Apr 30, 2025
35dc4de
chore: retrigger checks
JoshLoecker Oct 2, 2025
09c284a
Merge branch 'develop' of github.com:HelikarLab/COMO into ruff-lint-e…
JoshLoecker Oct 2, 2025
9dcb668
chore: bump scanpy version
JoshLoecker Oct 2, 2025
879f6a8
chore: bump scanpy version
JoshLoecker Oct 2, 2025
f26eedd
style: format code, Jupyter Notebook(s), and Python imports with `ruff`
JoshLoecker Oct 2, 2025
0ac9ef8
chore: retrigger checks
JoshLoecker Oct 2, 2025
a11681d
Merge branch 'ruff-lint-errors' of github.com:HelikarLab/COMO into ru…
JoshLoecker Oct 2, 2025
c886829
fix(ruff): force `strict=True` for zip
JoshLoecker Oct 2, 2025
a463dba
style: format code, Jupyter Notebook(s), and Python imports with `ruff`
JoshLoecker Oct 2, 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
12 changes: 6 additions & 6 deletions .github/workflows/continuous_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v4
uses: astral-sh/setup-uv@v5

- name: Create Virtual Environment
run: uv venv
Expand All @@ -26,17 +26,17 @@ jobs:
run: uv run jupyter nbconvert --clear-output --inplace "main/COMO.ipynb"

- name: Format Python Imports
uses: astral-sh/ruff-action@v2
uses: astral-sh/ruff-action@v3
with:
args: "check --fix --select I"

- name: Format code
uses: astral-sh/ruff-action@v2
uses: astral-sh/ruff-action@v3
with:
args: "format"

- name: Format Notebook
uses: astral-sh/ruff-action@v2
uses: astral-sh/ruff-action@v3
with:
args: "format main/COMO.ipynb"

Expand All @@ -54,7 +54,7 @@ jobs:
uses: actions/checkout@v4

- name: Check Lint
uses: astral-sh/ruff-action@v2
uses: astral-sh/ruff-action@v3
with:
args: "check --no-fix --verbose"

Expand All @@ -68,7 +68,7 @@ jobs:
uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v4
uses: astral-sh/setup-uv@v5
with:
enable-cache: "true"
cache-suffix: "${{ matrix.python-version }}"
Expand Down
92 changes: 92 additions & 0 deletions .github/workflows/pypackage_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
name: Build and publish python package

on:
push:
tags:
- "*"

# Define permissions needed for the workflow GITHUB_TOKEN
permissions:
contents: read # Allow checkout
packages: write # Allow publishing to GitHub Packages


jobs:
build:
strategy:
matrix:
operating-system: [macos-latest, ubuntu-latest, windows-latest]
python-version: [ 3.10, 3.11, 3.12, 3.13 ]

name: Build Python Package (${{ matrix.operating-system }}, Python ${{ matrix.python-version }})
runs-on: ${{ matrix.operating-system }}

steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}

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

- name: Install Hatch
run: pip install hatch

- name: Build distributions
run: hatch build # Uses pyproject.toml to build sdist and wheel into dist/

- name: Upload distributions artifact
uses: actions/upload-artifact@v4 # Action to save artifacts between jobs
with:
name: como-distribution-package-${{ matrix.operating-system }}-${{ matrix.python-version }} # Name for the artifact
path: dist/ # Path to the directory to upload

publish:
strategy:
matrix:
python-version: [ 3.10, 3.11, 3.12, 3.13 ]
operating-system: [macos-latest, windows-latest, ubuntu-latest]

name: Publish to GitHub Packages
runs-on: ubuntu-latest
needs: build # Depends on the build job succeeding

# IMPORTANT: Only run the publish job when a tag starting with 'v' is pushed
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')


permissions: # Explicit permissions needed for this job
packages: write # Required to write to GitHub Packages registry
contents: read # Needed if accessing repo content (e.g., for download artifact)

steps:
- name: Download distributions artifact
uses: actions/download-artifact@v4 # Action to retrieve artifacts from previous job.
with:
name: como-distribution-package-${{ matrix.operating-system }}-${{ matrix.python-version }}
path: dist/

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

- name: Install Twine
run: pip install twine

- name: Publish package to GitHub Packages
env:
# Use __token__ as username and the automatically generated GITHUB_TOKEN as password
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
run: |
echo "Uploading to GitHub Packages for repository: ${{ github.repository }}"
# Construct the repository URL dynamically using the repository owner
TWINE_REPOSITORY_URL="https://pypi.pkg.github.com/${{ github.repository_owner }}"
python -m twine upload --verbose --repository-url ${TWINE_REPOSITORY_URL} dist/*



Loading