Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

To v0.5.3; uses setup.cfg; tested on mac & win too #174

Merged
merged 11 commits into from
Jun 22, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
15 changes: 7 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,35 +15,33 @@ jobs:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
runs-on: [ubuntu-latest]
runs-on: [ubuntu-latest, windows-latest, macos-latest]

steps:
- uses: actions/checkout@v3

- name: Start MongoDB
uses: supercharge/[email protected]

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
sudo apt-get install libhdf5-serial-dev liblzo2-dev libgraphviz-dev -y
#sudo apt-get install libhdf5-serial-dev liblzo2-dev libgraphviz-dev -y
python -m pip install --upgrade pip
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi

- name: Build package
run: |
pip install .[full]

- name: Test with pytest
if: ${{ matrix.runs-on == 'ubuntu-latest' }}
run: |
pytest
# Just test on linux for now...
pytest -vs

- name: Run examples
if: ${{ matrix.python-version != '3.7' && matrix.runs-on == 'macos-latest' }} # issue with _bz2 module...
run: |
cd ./neuroml/examples && python run_all.py

Expand All @@ -52,6 +50,7 @@ jobs:
pip list

- name: Lint with flake8
if: ${{ matrix.runs-on == 'ubuntu-latest' }}
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/regenerate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ jobs:
run: |
sudo apt-get install libhdf5-serial-dev liblzo2-dev libgraphviz-dev -y
python -m pip install --upgrade pip
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install .[dev]

- name: Rebuild nml.py
run: |
Expand Down
4 changes: 0 additions & 4 deletions .mypy.ini

This file was deleted.

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: doc/requirements.txt
- method: pip
path: .
extra_requirements:
- doc
26 changes: 0 additions & 26 deletions .travis.yml

This file was deleted.

4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ A related package, **[pyNeuroML](https://github.com/NeuroML/pyNeuroML)** builds

pyNeuroML builds on: [libNeuroML](https://github.com/NeuralEnsemble/libNeuroML) & [PyLEMS](https://github.com/LEMS/pylems) and wraps functionality from [jNeuroML](https://github.com/NeuroML/jNeuroML).


## Development process for libNeuroML

Most of the work happens in the [development branch](https://github.com/NeuralEnsemble/libNeuroML/tree/development).
That branch is kept up to date with the development branches for [NeuroML 2](https://github.com/NeuroML/NeuroML2/tree/development) and related libraries.
See https://docs.neuroml.org/ for an overview of the various NeuroML libraries.

## Changelog

### version 0.4.1

- add multiple cell builder utility functions
Expand Down Expand Up @@ -128,6 +128,4 @@ See https://docs.neuroml.org/ for an overview of the various NeuroML libraries.
- Schema validation utility
- Improved documentation and documentation new look


:copyright: Copyright 2023 by the libNeuroML team, see [AUTHORS](AUTHORS). Modified BSD License, see [LICENSE](LICENSE) for details.

2 changes: 1 addition & 1 deletion doc/devdocs/how_to_contribute.rst
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ Release process
libNeuroML is part of the official NeuroML release cycle.
When a new libNeuroML release is ready the following needs to happen:

- Update version number in setup.py
- Update version number in setup.cfg
- update version number in doc/conf.py
- update release number in doc/conf.py (same as version number)
- update changelog in README.md
Expand Down
5 changes: 0 additions & 5 deletions doc/requirements.txt

This file was deleted.

19 changes: 13 additions & 6 deletions doc/userdocs/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,13 @@ On most systems with a Python installation, libNeuroML can be installed using th
It is recommended to use a `virtual environment <https://docs.python.org/3/tutorial/venv.html>`_ when installing Python packages using `pip` to prevent these from conflicting with other system libraries.

This will support the default XML serialization.
To install all of requirements to include the other serialisations, use
Note that you may be required to install libhdf5 using your package manager because PyTables' wheels for python 3.7+ depend on the system libhdf5 to build.

::

# On Ubuntu based systems
sudo apt-get install libhdf5-dev
pip install libNeuroML[full]

The ``apt`` line is required at time of writing because PyTables' wheels for python 3.7 depend on the system libhdf5.
pip install libNeuroML


On Fedora based systems
Expand Down Expand Up @@ -51,14 +49,23 @@ To build and install libNeuroML, you can use the standard install method for Pyt

::

python setup.py install
pip install .

To use the **latest development version of libNeuroML**, switch to the development branch:

::

git checkout development
sudo python setup.py install
pip install .


To install developer dependencies and other extras, use the extras declared in the `setup.cfg` file. E.g.:

::

pip install .[dev]
pip install .[test]
pip install .[doc]


Run an example
Expand Down
8 changes: 7 additions & 1 deletion neuroml/__version__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@
"""


__version__: str = "0.5.2"
try:
import importlib.metadata
__version__ = importlib.metadata.version("libNeuroML")
except ImportError:
import importlib_metadata
__version__ = importlib_metadata.version("libNeuroML")

__version_info__: tuple = tuple(int(i) for i in __version__.split("."))


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"
8 changes: 0 additions & 8 deletions requirements-dev.txt

This file was deleted.

6 changes: 0 additions & 6 deletions requirements.txt

This file was deleted.

74 changes: 74 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,72 @@
[metadata]
name = libNeuroML
version = 0.5.3
author_email = [email protected], [email protected]
author = libNeuroML authors and contributors
description = A Python library for working with NeuroML descriptions of neuronal models
long_description = file: README.md
long_description_content_type=text/markdown
url = http://libneuroml.readthedocs.org/en/latest/
license = BSD-2-Clause
classifiers =
Intended Audience :: Science/Research
License :: OSI Approved :: BSD License
Natural Language :: English
Operating System :: OS Independent
Development Status :: 5 - Production/Stable
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.11
Topic :: Scientific/Engineering :: Bio-Informatics
Topic :: Scientific/Engineering

[options]
install_requires =
lxml
six
networkx
numpy
tables>=3.3.0
typing; python_version<"3.5"

packages = find:

[options.packages.find]
where = .
include = neuroml*
exclude = neuroml.test*

[options.package_data]
neuroml.nml =
*.xsd


[options.extras_require]
test =
pytest

dev =
wheel
generateds >= 2.20a; python_version >= '3.0'
cython
numpy
networkx
flake8
pytest
black ; python_version >= '3.0'

doc =
sphinxcontrib-bibtex
pydata-sphinx-theme

full =
libNeuroML[test]
libNeuroML[dev]
libNeuroML[doc]

[flake8]
# ignore:
# spacing around operators, comment blocks, in argument lists
Expand All @@ -8,3 +77,8 @@ exclude =
neuroml/nml/helper_methods.py,
doc,
build

[mypy]
ignore_missing_imports = True
follow_imports = silent
exclude = (nml\.py|doc/|build/|helper_methods\.py|generateds_config\.py|examples/)
47 changes: 0 additions & 47 deletions setup.py

This file was deleted.