Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
python-version: "3.11"
architecture: "x64"

- uses: actions/cache@v2
- uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}-
Expand Down
79 changes: 55 additions & 24 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,35 +19,45 @@ jobs:
if: "!contains(github.event.head_commit.message, 'ci skip')"
env:
RENV_PATHS_ROOT: ~/.local/share/renv
R_LIBS_USER: /home/runner/work/_temp/Library
R_PROFILE_USER: /home/runner/work/_temp/.Rprofile
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

strategy:
fail-fast: false
matrix:
config:
- {name: '3.13', os: ubuntu-latest, python: '3.13', r: 'release'}
- {name: '3.12', os: ubuntu-latest, python: '3.12', r: 'release'}
- {name: '3.11', os: ubuntu-latest, python: '3.11', r: 'release'}
- {name: '3.10', os: ubuntu-latest, python: '3.10', r: 'release'}
- {name: '3.9', os: ubuntu-latest, python: '3.9', r: 'release'}
- {name: '3.8', os: ubuntu-latest, python: '3.8', r: 'release'}
- {name: '3.7', os: ubuntu-latest, python: '3.7', r: 'oldrel'}

steps:

- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT

- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install system dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update -qq
sudo apt-get install -y pandoc gfortran libblas-dev liblapack-dev libedit-dev llvm-dev libcurl4-openssl-dev ffmpeg libhdf5-dev libfribidi-dev libharfbuzz-dev
sudo apt-get install -y \
pandoc gfortran libblas-dev liblapack-dev libedit-dev llvm-dev \
libcurl4-openssl-dev ffmpeg libhdf5-dev libfribidi-dev libharfbuzz-dev \
libxml2-dev libssl-dev \
libfontconfig1-dev libfreetype6-dev

- name: Install pkg-config
run: sudo apt-get update && sudo apt-get install -y pkg-config

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

Expand All @@ -57,6 +67,9 @@ jobs:
with:
r-version: ${{ matrix.config.r }}

- name: Set up Pandoc
uses: r-lib/actions/setup-pandoc@v2

- name: Cache Python packages
uses: pat-s/always-upload-cache@v2
with:
Expand All @@ -68,14 +81,15 @@ jobs:
uses: pat-s/always-upload-cache@v2
if: startsWith(runner.os, 'Linux')
with:
path: ${{ env.RENV_PATHS_ROOT }}
key: ${{ runner.os }}-renv-${{ steps.setup-r.outputs.installed-r-version }}-${{ hashFiles('**/renv.lock') }}-${{ steps.date.outputs.date }}
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-R-${{ steps.setup-r.outputs.installed-r-version }}-${{ hashFiles('DESCRIPTION') }}-v2
restore-keys: |
${{ runner.os }}-renv-${{ steps.setup-r.outputs.installed-r-version }}-${{ hashFiles('**/renv.lock') }}-
${{ runner.os }}-renv-${{ steps.setup-r.outputs.installed-r-version }}-
${{ runner.os }}-R-${{ steps.setup-r.outputs.installed-r-version }}-v2

- name: Install python tools
run: |
# Ensure pip is properly installed
python -m ensurepip --upgrade || true
python -m pip install --upgrade pip
pip install --upgrade wheel setuptools

Expand All @@ -84,23 +98,40 @@ jobs:
pip install rpy2
echo "LD_LIBRARY_PATH=$(python -m rpy2.situation LD_LIBRARY_PATH):${LD_LIBRARY_PATH}" >> $GITHUB_ENV

- name: Install scprep
id: install-python-packages
- name: Install core R packages
run: |
pip install --upgrade .[test]
python -c "import scprep"
install.packages(c("remotes", "devtools", "BiocManager"), repos = "https://cloud.r-project.org/")
shell: Rscript {0}

- name: Install Bioconductor packages
run: |
BiocManager::install(c("splatter", "slingshot"), ask = FALSE, update = FALSE)
shell: Rscript {0}

- name: Install R packages
id: install-r-packages
- name: Install GitHub packages
run: |
if (!requireNamespace("renv", quietly = TRUE)) install.packages("renv")
renv::restore()
renv::install("bioc::splatter")
renv::install("bioc::slingshot")
renv::install("github::dynverse/dyngen")
renv::install("github::dynverse/dynwrap")
remotes::install_github("dynverse/dyngen", upgrade = "never")
remotes::install_github("dynverse/dynwrap", upgrade = "never")
shell: Rscript {0}


- name: Verify R package installation
run: |
packages <- c("splatter", "slingshot", "dyngen", "dynwrap")
for (pkg in packages) {
if (!requireNamespace(pkg, quietly = TRUE)) {
stop(paste("Package", pkg, "failed to install"))
}
cat("✓ Package", pkg, "installed successfully\n")
}
shell: Rscript {0}

- name: Install scprep
id: install-python-packages
run: |
python -m pip install --upgrade .[test]
python -c "import scprep"

- name: Run tests
run: nose2 -vvv

Expand All @@ -113,7 +144,7 @@ jobs:

- name: Upload check results on fail
if: failure()
uses: actions/upload-artifact@master
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.config.name }}_results
path: check
path: check
89 changes: 89 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
[build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "scprep"
dynamic = ["version"]
description = "scprep"
authors = [
{name = "Scott Gigante, Daniel Burkhardt and Jay Stanley, Yale University", email = "krishnaswamylab@gmail.com"}
]
license = {text = "Yale License"}
readme = "README.rst"
requires-python = ">=3.9"
dependencies = [
"numpy>=1.26.0",
"scipy>=1.13.0",
"scikit-learn>=1.5.0",
"decorator>=4.3.0",
"pandas>=2.0.0",
"packaging",
]
keywords = [
"big-data",
"computational-biology",
]
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Console",
"Framework :: Jupyter",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Natural Language :: English",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering :: Bio-Informatics",
]

[tool.setuptools.dynamic]
version = {attr = "scprep.version.__version__"}

[project.urls]
Homepage = "https://github.com/KrishnaswamyLab/scprep"
Repository = "https://github.com/KrishnaswamyLab/scprep"
Download = "https://github.com/KrishnaswamyLab/scprep/archive/v{version}.tar.gz"

[project.optional-dependencies]
optional = [
"fcsparser<0.2.5",
"tables",
"h5py",
"anndata",
"anndata2ri>=1.0.6",
]
test = [
"nose",
"nose2",
"coverage",
"coveralls",
"parameterized",
"requests",
"packaging",
"mock",
"h5py",
"matplotlib>=3.0",
"rpy2>=3.4.3",
"black",
"fcsparser<0.2.5",
"tables",
"h5py",
"anndata",
"anndata2ri>=1.0.6",
]
doc = [
"sphinx>=2.2,<2.4",
"sphinxcontrib-napoleon",
"ipykernel",
"nbsphinx",
"autodocsumm",
]

[tool.setuptools.packages.find]
93 changes: 0 additions & 93 deletions setup.py

This file was deleted.

Loading