From e45dce81827f825803def43cbca875af6474bc4f Mon Sep 17 00:00:00 2001 From: "Ankur Sinha (Ankur Sinha Gmail)" Date: Mon, 9 Jun 2025 14:36:08 +0100 Subject: [PATCH 1/8] feat(deps): drop numpy pin --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 1b8e1ff..c76fd81 100644 --- a/setup.py +++ b/setup.py @@ -22,7 +22,7 @@ install_requires=[ "libNeuroML>=0.5.1", "pyyaml", - "numpy<2.0.0", + "numpy", "tables", "h5py", "modelspec>=0.2.6", From d8895865277d49f2cfc51ed6567e4926f51871ce Mon Sep 17 00:00:00 2001 From: "Ankur Sinha (Ankur Sinha Gmail)" Date: Mon, 9 Jun 2025 14:36:24 +0100 Subject: [PATCH 2/8] feat: update python versions --- setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index c76fd81..549ce7e 100644 --- a/setup.py +++ b/setup.py @@ -33,11 +33,12 @@ "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", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Topic :: Scientific/Engineering", ], ) From e03ab9639fd5f80484ad51a1c524e1cb62cd67f2 Mon Sep 17 00:00:00 2001 From: "Ankur Sinha (Ankur Sinha Gmail)" Date: Mon, 9 Jun 2025 14:46:18 +0100 Subject: [PATCH 3/8] feat: convert to pyproject --- pyproject.toml | 12 ++++++++ setup.cfg | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++ setup.py | 44 --------------------------- 3 files changed, 94 insertions(+), 44 deletions(-) create mode 100644 pyproject.toml create mode 100644 setup.cfg delete mode 100644 setup.py 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/setup.cfg b/setup.cfg new file mode 100644 index 0000000..d189b10 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,82 @@ +[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 + License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3) + 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 = + neuromllite + neuromllite.sweep + neuromllite.gui + +[options.entry_points] +console_scripts = + nmllite-ui = neuromllite.gui.NMLliteUI:main + +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 + +[flake8] +extend-ignore = E501, E502, F403, F405, W503, W504 diff --git a/setup.py b/setup.py deleted file mode 100644 index 549ce7e..0000000 --- a/setup.py +++ /dev/null @@ -1,44 +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", - "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.8", - "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", - ], -) From 3a85a544f8fb27a8c3298bd42fb28b3c3d94ec07 Mon Sep 17 00:00:00 2001 From: "Ankur Sinha (Ankur Sinha Gmail)" Date: Mon, 9 Jun 2025 14:46:26 +0100 Subject: [PATCH 4/8] feat: remove requirements Now in the main setup.cfg --- requirements-extra.txt | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 requirements-extra.txt 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 From b2606bfcf6b34aff62df90a58ac0f93cadf388e0 Mon Sep 17 00:00:00 2001 From: "Ankur Sinha (Ankur Sinha Gmail)" Date: Mon, 9 Jun 2025 14:46:45 +0100 Subject: [PATCH 5/8] chore: add pre-commit --- .pre-commit-config.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .pre-commit-config.yaml 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 From da64164fcbbbadd6c1bd9b2eaeeb70bc939361c9 Mon Sep 17 00:00:00 2001 From: "Ankur Sinha (Ankur Sinha Gmail)" Date: Mon, 9 Jun 2025 14:53:28 +0100 Subject: [PATCH 6/8] fix: correct setup.cfg --- setup.cfg | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/setup.cfg b/setup.cfg index d189b10..b4383c2 100644 --- a/setup.cfg +++ b/setup.cfg @@ -8,9 +8,8 @@ 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= +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.9 @@ -30,15 +29,19 @@ install_requires = modelspec>=0.2.6 ppft[dill] -packages = +packages = find: + +[options.packages.find] +include = neuromllite neuromllite.sweep neuromllite.gui [options.entry_points] console_scripts = - nmllite-ui = neuromllite.gui.NMLliteUI:main + nmllite-ui = neuromllite.gui.NMLliteUI:main +[options.extras_require] extras = pyNN bmtk From 8edd53e215d08b9b83fbee0b2f4b883a5a57452c Mon Sep 17 00:00:00 2001 From: "Ankur Sinha (Ankur Sinha Gmail)" Date: Mon, 9 Jun 2025 14:55:15 +0100 Subject: [PATCH 7/8] feat(ci): update python versions and commands --- .github/workflows/ci.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f36109b..e90423d 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.9", "3.10", "3.11", "3.12", "3.13"] 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 From 3c0db585419fc24fb09dc910e076bbadb1a1a040 Mon Sep 17 00:00:00 2001 From: Padraig Gleeson Date: Tue, 10 Jun 2025 15:45:22 +0100 Subject: [PATCH 8/8] Use "cython<3.1.0" --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e90423d..448ff41 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -91,7 +91,7 @@ jobs: - name: Install some simulators for testing run: | - #pip install cython + pip install "cython<3.1.0" omv install NEURON pip install NetPyNE # strange issues on py3.7 with omv install... omv install PyNN