Skip to content

Commit

Permalink
Checked compatibility with different of python interpreters (removed …
Browse files Browse the repository at this point in the history
…variable type annotation so that support for versions < 3.6 is guaranteed).
  • Loading branch information
bramvds committed Mar 23, 2018
1 parent 4a8c461 commit dfffb44
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 11 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ docs/_build/
**/.ipynb_checkpoints/
**/dask-worker-space/
scripts/cli_test_data/
.python-version
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Installation
The lastest stable release of the **package** itself can be installed via :code:`pip install pyscenic`.

.. caution::
pySCENIC needs a python 3.x interpreter.
pySCENIC needs a python 3.5 or greater interpreter.

You can also install the bleeding edge (i.e. less stable) version of the package directly from the source:

Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Installation
The lastest stable release of the **package** itself can be installed via :code:`pip install pyscenic`.

.. caution::
pySCENIC needs a python 3.x interpreter.
pySCENIC needs a python 3.5 or greater interpreter.

You can also install the bleeding edge (i.e. less stable) version of the package directly from the source:

Expand Down
12 changes: 12 additions & 0 deletions runtox.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash

# Installation for MacOS X
# 1. brew update
# 2. brew install pyenv
# Check latest versions of python interpreters on
# 3. pyenv install 3.5.5 && pyenv install 3.6.4
# In same directory as setup.py:
# 4. pyenv local 3.5.5 3.6.4

eval "$(pyenv init -)"
tox
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,11 @@ def read_requirements(fname):
'Operating System :: POSIX',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: Implementation :: CPython',
],
python_requires=">3.3",
python_requires=">=3.5",
keywords='single-cell transcriptomics gene-regulatory-network transcription-factors',
author="Bram Van de Sande",
url='https://github.com/aertslab/pySCENIC',
Expand Down
12 changes: 6 additions & 6 deletions src/pyscenic/genesig.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,9 @@ def columns():
nomenclature=nomenclature,
gene2weights=list(columns()))

name: str = attr.ib()
nomenclature: str = attr.ib()
gene2weights: Mapping[str, float] = attr.ib(converter=convert)
name = attr.ib() # str
nomenclature = attr.ib() # str
gene2weights = attr.ib(converter=convert) # Mapping[str, float]

@name.validator
def name_validator(self, attribute, value):
Expand Down Expand Up @@ -308,9 +308,9 @@ def from_yaml(cls, loader, node):
context=frozenset(data['context']),
transcription_factor=data['transcription_factor'])

transcription_factor: str = attr.ib()
context: FrozenSet[str] = attr.ib(default=frozenset())
score: float = attr.ib(default=0.0)
transcription_factor = attr.ib() # str
context = attr.ib(default=frozenset()) # FrozenSet[str]
score = attr.ib(default=0.0) # float

@transcription_factor.validator
def non_empty(self, attribute, value):
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# and then run "tox" from this directory.

[tox]
envlist = py36,py35,py34,py33
envlist = py36,py35

[testenv]
commands = pytest
Expand Down

0 comments on commit dfffb44

Please sign in to comment.