Skip to content

Commit

Permalink
Merge pull request #133 from scottgigante-immunai/rpy2/converter
Browse files Browse the repository at this point in the history
Clear warnings and test errors
  • Loading branch information
scottgigante committed Sep 22, 2022
2 parents 926d7be + 905e63c commit 57d6d7d
Show file tree
Hide file tree
Showing 9 changed files with 217 additions and 203 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ jobs:
with:
access_token: ${{ github.token }}

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

- uses: actions/checkout@v2
with:
fetch-depth: 0
Expand Down Expand Up @@ -63,8 +67,9 @@ jobs:
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') }}
key: ${{ runner.os }}-renv-${{ steps.setup-r.outputs.installed-r-version }}-${{ hashFiles('**/renv.lock') }}-${{ steps.date.outputs.date }}
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 }}-
- name: Install python tools
Expand Down
12 changes: 6 additions & 6 deletions scprep/run/conversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ def rpy2py(robject):
for converter in [
_rpynull2py,
_rpysce2py,
rpy2.robjects.pandas2ri.rpy2py,
rpy2.robjects.pandas2ri.converter.rpy2py,
_rpylist2py,
rpy2.robjects.numpy2ri.rpy2py,
rpy2.robjects.conversion.rpy2py,
rpy2.robjects.numpy2ri.converter.rpy2py,
rpy2.robjects.default_converter.rpy2py,
]:
if _is_r_object(robject):
try:
Expand Down Expand Up @@ -119,9 +119,9 @@ def py2rpy(pyobject):
for converter in [
_pynull2rpy,
_pysce2rpy,
rpy2.robjects.pandas2ri.py2rpy,
rpy2.robjects.numpy2ri.py2rpy,
rpy2.robjects.conversion.py2rpy,
rpy2.robjects.pandas2ri.converter.py2rpy,
rpy2.robjects.numpy2ri.converter.py2rpy,
rpy2.robjects.default_converter.py2rpy,
]:
if not _is_r_object(pyobject):
try:
Expand Down
10 changes: 6 additions & 4 deletions scprep/run/dyngen.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@
args="""lib=.libPaths()[1], dependencies=NA,
repos='http://cran.rstudio.com', verbose=TRUE""",
body="""
install.packages(c("dynwrap", "dyngen"),
lib=lib,
repos=repos,
dependencies=dependencies)
install.packages(
c("dynwrap", "dyngen"),
lib=lib,
repos=repos,
dependencies=dependencies
)
""",
)

Expand Down
3 changes: 1 addition & 2 deletions scprep/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import numbers
import numpy as np
import pandas as pd
import scipy.sparse
import warnings

plt = matplotlib.pyplot
Expand Down Expand Up @@ -550,7 +549,7 @@ def differential_expression(
X, Y, measure="difference", direction="both", gene_names=None, n_jobs=-2
):
"""Calculate the most significant genes between two datasets.
If using ``measure="emd"``, the test statistic is multiplied by the sign of
the mean differencein order to allow for distinguishing between positive
and negative shifts. To ignore this, use ``direction="both"`` to sort by the
Expand Down
2 changes: 1 addition & 1 deletion scprep/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.2.0"
__version__ = "1.2.1"
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"mock",
"h5py",
"matplotlib>=3.0",
"rpy2>=3.0",
"rpy2>=3.4.3",
"black",
]

Expand Down

0 comments on commit 57d6d7d

Please sign in to comment.