From 09046ad0236f7e15254abfd3ab2d5c93183c30be Mon Sep 17 00:00:00 2001 From: "Ankur Sinha (Ankur Sinha Gmail)" Date: Wed, 14 Jun 2023 13:32:34 +0100 Subject: [PATCH 01/10] chore: remove deprecated setup.py Reference: https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html --- .github/workflows/ci.yml | 9 +-- .readthedocs.yaml | 5 +- MANIFEST.in | 7 +- docs/requirements.txt | 18 ----- pyneuroml/__init__.py | 8 +- pyproject.toml | 3 + requirements-development.txt | 24 ------ requirements-experimental.txt | 25 ------- requirements.txt | 24 ------ setup.cfg | 136 ++++++++++++++++++++++++++++++++++ setup.py | 119 ----------------------------- 11 files changed, 160 insertions(+), 218 deletions(-) delete mode 100644 docs/requirements.txt create mode 100644 pyproject.toml delete mode 100644 requirements-development.txt delete mode 100644 requirements-experimental.txt delete mode 100644 requirements.txt delete mode 100644 setup.py diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7b55b856..057399a5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,23 +39,22 @@ jobs: - name: Install deps from development if: ${{ github.ref == 'refs/heads/development' || github.base_ref == 'development' }} run: | + python -m pip install --upgrade pip echo "Using deps from development for our repos" - cp -v requirements-development.txt requirements.txt + pip install .[dev] - name: Install deps from experimental if: ${{ github.ref == 'refs/heads/experimental' || github.base_ref == 'experimental' }} run: | + python -m pip install --upgrade pip echo "Using deps from experimental - assuming development in others" - cp -v requirements-experimental.txt requirements.txt + pip install .[experimental] - name: Install package run: | - python -m pip install --upgrade pip - # Ensure very latest inspyred (not on pypi) is installed pip install git+https://github.com/aarongarrett/inspyred.git@master#egg=inspyred - pip install -r requirements.txt pip install . - name: List packages so far diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 7dd9ee01..2d3d2d5d 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -12,4 +12,7 @@ sphinx: python: install: - - requirements: docs/requirements.txt + - method: pip + path: . + extra_requirements: + - doc diff --git a/MANIFEST.in b/MANIFEST.in index 6feb84bb..c5ca8dfd 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,3 +1,8 @@ include README.md +include CONTRIBUTING.md include LICENSE* -include requirements.txt +include *.sh +recursive-include tests * +recursive-include man * +recursive-include examples * +recursive-include docs * diff --git a/docs/requirements.txt b/docs/requirements.txt deleted file mode 100644 index 32e66e7c..00000000 --- a/docs/requirements.txt +++ /dev/null @@ -1,18 +0,0 @@ -sphinxcontrib-bibtex -lxml -airspeed -opencv-python -libneuroml -pyelectro -matplotlib -matplotlib_scalebar -plotly -scipy -pylems -graphviz -argparse -neuromllite -neurotune>=0.2.6 # now manages the version of inspyred -neuron -pydata-sphinx-theme -vispy diff --git a/pyneuroml/__init__.py b/pyneuroml/__init__.py index 76f93034..f6e1fa40 100644 --- a/pyneuroml/__init__.py +++ b/pyneuroml/__init__.py @@ -1,6 +1,12 @@ import logging -__version__ = "1.0.8" +try: + import importlib.metadata + __version__ = importlib.metadata.version("pyNeuroML") +except ImportError: + import importlib_metadata + __version__ = importlib_metadata.version("pyNeuroML") + JNEUROML_VERSION = "0.12.2" diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..fed528d4 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" diff --git a/requirements-development.txt b/requirements-development.txt deleted file mode 100644 index 88741fdb..00000000 --- a/requirements-development.txt +++ /dev/null @@ -1,24 +0,0 @@ -argparse -airspeed>=0.5.5 -matplotlib -graphviz -vispy -pyqt5 -NEURON -ppft - -git+https://github.com/ModECI/modelspec.git@development#egg=modelspec -git+https://github.com/NeuralEnsemble/libNeuroML.git@development#egg=libNeuroML -git+https://github.com/LEMS/pylems.git@development#egg=pylems - -pyelectro -neurotune>=0.2.6 # now manages the version of inspyred - -pytest -pytest-cov - -plotly -kaleido -matplotlib-scalebar - -pyyaml diff --git a/requirements-experimental.txt b/requirements-experimental.txt deleted file mode 100644 index 1225ac05..00000000 --- a/requirements-experimental.txt +++ /dev/null @@ -1,25 +0,0 @@ -argparse -airspeed>=0.5.5 -matplotlib -graphviz -vispy -pyqt5 -NEURON -ppft - -git+https://github.com/ModECI/modelspec.git@development#egg=modelspec -git+https://github.com/NeuralEnsemble/libNeuroML.git@development#egg=libNeuroML -git+https://github.com/LEMS/pylems.git@development#egg=pylems - -pyelectro -neurotune>=0.2.6 # now manages the version of inspyred - - -pytest -pytest-cov - -plotly -kaleido -matplotlib-scalebar - -pyyaml diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 076cd6dc..00000000 --- a/requirements.txt +++ /dev/null @@ -1,24 +0,0 @@ -argparse -airspeed>=0.5.5 -matplotlib -graphviz -vispy -pyqt5 -NEURON -ppft - -git+https://github.com/NeuralEnsemble/libNeuroML.git@master#egg=libNeuroML -git+https://github.com/LEMS/pylems.git@master#egg=pylems - -pyelectro -neurotune>=0.2.6 # now manages the version of inspyred - - -pytest -pytest-cov - -plotly -kaleido -matplotlib-scalebar - -pyyaml diff --git a/setup.cfg b/setup.cfg index 2827df5c..7d48c9c0 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,2 +1,138 @@ +[metadata] +name = pyNeuroML +version = 1.0.8 +author = Padraig Gleeson +author_email = p.gleeson@gmail.com +url = https://github.com/NeuroML/pyNeuroML +license = LGPL-3.0-only +description = Python utilities for NeuroML +long_description = file: README.md, LICENSE.lesser +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 + +[options] +install_requires = + pylems>=0.5.7 + airspeed>=0.5.5 + neuromllite>=0.5.4 + libNeuroML>=0.5.1 + matplotlib + matplotlib-scalebar + graphviz + typing; python_version<"3.5" + lxml + pandas + plotly + +packages = find: + +[options.packages.find] +where = . +include = pyneuroml* + +[options.entry_points] +console_scripts = + pynml = pyneuroml.pynml:main + pynml-archive = pyneuroml.archive:main + pynml-channelanalysis = pyneuroml.analysis.NML2ChannelAnalysis:main + pynml-modchananalysis = pyneuroml.neuron.analysis.HHanalyse:main + pynml-povray = pyneuroml.povray.NeuroML2ToPOVRay:main + pynml-tune = pyneuroml.tune.NeuroMLTuner:main + pynml-summary = pyneuroml.pynml:summary + pynml-plotspikes = pyneuroml.plot.PlotSpikes:main + pynml-plotmorph = pyneuroml.plot.PlotMorphology:main + pynml-channelml2nml = pyneuroml.channelml:main + pynml-sonata = neuromllite.SonataReader:main + +[options.package_data] +pyneuroml = + lib/*.jar + *.xml + *.html + *.md + *.xsl + *.hoc + +[options.extras_require] +neuron = + NEURON + pyyaml + +brian = + Brian2 + +netpyne = + netpyne + +povray = + opencv-python + +hdf5 = + tables + +analysis = + pyelectro + +tune = + neurotune + ppft + +vispy = + vispy + pyqt5 + +all = + pyNeuroML[neuron] + pyNeuroML[brian] + pyNeuroML[netpyne] + pyNeuroML[netpyne] + pyNeuroML[povray] + pyNeuroML[hdf5] + pyNeuroML[analysis] + pyNeuroML[tune] + pyNeuroML[vispy] + +dev = + pyNeuroML[all] + argparse + airspeed>=0.5.5 + matplotlib + graphviz + pyqt5 + NEURON + ppft + modelspec @ git+https://github.com/ModECI/modelspec.git@development#egg=modelspec + libNeuroML @ git+https://github.com/NeuralEnsemble/libNeuroML.git@development#egg=libNeuroML + pylems @ git+https://github.com/LEMS/pylems.git@development#egg=pylems + pyelectro + neurotune>=0.2.6 # now manages the version of inspyred + pytest + pytest-cov + plotly + kaleido + matplotlib-scalebar + pyyaml + +experimental = + pyNeuroML[dev] + + modelspec @ git+https://github.com/ModECI/modelspec.git@development#egg=modelspec + libNeuroML @ git+https://github.com/NeuralEnsemble/libNeuroML.git@development#egg=libNeuroML + pylems @ git+https://github.com/LEMS/pylems.git@development#egg=pylems + +doc = + pyNeuroML[all] + sphinxcontrib-bibtex + pydata-sphinx-theme + [flake8] ignore = E501, E502, F403, F405 diff --git a/setup.py b/setup.py deleted file mode 100644 index f509a968..00000000 --- a/setup.py +++ /dev/null @@ -1,119 +0,0 @@ -from setuptools import setup - -import pyneuroml - -version = pyneuroml.__version__ -jnml_version = pyneuroml.JNEUROML_VERSION - -# generate extra deps -extras = { - "neuron": ["NEURON", "pyyaml"], - "brian": ["Brian2"], - "netpyne": ["netpyne"], - "povray": ["opencv-python"], - "hdf5": ["tables"], - "analysis": ["pyelectro"], - "tune": ["neurotune", - "ppft"], - "vispy": ["vispy", "pyqt5"], -} -extras["all"] = sum(extras.values(), []), - -setup( - name="pyNeuroML", - version=version, - author="Padraig Gleeson", - author_email="p.gleeson@gmail.com", - packages=[ - "pyneuroml", - "pyneuroml.analysis", - "pyneuroml.archive", - "pyneuroml.channelml", - "pyneuroml.lems", - "pyneuroml.tune", - "pyneuroml.neuron", - "pyneuroml.povray", - "pyneuroml.plot", - "pyneuroml.swc", - "pyneuroml.neuron.analysis", - "pyneuroml.utils", - ], - entry_points={ - "console_scripts": [ - "pynml = pyneuroml.pynml:main", - "pynml-archive = pyneuroml.archive:main", - "pynml-channelanalysis = pyneuroml.analysis.NML2ChannelAnalysis:main", - "pynml-modchananalysis = pyneuroml.neuron.analysis.HHanalyse:main", - "pynml-povray = pyneuroml.povray.NeuroML2ToPOVRay:main", - "pynml-tune = pyneuroml.tune.NeuroMLTuner:main", - "pynml-summary = pyneuroml.pynml:summary", - "pynml-plotspikes = pyneuroml.plot.PlotSpikes:main", - "pynml-plotmorph = pyneuroml.plot.PlotMorphology:main", - "pynml-channelml2nml = pyneuroml.channelml:main", - "pynml-sonata = neuromllite.SonataReader:main", - ] - }, - package_data={ - "pyneuroml": [ - "lib/jNeuroML-{}-jar-with-dependencies.jar".format(jnml_version), - "analysis/LEMS_Test_TEMPLATE.xml", - "analysis/ChannelInfo_TEMPLATE.html", - "analysis/ChannelInfo_TEMPLATE.md", - "lems/LEMS_TEMPLATE.xml", - "neuron/utils.hoc", - "neuron/mview_neuroml1.hoc", - "neuron/mview_neuroml2.hoc", - "neuron/TEMPLATE.channel.nml", - "channelml/ChannelML2NeuroML2.xsl", - "channelml/ChannelML2NeuroML2beta.xsl", - ] - }, - data_files=[ - ( - "share/man/man1", - [ - "man/man1/pynml.1", - "man/man1/pynml-modchananalysis.1", - "man/man1/pynml-povray.1", - "man/man1/pynml-tune.1", - "man/man1/pynml-channelanalysis.1", - "man/man1/pynml-channelml2nml.1", - "man/man1/pynml-plotspikes.1", - "man/man1/pynml-plotmorph.1", - "man/man1/pynml-summary.1", - "man/man1/pynml-sonata.1", - ], - ) - ], - url="https://github.com/NeuroML/pyNeuroML", - license="LICENSE.lesser", - description="Python utilities for NeuroML", - long_description=open("README.md").read(), - long_description_content_type="text/markdown", - install_requires=[ - "pylems>=0.5.7", - "airspeed>=0.5.5", - "neuromllite>=0.5.4", - "libNeuroML>=0.5.1", - "matplotlib", - "matplotlib-scalebar", - "graphviz", - 'typing; python_version<"3.5"', - "lxml", - "pandas", - "plotly" - ], - extras_require=extras, - 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", - ], -) From 6a45d78808c8f57ae29cb5da46d91b6a99a5d0df Mon Sep 17 00:00:00 2001 From: "Ankur Sinha (Ankur Sinha Gmail)" Date: Wed, 14 Jun 2023 13:43:06 +0100 Subject: [PATCH 02/10] fix: replace setup.py in test --- tests/test_pynml.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_pynml.py b/tests/test_pynml.py index 5729b7e0..416f11ad 100644 --- a/tests/test_pynml.py +++ b/tests/test_pynml.py @@ -171,7 +171,7 @@ def test_validate_neuroml2(self): retval = None retstring = None - retval, retstring = validate_neuroml2("setup.py", return_string=True) + retval, retstring = validate_neuroml2("setup.cfg", return_string=True) self.assertFalse(retval) self.assertIn("1 failed", retstring) From e194e968d689645d295b3c7a4176c6a4f4f56f0c Mon Sep 17 00:00:00 2001 From: "Ankur Sinha (Ankur Sinha Gmail)" Date: Wed, 14 Jun 2023 14:09:04 +0100 Subject: [PATCH 03/10] fix: include all package data files --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 7d48c9c0..efba0a82 100644 --- a/setup.cfg +++ b/setup.cfg @@ -54,7 +54,7 @@ console_scripts = pynml-sonata = neuromllite.SonataReader:main [options.package_data] -pyneuroml = +* = lib/*.jar *.xml *.html From 544da48e879a9145c345dd0957b38849192eca55 Mon Sep 17 00:00:00 2001 From: "Ankur Sinha (Ankur Sinha Gmail)" Date: Wed, 14 Jun 2023 14:26:03 +0100 Subject: [PATCH 04/10] fix(ci): install inspyred from git --- .github/workflows/ci.yml | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 057399a5..de8f6da7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,27 +36,23 @@ jobs: echo "github.ref is: ${{ github.ref }}" echo "github.base_ref is: ${{ github.base_ref }}" - - name: Install deps from development - if: ${{ github.ref == 'refs/heads/development' || github.base_ref == 'development' }} + - name: Upgrade pip, install inspyred run: | python -m pip install --upgrade pip + pip install git+https://github.com/aarongarrett/inspyred.git@master#egg=inspyred + + - name: Install package and development deps + if: ${{ github.ref == 'refs/heads/development' || github.base_ref == 'development' }} + run: | echo "Using deps from development for our repos" pip install .[dev] - - name: Install deps from experimental + - name: Install package and experimental deps if: ${{ github.ref == 'refs/heads/experimental' || github.base_ref == 'experimental' }} run: | - python -m pip install --upgrade pip echo "Using deps from experimental - assuming development in others" pip install .[experimental] - - name: Install package - run: | - # Ensure very latest inspyred (not on pypi) is installed - pip install git+https://github.com/aarongarrett/inspyred.git@master#egg=inspyred - - pip install . - - name: List packages so far run: | pip list From d40cb6774df00230944711311c334fb2c55bbf15 Mon Sep 17 00:00:00 2001 From: "Ankur Sinha (Ankur Sinha Gmail)" Date: Wed, 14 Jun 2023 14:57:36 +0100 Subject: [PATCH 05/10] chore: clean up deps --- .github/workflows/ci.yml | 1 + setup.cfg | 14 ++------------ 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index de8f6da7..1209cfe2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,6 +40,7 @@ jobs: run: | python -m pip install --upgrade pip pip install git+https://github.com/aarongarrett/inspyred.git@master#egg=inspyred + pip install .[all] - name: Install package and development deps if: ${{ github.ref == 'refs/heads/development' || github.base_ref == 'development' }} diff --git a/setup.cfg b/setup.cfg index efba0a82..74e45305 100644 --- a/setup.cfg +++ b/setup.cfg @@ -32,6 +32,7 @@ install_requires = lxml pandas plotly + argparse packages = find: @@ -83,7 +84,7 @@ analysis = pyelectro tune = - neurotune + neurotune>=0.2.6 ppft vispy = @@ -103,24 +104,13 @@ all = dev = pyNeuroML[all] - argparse airspeed>=0.5.5 - matplotlib - graphviz - pyqt5 - NEURON - ppft modelspec @ git+https://github.com/ModECI/modelspec.git@development#egg=modelspec libNeuroML @ git+https://github.com/NeuralEnsemble/libNeuroML.git@development#egg=libNeuroML pylems @ git+https://github.com/LEMS/pylems.git@development#egg=pylems - pyelectro - neurotune>=0.2.6 # now manages the version of inspyred pytest pytest-cov - plotly kaleido - matplotlib-scalebar - pyyaml experimental = pyNeuroML[dev] From 8b091d1456bb7803c5c322a4ecdf4ce8e1cda791 Mon Sep 17 00:00:00 2001 From: "Ankur Sinha (Ankur Sinha Gmail)" Date: Wed, 14 Jun 2023 15:35:52 +0100 Subject: [PATCH 06/10] chore: remove setup.py from docs --- README.md | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index a137d9ef..b0482c68 100644 --- a/README.md +++ b/README.md @@ -59,16 +59,14 @@ Clone the repository: It should be possible to install pyNeuroML using just: - sudo pip install . + pip install . -You **may** have to install lxml and the development version of [libNeuroML](https://github.com/NeuralEnsemble/libNeuroML) manually: +To develop pyNeuroML, you can use the `dev` extra and the `development` branch: - apt-get install python-lxml - cd .. - git clone https://github.com/NeuralEnsemble/libNeuroML.git - cd libNeuroML + git clone https://github.com/NeuroML/pyNeuroML.git + cd pyNeuroML git checkout development - sudo python setup.py install + pip install .[dev] Current/planned features From d828fa4f54ac821fb2c179c17955fac87338476a Mon Sep 17 00:00:00 2001 From: "Ankur Sinha (Ankur Sinha Gmail)" Date: Mon, 26 Jun 2023 16:51:53 +0100 Subject: [PATCH 07/10] fix(setup.cfg): mark readme as markdown --- setup.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.cfg b/setup.cfg index 74e45305..67a75c45 100644 --- a/setup.cfg +++ b/setup.cfg @@ -7,6 +7,7 @@ url = https://github.com/NeuroML/pyNeuroML license = LGPL-3.0-only description = Python utilities for NeuroML long_description = file: README.md, LICENSE.lesser +long_description_content_type = text/markdown classifiers= Intended Audience :: Science/Research License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3) From ad97580c7bd2aa12241455e66f3fe252751d836e Mon Sep 17 00:00:00 2001 From: "Ankur Sinha (Ankur Sinha Gmail)" Date: Mon, 26 Jun 2023 16:53:57 +0100 Subject: [PATCH 08/10] chore(setup.cfg): remove license from long desc --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 67a75c45..0b5e0b73 100644 --- a/setup.cfg +++ b/setup.cfg @@ -6,7 +6,7 @@ author_email = p.gleeson@gmail.com url = https://github.com/NeuroML/pyNeuroML license = LGPL-3.0-only description = Python utilities for NeuroML -long_description = file: README.md, LICENSE.lesser +long_description = file: README.md long_description_content_type = text/markdown classifiers= Intended Audience :: Science/Research From b384ef6918f98e3ca5b4715ff9a27727bfc82a22 Mon Sep 17 00:00:00 2001 From: "Ankur Sinha (Ankur Sinha Gmail)" Date: Fri, 7 Jul 2023 17:01:00 +0100 Subject: [PATCH 09/10] feat: make plotly extra requirement See https://github.com/NeuroML/pyNeuroML/pull/238/commits/53b4cadc5442b4c8f23d447295ed08f5269782a9 --- setup.cfg | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 0b5e0b73..f7f794aa 100644 --- a/setup.cfg +++ b/setup.cfg @@ -32,7 +32,6 @@ install_requires = typing; python_version<"3.5" lxml pandas - plotly argparse packages = find: @@ -92,6 +91,9 @@ vispy = vispy pyqt5 +plotly = + plotly + all = pyNeuroML[neuron] pyNeuroML[brian] @@ -102,6 +104,7 @@ all = pyNeuroML[analysis] pyNeuroML[tune] pyNeuroML[vispy] + pyNeuroML[plotly] dev = pyNeuroML[all] From df8619c1d540d38a70e56de874dfdb5fc0ce860d Mon Sep 17 00:00:00 2001 From: "Ankur Sinha (Ankur Sinha Gmail)" Date: Mon, 17 Jul 2023 15:01:42 +0200 Subject: [PATCH 10/10] feat: add pre-commit configuration --- .pre-commit-config.yaml | 13 +++++++++++++ CONTRIBUTING.md | 12 ++++++++++-- setup.cfg | 1 + 3 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 .pre-commit-config.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 00000000..25398389 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,13 @@ +# 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 +- repo: https://github.com/psf/black + rev: 23.3.0 + hooks: + - id: black diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 374a6cac..a60b4c27 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -17,6 +17,14 @@ pyNeuroML. Pull requests with enhancements and bug fixes are welcome. ## Pull Request Process -1. Please ensure that the automated build for your pull request passes. -2. Please pay attention to the results from flake8 and make any modifications +1. Please contribute pull requests against the `development` branch. +2. Please ensure that the automated build for your pull request passes. +3. Please pay attention to the results from flake8 and make any modifications to ensure a consistent code style. + +## Pre-commit + +A number of [pre-commit](https://pre-commit.com/) hooks are used to improve code-quality. +Please run the following code to set up the pre-commit hooks: + + $ pre-commit install diff --git a/setup.cfg b/setup.cfg index f7f794aa..61d4d281 100644 --- a/setup.cfg +++ b/setup.cfg @@ -115,6 +115,7 @@ dev = pytest pytest-cov kaleido + pre-commit experimental = pyNeuroML[dev]