Skip to content

Commit

Permalink
Merge branch 'use_pyproject_toml'
Browse files Browse the repository at this point in the history
  • Loading branch information
mstimberg committed Jul 26, 2023
2 parents d6d64fb + 82ab1f9 commit e388ccd
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 76 deletions.
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
Brian2GeNN
==========
Brian2GeNN is an interface between Brian 2 and GeNN. Brian2 is a simulator for spiking neural networks available on a variety of platforms. It is the successor of Brian1 and shares its approach of being highly flexible and easily extensible. It is based on a code generation framework that allows to execute simulations using other programming languages and/or on different
devices.

Brian 2 frontend to the GeNN simulator
GeNN (GPU enhanced Neuronal Networks, https://github.com/genn-team/genn) is a framework that uses code generation methods to allow using GPU accelerators without in-depth knowledge of the CUDA programming interface.

Brian2Genn provides an interface to use GeNN as a backend device in Brian2. This allows users to run their Brian 2 scripts on NVIDIA GPU accelerators without any further necessary programming.

We currently consider this software to be in the beta status, please report
issues to the github issue tracker (https://github.com/brian-team/brian2genn/issues).

Documentation for Brian2GeNN can be found at http://brian2genn.readthedocs.org

[![PyPI package](https://img.shields.io/pypi/v/Brian2GeNN.svg)](https://pypi.python.org/pypi/Brian2)
[![Documentation Status](https://readthedocs.org/projects/brian2genn/badge/?version=stable)](https://brian2genn.readthedocs.io/en/stable/?badge=stable)
Expand Down
26 changes: 17 additions & 9 deletions brian2genn/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,27 @@
import brian2genn.binomial


from pkg_resources import get_distribution, DistributionNotFound
try:
__version__ = get_distribution(__name__).version
except DistributionNotFound:
# Apparently we are running directly from a git clone, let
# setuptools_scm fetch the version from git
from ._version import __version__, __version_tuple__
except ImportError:
try:
from setuptools_scm import get_version
__version__ = get_version(relative_to=os.path.dirname(__file__))

__version__ = get_version(
root="..",
relative_to=__file__,
version_scheme="post-release",
local_scheme="no-local-version",
)
__version_tuple__ = tuple(int(x) if x.isdigit() else x
for x in __version__.split("."))
except ImportError:
warnings.warn('Cannot determine brian2genn version (running directly '
'from source code and no setuptools_scm package '
'available).')
warnings.warn(
"Cannot determine Brian version, running from source and "
"setuptools_scm is not installed."
)
__version__ = "unknown"
__version_tuple__ = (0, 0, 0)


def example_run(debug=False, **build_options):
Expand Down
54 changes: 54 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
[project]
name = "Brian2GeNN"
authors = [
{name = 'Thomas Nowotny'},
{name = 'Marcel Stimberg'},
{name = 'Dan Goodman'},
]
requires-python = '>=3.9'
dependencies = [
'brian2>=2.5.0.2,<2.6',
'setuptools>=61'
]
dynamic = ["version", "readme"]
description = 'An interface to use the GeNN framework as a device in Brian 2'
classifiers = [
'Development Status :: 4 - Beta',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: GNU General Public License v2 (GPLv2)',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Topic :: Scientific/Engineering :: Bio-Informatics'
]

[project.optional-dependencies]
test = ['pytest', 'pytest-xdist>=1.22.3']
docs = ['sphinx>=1.0.1', 'sphinxcontrib-issuetracker']

[project.urls]
Documentation ='https://brian2genn.readthedocs.io/'
Source = 'https://github.com/brian-team/brian2genn'
Tracker = 'https://github.com/brian-team/brian2genn/issues'

[tool.setuptools]
zip-safe = false
packages = ['brian2genn']

[tool.setuptools.dynamic]
readme = {file = 'README.md', content-type = "text/markdown"}

[tool.setuptools_scm]
version_scheme = 'post-release'
local_scheme = 'no-local-version'
write_to = 'brian2genn/_version.py'
tag_regex = '^(?P<version>\d+(?:\.\d+){0,2}[^\+]*(?:\+.*)?)$'
fallback_version = 'unknown'

[build-system]
requires = [
"setuptools>=61",
"setuptools_scm[toml]>=6.2"
]
build-backend = "setuptools.build_meta"
66 changes: 0 additions & 66 deletions setup.py

This file was deleted.

0 comments on commit e388ccd

Please sign in to comment.