Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 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
8 changes: 2 additions & 6 deletions .github/workflows/core-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,9 @@ jobs:
matrix:
os: ["ubuntu-latest", "windows-latest"]
# "macos-latest",
python-version: ['3.7', '3.8', '3.9', '3.10']
numpy-version: ['1.18.5', '1.19.5', '1.20.3', '1.21.6', '1.22.4', '1.23.0']
python-version: ['3.8', '3.9', '3.10']
numpy-version: [ '1.20.3', '1.21.6', '1.22.4', '1.23.4']
exclude:
- python-version: '3.7'
numpy-version: '1.22.4'
- python-version: '3.7'
numpy-version: '1.23.0'
- python-version: '3.10'
numpy-version: '1.18.5'
- python-version: '3.10'
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/io-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
matrix:
# "macos-latest", "windows-latest"
os: ["ubuntu-latest", ]
python-version: ['3.8', ]
python-version: ['3.9', ]
defaults:
# by default run in bash mode (required for conda usage)
run:
Expand Down Expand Up @@ -59,7 +59,7 @@ jobs:
id: cache-conda-env
with:
path: /usr/share/miniconda/envs/neo-test-env
key: ${{ runner.os }}-conda-env-${{ hashFiles('**/requirements.txt') }}-${{ hashFiles('**/requirements_testing.txt') }}-${{ hashFiles('**/environment_testing.txt') }}-${{ steps.date.outputs.date }}
key: ${{ runner.os }}-conda-env-${{ hashFiles('**/pyproject.toml') }}-${{ steps.date.outputs.date }}

- name: Install testing dependencies
# testing environment is only installed if no cache was found
Expand All @@ -75,6 +75,7 @@ jobs:
- name: Install neo
run: |
pip install --upgrade -e .
pip install .[test]

- name: Test with pytest
run: |
Expand Down
4 changes: 3 additions & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,6 @@ python:
install:
- method: pip
path: .
- requirements: doc/requirements_docs.txt
extra_requirements:
- docs

3 changes: 0 additions & 3 deletions doc/requirements_docs.txt

This file was deleted.

9 changes: 4 additions & 5 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,16 @@

import os
import sys
import re

from packaging.version import Version

with open("../../neo/version.py") as fp:
d = {}
exec(fp.read(), d)
neo_release = d['version']
with open('../../pyproject.toml', mode='r') as f:
txt = f.read()
neo_release = re.findall('version = "(\S+)"', txt)[0]

neo_version = '.'.join((str(e) for e in Version(neo_release).release[:2]))


AUTHORS = 'Neo authors and contributors <[email protected]>'

# If extensions (or modules to document with autodoc) are in another directory,
Expand Down
2 changes: 0 additions & 2 deletions environment_testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,3 @@ channels:
dependencies:
- datalad
- pip
- pip:
- -r requirements_testing.txt
4 changes: 3 additions & 1 deletion neo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
Neo is a package for representing electrophysiology data in Python,
together with support for reading a wide range of neurophysiology file formats
'''
import importlib.metadata
# this need to be at the begining because some sub module will need the version
__version__ = importlib.metadata.version("neo")

import logging

Expand All @@ -10,4 +13,3 @@
from neo.core import *
from neo.io import *

from neo.version import version as __version__
2 changes: 1 addition & 1 deletion neo/io/nixio.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
IrregularlySampledSignal, Epoch, Event, SpikeTrain,
ImageSequence, ChannelView, Group)
from ..io.proxyobjects import BaseProxy
from ..version import version as neover
from .. import __version__ as neover


datetime_types = (date, time, datetime)
Expand Down
1 change: 0 additions & 1 deletion neo/version.py

This file was deleted.

80 changes: 80 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
[project]
name = "neo"
version = "0.12.0.dev0"

authors = [{name = "Neo authors and contributors"}]

description = "Neo is a package for representing electrophysiology data in Python, together with support for reading a wide range of neurophysiology file formats"

readme = "README.rst"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I presume this replaces the "long_description" field?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

description is the short one from what I understand.
For the long one. I don't known how to include yet.
I forgot also about that.
Maybe the readme replace it no ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This readme is also the readme in pypi. So yes this replace the long description.

requires-python = ">=3.7"
license = {text = "BSD 3-Clause License"}
classifiers = [
"Programming Language :: Python :: 3",
"Operating System :: OS Independent",
"Intended Audience :: Science/Research",
"Natural Language :: English",
"Topic :: Scientific/Engineering",
]

dependencies = [
"packaging",
"numpy>=1.18.5",
"quantities>=0.12.1",
]

[project.urls]
"Homepage" = "https://neuralensemble.org/neo"

[build-system]
requires = ["setuptools>=62.0"]
build-backend = "setuptools.build_meta"

[tool.setuptools]
packages = ["neo"]
package-dir = {"neo" = "neo"}

[project.optional-dependencies]

test = [
"pytest",
"pytest-cov",

# datalad # this dependency is covered by conda (environment_testing.yml)
"scipy>=1.0.0",
"pyedflib",
"h5py",
"igor",
"klusta",
"tqdm",
"nixio",
"matplotlib",
"ipython",
"coverage",
"coveralls",
"pillow",
"sonpy",
"pynwb",
"probeinterface",
]

docs = [
"docutils<0.18",
]

igorproio = ['igor']
kwikio = ['klusta']
neomatlabio = ['scipy>=1.0.0']
nixio = ['nixio>=1.5.0']
stimfitio = ['stfio']
tiffio = ['pillow']
edf = ['pyedflib']
ced = ['sonpy']
nwb = ['pynwb']
maxwell = ['h5py']
biocam = ['h5py']

# TODO [all]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaSprenger please note that I have not find a way to do the all the moment.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think for implementing the 'all' keyword in this framework we need to duplicate the requirements here. It's not nice, but acceptable I think.




3 changes: 0 additions & 3 deletions requirements.txt

This file was deleted.

18 changes: 0 additions & 18 deletions requirements_testing.txt

This file was deleted.

60 changes: 3 additions & 57 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,58 +1,4 @@
#!/usr/bin/env python
import setuptools

from setuptools import setup, find_packages
import os

long_description = open("README.rst").read()
install_requires = ['packaging',
'numpy>=1.18.5',
'quantities>=0.12.1']
extras_require = {
'igorproio': ['igor'],
'kwikio': ['klusta'],
'neomatlabio': ['scipy>=1.0.0'],
'nixio': ['nixio>=1.5.0'],
'stimfitio': ['stfio'],
'tiffio': ['pillow'],
'edf': ['pyedflib'],
'ced': ['sonpy'],
'nwb': ['pynwb'],
'maxwell': ['h5py'],
'biocam': ['h5py'],
}
extras_require["all"] = sum(extras_require.values(), [])

with open("neo/version.py") as fp:
d = {}
exec(fp.read(), d)
neo_version = d['version']

setup(
name="neo",
version=neo_version,
packages=find_packages(),
install_requires=install_requires,
extras_require=extras_require,
author="Neo authors and contributors",
author_email="[email protected]",
description="Neo is a package for representing electrophysiology data in "
"Python, together with support for reading a wide range of "
"neurophysiology file formats",
long_description=long_description,
license="BSD-3-Clause",
url='https://neuralensemble.org/neo',
python_requires=">=3.7",
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: BSD License',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3 :: Only',
'Topic :: Scientific/Engineering']
)
if __name__ == "__main__":
setuptools.setup()
10 changes: 0 additions & 10 deletions tox.ini

This file was deleted.