forked from scverse/scanpy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Centralize setup information (scverse#1381)
- Loading branch information
1 parent
c9fbe5c
commit 912e7d0
Showing
15 changed files
with
117 additions
and
92 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,12 @@ | ||
version: 2 | ||
build: | ||
image: latest | ||
sphinx: | ||
configuration: docs/conf.py | ||
python: | ||
version: 3.6 | ||
install: | ||
- method: pip | ||
path: . | ||
extra_requirements: | ||
- doc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,25 @@ | ||
[build-system] | ||
requires = ['setuptools', 'setuptools_scm', 'wheel'] | ||
requires = ['setuptools', 'setuptools_scm', 'wheel', 'pytoml'] | ||
build-backend = 'setuptools.build_meta' | ||
|
||
# uses the format of tool.flit.metadata because we’ll move to it anyway | ||
[tool.scanpy] | ||
author = ''' | ||
Alex Wolf, Philipp Angerer, Fidel Ramirez, Isaac Virshup, | ||
Sergei Rybakov, Gokcen Eraslan, Tom White, Malte Luecken, | ||
Davide Cittaro, Tobias Callies, Marius Lange, Andrés R. Muñoz-Rojas | ||
''' | ||
# We don’t need all emails, the main authors are sufficient. | ||
author-email = '[email protected], [email protected]' | ||
|
||
[tool.pytest.ini_options] | ||
python_files = 'test_*.py' | ||
testpaths = 'scanpy/tests/' | ||
xfail_strict = true | ||
markers = [ | ||
'internet: tests which rely on internet resources (enable with `--internet-tests`)', | ||
] | ||
|
||
[tool.black] | ||
line-length = 88 | ||
target-version = ['py36'] | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,5 @@ joblib | |
numba>=0.41.0 | ||
umap-learn>=0.3.10 | ||
legacy-api-wrap | ||
setuptools_scm | ||
packaging | ||
sinfo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,10 @@ | ||
# some technical stuff | ||
import sys | ||
from ._utils import pkg_version, check_versions, annotate_doc_types | ||
"""Single-Cell Analysis in Python.""" | ||
|
||
__author__ = ', '.join([ | ||
'Alex Wolf', | ||
'Philipp Angerer', | ||
'Fidel Ramirez', | ||
'Isaac Virshup', | ||
'Sergei Rybakov', | ||
'Gokcen Eraslan', | ||
'Tom White', | ||
'Malte Luecken', | ||
'Davide Cittaro', | ||
'Tobias Callies', | ||
'Marius Lange', | ||
'Andrés R. Muñoz-Rojas', | ||
]) | ||
__email__ = ', '.join([ | ||
'[email protected]', | ||
'[email protected]', | ||
# We don’t need all, the main authors are sufficient. | ||
]) | ||
try: | ||
from setuptools_scm import get_version | ||
__version__ = get_version(root='..', relative_to=__file__) | ||
del get_version | ||
except (LookupError, ImportError): | ||
__version__ = str(pkg_version(__name__)) | ||
from ._metadata import __version__, __author__, __email__ | ||
|
||
from ._utils import check_versions | ||
check_versions() | ||
del pkg_version, check_versions | ||
del check_versions | ||
|
||
# the actual API | ||
from ._settings import settings, Verbosity # start with settings as several tools are using it | ||
|
@@ -46,5 +21,7 @@ | |
set_figure_params = settings.set_figure_params | ||
|
||
# has to be done at the end, after everything has been imported | ||
import sys | ||
from ._utils import annotate_doc_types | ||
annotate_doc_types(sys.modules[__name__], 'scanpy') | ||
del sys, annotate_doc_types |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
from pathlib import Path | ||
|
||
here = Path(__file__).parent | ||
|
||
try: | ||
from setuptools_scm import get_version | ||
import pytoml | ||
|
||
proj = pytoml.loads((here.parent / 'pyproject.toml').read_text()) | ||
metadata = proj['tool']['scanpy'] | ||
|
||
__version__ = get_version(root='..', relative_to=__file__) | ||
__author__ = metadata['author'] | ||
__email__ = metadata['author-email'] | ||
except (ImportError, LookupError, FileNotFoundError): | ||
from ._compat import pkg_metadata | ||
|
||
metadata = pkg_metadata(here.name) | ||
__version__ = metadata['Version'] | ||
__author__ = metadata['Author'] | ||
__email__ = metadata['Author-email'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters