diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f36109b..ec2b127 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.10", "3.11", "3.12"] env: JNML_HOME: "/home/runner/work/NeuroMLlite/NeuroMLlite/jNeuroML" HDF5_DISABLE_VERSION_CHECK: 1 @@ -33,9 +33,7 @@ jobs: - name: Install NeuroMLlite and extra requirements run: | pip install . - pip install -r requirements-extra.txt - - #pip install 'numpy<=1.23.0' # temp fix, see https://github.com/OpenSourceBrain/osb-model-validation/issues/91 + pip install .[dev] - name: Lint with flake8 @@ -57,8 +55,7 @@ jobs: git clone https://github.com/NeuroML/pyNeuroML.git cd pyNeuroML git checkout $pynml_branch - pip install pandas==1.3.5 - pip install NEURON==8.2.2 # Specify version of neuron - 8.2.1 fails + pip install "NEURON>=8.2.2" # Specify version of neuron - 8.2.1 fails #pip install -r requirements-dev.txt pip install . cd - @@ -93,7 +90,7 @@ jobs: - name: Install some simulators for testing run: | - #pip install cython + pip install "cython<3.1.0" # for nest... omv install NEURON pip install NetPyNE # strange issues on py3.7 with omv install... omv install PyNN diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..94bde9e --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,16 @@ +# See https://pre-commit.com for more information +# See https://pre-commit.com/hooks.html for more hooks +repos: +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.4.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-added-large-files + args: [ "--maxkb=5000"] +- repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.4.1 + hooks: + - id: ruff + args: [ "--select", "I", "--fix" ] + - id: ruff-format diff --git a/README.md b/README.md index 3077ea6..0d4dbdf 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ NeuroMLlite is in active development. This will evolve into a framework for more For some more background to this package see here: https://github.com/NeuroML/NetworkShorthand. -![Architecture](images/NetworkShorthand.png) +![Architecture](images/NetworkShorthand.png) ## Examples diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..67fe177 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,12 @@ +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[tool.ruff] + +exclude = [ + "examples", + ] + +[tool.ruff.lint] +ignore = ["F403", "F405"] diff --git a/requirements-extra.txt b/requirements-extra.txt deleted file mode 100644 index 83c7838..0000000 --- a/requirements-extra.txt +++ /dev/null @@ -1,9 +0,0 @@ -pyNN -bmtk -matplotlib -PyQt5 -pyneuroml -pyelectro -neuron -h5py -graphviz diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..cdff1d2 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,85 @@ +[metadata] +name = neuromllite +version = 0.6.1 +author = Padraig Gleeson +author_email = p.gleeson@gmail.com +url = https://github.com/NeuroML/NeuroMLlit +license = LGPL-3.0-only +description = A common JSON/YAML based format for compact network specification, closely tied to NeuroML v2 +long_description = file: README.md +long_description_content_type = text/markdown +classifiers = + Intended Audience :: Science/Research + Natural Language :: English + Operating System :: OS Independent + Programming Language :: Python :: 3.9 + Programming Language :: Python :: 3.10 + Programming Language :: Python :: 3.11 + Programming Language :: Python :: 3.12 + Programming Language :: Python :: 3.13 + Topic :: Scientific/Engineering + +[options] +install_requires = + libNeuroML>=0.5.1 + pyyaml + numpy + tables + h5py + modelspec>=0.2.6 + ppft[dill] + +packages = find: + +[options.packages.find] +include = + neuromllite + neuromllite.sweep + neuromllite.gui + +[options.entry_points] +console_scripts = + nmllite-ui = neuromllite.gui.NMLliteUI:main + +[options.extras_require] +extras = + pyNN + bmtk + matplotlib + PyQt5 + pyneuroml + pyelectro + neuron + h5py + graphviz + + +all = + neuromllite[extras] + +dev = + neuromllite[all] + neuromllite[doc] + pytest + pytest-xdist + pre-commit + + +doc = + sphinxcontrib-bibtex + #pyNN + bmtk + matplotlib + PyQt5 + pyneuroml + pyelectro + numpy + neuron + h5py + graphviz + pylems + tables + arbor==0.9.0 + +[flake8] +extend-ignore = E501, E502, F403, F405, W503, W504 diff --git a/setup.py b/setup.py deleted file mode 100644 index 1b8e1ff..0000000 --- a/setup.py +++ /dev/null @@ -1,43 +0,0 @@ -from setuptools import setup - -version = "" -for aline in open("neuromllite/__init__.py"): - if "__version__ =" in aline: - version = aline.split('"')[1] - -setup( - name="neuromllite", - version=version, - author="Padraig Gleeson", - author_email="p.gleeson@gmail.com", - packages=["neuromllite", "neuromllite.sweep", "neuromllite.gui"], - entry_points={ - "console_scripts": ["nmllite-ui = neuromllite.gui.NMLliteUI:main"] - }, - url="https://github.com/NeuroML/NeuroMLlite", - license="LICENSE.lesser", - description="A common JSON/YAML based format for compact network specification, closely tied to NeuroML v2", - long_description=open("README.md").read(), - long_description_content_type="text/markdown", - install_requires=[ - "libNeuroML>=0.5.1", - "pyyaml", - "numpy<2.0.0", - "tables", - "h5py", - "modelspec>=0.2.6", - "ppft" - ], - classifiers=[ - "Intended Audience :: Science/Research", - "License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)", - "Natural Language :: English", - "Operating System :: OS Independent", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Topic :: Scientific/Engineering", - ], -)