-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use pyproject toml instead of setup.py (#382)
- Loading branch information
1 parent
1702faf
commit bf15323
Showing
10 changed files
with
123 additions
and
86 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,84 @@ | ||
[build-system] | ||
requires = ["setuptools>=64"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "roiextractors" | ||
version = "0.5.11" | ||
description = "Python module for extracting optical physiology ROIs and traces for various file types and formats" | ||
readme = "README.md" | ||
license = { file = "LICENSE.txt" } | ||
authors = [ | ||
{ name = "Heberto Mayorquin" }, | ||
{ name = "Szonja Weigl" }, | ||
{ name = "Cody Baker" }, | ||
{ name = "Ben Dichter", email = "[email protected]" }, | ||
{ name = "Alessio Buccino" }, | ||
{ name = "Paul Adkisson" }, | ||
{ name = "Alessandra Trapani" } | ||
] | ||
keywords = ["ROI", "extraction", "optical physiology"] | ||
classifiers = [ | ||
"Intended Audience :: Science/Research", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"Operating System :: POSIX :: Linux", | ||
"Operating System :: Microsoft :: Windows", | ||
"Operating System :: MacOS", | ||
"License :: OSI Approved :: BSD License", | ||
] | ||
requires-python = ">=3.9" | ||
|
||
dependencies = [ | ||
"h5py>=2.10.0", | ||
"pynwb>=2.0.1", | ||
"tqdm>=4.48.2", | ||
"lazy_ops>=0.2.0", | ||
"dill>=0.3.2", | ||
"scipy>=1.5.2", | ||
"psutil>=5.8.0", | ||
"PyYAML", | ||
"lxml", | ||
"packaging" | ||
] | ||
|
||
[project.optional-dependencies] | ||
full = [ | ||
"tifffile>=2018.10.18", | ||
"scanimage-tiff-reader>=1.4.1.4", | ||
"neuroconv[video]>=0.4.6", | ||
"opencv-python-headless>=4.8.1.78", | ||
"natsort>=8.3.1", | ||
"isx>=1.0.4" | ||
] | ||
test = [ | ||
"pytest", | ||
"pytest-cov", | ||
"parameterized==0.8.1", | ||
"spikeinterface>=0.100.7", | ||
"pytest-xdist" | ||
] | ||
docs = [ | ||
"Jinja2", | ||
"Sphinx", | ||
"sphinx_rtd_theme", | ||
"readthedocs-sphinx-search", | ||
"sphinx-toggleprompt", | ||
"sphinx-copybutton", | ||
"pydata_sphinx_theme" | ||
] | ||
|
||
[project.urls] | ||
"Homepage" = "https://github.com/catalystneuro/roiextractors" | ||
"Documentation" = "https://roiextractors.readthedocs.io//" | ||
"Changelog" = "https://github.com/catalystneuro/roiextractors/blob/main/CHANGELOG.md" | ||
|
||
[tool.setuptools.packages.find] | ||
where = ["src"] | ||
|
||
|
||
|
||
[tool.black] | ||
line-length = 120 | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,31 +1,43 @@ | ||
import os | ||
import json | ||
import tempfile | ||
from pathlib import Path | ||
from tempfile import mkdtemp | ||
from shutil import copy | ||
import json | ||
|
||
import pytest | ||
# Output by default to a temporary directory | ||
OUTPUT_PATH = Path(tempfile.mkdtemp()) | ||
|
||
|
||
file_path = Path(__file__).parent / "gin_test_config.json" | ||
# Load the configuration for the data tests | ||
|
||
with open(file=file_path) as f: | ||
test_config_dict = json.load(f) | ||
|
||
if os.getenv("CI"): | ||
LOCAL_PATH = Path(".") # Must be set to "." for CI | ||
print("Running GIN tests on Github CI!") | ||
else: | ||
# Override LOCAL_PATH in the `gin_test_config.json` file to a point on your system that contains the dataset folder | ||
# Use DANDIHub at hub.dandiarchive.org for open, free use of data found in the /shared/catalystneuro/ directory | ||
test_config_path = Path(__file__).parent / "gin_test_config.json" | ||
config_file_exists = test_config_path.exists() | ||
if not config_file_exists: | ||
|
||
root = test_config_path.parent.parent | ||
base_test_config_path = root / "base_gin_test_config.json" | ||
|
||
test_config_path.parent.mkdir(parents=True, exist_ok=True) | ||
copy(src=base_test_config_path, dst=test_config_path) | ||
|
||
with open(file=test_config_path) as f: | ||
# Load the configuration for the data tests | ||
test_config_dict = json.load(f) | ||
|
||
LOCAL_PATH = Path(test_config_dict["LOCAL_PATH"]) | ||
print("Running GIN tests locally!") | ||
|
||
if test_config_dict["SAVE_OUTPUTS"]: | ||
OUTPUT_PATH = LOCAL_PATH / "neuroconv_test_outputs" | ||
OUTPUT_PATH.mkdir(exist_ok=True, parents=True) | ||
|
||
|
||
OPHYS_DATA_PATH = LOCAL_PATH / "ophys_testing_data" | ||
if not OPHYS_DATA_PATH.exists(): | ||
pytest.fail(f"No folder found in location: {OPHYS_DATA_PATH}!") | ||
|
||
if test_config_dict["SAVE_OUTPUTS"]: | ||
OUTPUT_PATH = LOCAL_PATH / "example_nwb_output" | ||
OUTPUT_PATH.mkdir(exist_ok=True) | ||
else: | ||
OUTPUT_PATH = Path(mkdtemp()) | ||
TEXT_DATA_PATH = Path(__file__).parent.parent.parent / "tests" / "test_text" |