Skip to content

Commit

Permalink
Merge branch 'master' into 4_6_release
Browse files Browse the repository at this point in the history
# Conflicts:
#	pygenn/__init__.py
  • Loading branch information
neworderofjamie committed Nov 2, 2021
2 parents 4b4b337 + f184b37 commit f7d818b
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
12 changes: 11 additions & 1 deletion pygenn/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
# Import pygenn interface
# python imports
import sys

# pygenn interface
from .genn_groups import SynapseGroup, NeuronGroup, CurrentSource, CustomUpdate
from .genn_model import GeNNModel

if sys.version_info >= (3, 8):
from importlib import metadata
else:
import importlib_metadata as metadata

__version__ = metadata.version("pygenn")
9 changes: 7 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,12 @@
ext_modules.append(Extension("_" + namespace + "Backend", ["pygenn/genn_wrapper/generated/" + namespace + "Backend.i"],
**backend_extension_kwargs))

# Read version from txt file
with open(os.path.join(genn_path, "version.txt")) as version_file:
version = version_file.read().strip()

setup(name = "pygenn",
version = "0.4.6",
version = version,
packages = find_packages(),
package_data={"pygenn": package_data},

Expand All @@ -189,6 +193,7 @@
ext_modules=ext_modules,

# Requirements
install_requires=["numpy>=1.17", "six", "deprecated", "psutil"],
install_requires=["numpy>=1.17", "six", "deprecated", "psutil",
"importlib-metadata>=1.0;python_version<'3.8'"],
zip_safe=False, # Partly for performance reasons
)
4 changes: 3 additions & 1 deletion userproject/MBody1_project/generate_run.cc
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,10 @@ class GenerateRun : public GenerateRunBase
#else
std::string cmd = "../tools/gen_input_structured ";
#endif
// <nAL> <# classes> <# pattern/ input class> <prob. to be active> <perturbation prob. in class>
// <'on' rate> <baseline rate>
cmd += std::to_string(m_NumAL);
cmd += " 10 10 0.1 0.05 1000.0 0.2 ";
cmd += " 10 10 0.1 0.1 1000.0 0.2 "; // p_perturb only sensible if >= 1/n_act (where n_act=p_act*nAL); this assumes nAL >= 100
cmd += getOutDir() + "/" + getExperimentName() + ".inpat 2>&1 ";
#ifndef _WIN32
cmd += "|tee " + getOutDir() + "/" + getExperimentName() + ".inpat.msg";
Expand Down

0 comments on commit f7d818b

Please sign in to comment.