Skip to content

Commit

Permalink
Merge pull request #234 from NeuroML/chore/remove-deprecated-setup.py
Browse files Browse the repository at this point in the history
Chore/remove deprecated setup.py
  • Loading branch information
pgleeson committed Aug 2, 2023
2 parents 97237e9 + df8619c commit e2cc1f6
Show file tree
Hide file tree
Showing 15 changed files with 190 additions and 237 deletions.
24 changes: 10 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,27 +36,23 @@ jobs:
echo "github.ref is: ${{ github.ref }}"
echo "github.base_ref is: ${{ github.base_ref }}"
- name: Install deps from 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
pip install .[all]
- 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"
cp -v requirements-development.txt requirements.txt
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: |
echo "Using deps from experimental - assuming development in others"
cp -v requirements-experimental.txt requirements.txt
- 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 .
pip install .[experimental]
- name: List packages so far
run: |
Expand Down
13 changes: 13 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -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
5 changes: 4 additions & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,7 @@ sphinx:

python:
install:
- requirements: docs/requirements.txt
- method: pip
path: .
extra_requirements:
- doc
12 changes: 10 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
7 changes: 6 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -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 *
12 changes: 5 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 0 additions & 18 deletions docs/requirements.txt

This file was deleted.

8 changes: 7 additions & 1 deletion pyneuroml/__init__.py
Original file line number Diff line number Diff line change
@@ -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"

Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
24 changes: 0 additions & 24 deletions requirements-development.txt

This file was deleted.

25 changes: 0 additions & 25 deletions requirements-experimental.txt

This file was deleted.

24 changes: 0 additions & 24 deletions requirements.txt

This file was deleted.

131 changes: 131 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,2 +1,133 @@
[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
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.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
argparse

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]
* =
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>=0.2.6
ppft

vispy =
vispy
pyqt5

plotly =
plotly

all =
pyNeuroML[neuron]
pyNeuroML[brian]
pyNeuroML[netpyne]
pyNeuroML[netpyne]
pyNeuroML[povray]
pyNeuroML[hdf5]
pyNeuroML[analysis]
pyNeuroML[tune]
pyNeuroML[vispy]
pyNeuroML[plotly]

dev =
pyNeuroML[all]
airspeed>=0.5.5
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
pytest
pytest-cov
kaleido
pre-commit

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
Loading

0 comments on commit e2cc1f6

Please sign in to comment.