diff --git a/README.md b/README.md index efed3c4..8e4dcec 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ If you leave away the ```--user``` the package will be installed system-wide. ## TrackingResults -Is a class that wraps around the *.h5 files written by DeppLabCut +Is a class that wraps around the *.h5 files written by DeepLabCut ## ImageMarker diff --git a/etrack/arena.py b/etrack/arena.py index 86b7233..c01b3e0 100644 --- a/etrack/arena.py +++ b/etrack/arena.py @@ -206,7 +206,10 @@ class Region(object): return indices def time_in_region(self, x, y, time, analysis_type=AnalysisType.Full): - """Returns the entering and leaving times at which the animal entered and left a region. In case the animal was not observed after entering this region (for example when hidden in a tube) the leaving time is the maximum time entry. + """Returns the entering and leaving times at which the animal entered + and left a region. In case the animal was not observed after entering + this region (for example when hidden in a tube) the leaving time is + the maximum time entry. Parameters ---------- @@ -223,6 +226,7 @@ class Region(object): ------- _type_ _description_ + """ indices = self.points_in_region(x, y, analysis_type) if len(indices) == 0: diff --git a/etrack/info.json b/etrack/info.json new file mode 100644 index 0000000..85c3e39 --- /dev/null +++ b/etrack/info.json @@ -0,0 +1,10 @@ +{ + "VERSION": "0.5.0", + "STATUS": "Release", + "RELEASE": "0.5.0 Release", + "AUTHOR": "Jan Grewe", + "COPYRIGHT": "2024, University of Tuebingen, Neuroethology, Jan Grewe", + "CONTACT": "jan.grewe@g-node.org", + "BRIEF": "Efish tracking helpers for handling tracking data.", + "HOMEPAGE": "https://github.com/G-Node/nixpy" +} diff --git a/etrack/info.py b/etrack/info.py new file mode 100644 index 0000000..0d4a401 --- /dev/null +++ b/etrack/info.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- +# Copyright © 2024, Jan Grewe +# +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted under the terms of the BSD License. See +# LICENSE file in the root of the Project. +import os +import json + +here = os.path.dirname(__file__) + +with open(os.path.join(here, "info.json")) as infofile: + infodict = json.load(infofile) + + +VERSION = infodict["VERSION"] +STATUS = infodict["STATUS"] +RELEASE = infodict["RELEASE"] +AUTHOR = infodict["AUTHOR"] +COPYRIGHT = infodict["COPYRIGHT"] +CONTACT = infodict["CONTACT"] +BRIEF = infodict["BRIEF"] +HOMEPAGE = infodict["HOMEPAGE"] +~ diff --git a/setup.py b/setup.py index 350259a..5837e78 100644 --- a/setup.py +++ b/setup.py @@ -1,15 +1,25 @@ +import os from setuptools import setup +import json +from setuptools import setup + +# load info from nixio/info.json +with open(os.path.join("etrack", "info.json")) as infofile: + infodict = json.load(infofile) + NAME = "etrack" -VERSION = 0.5 -AUTHOR = "Jan Grewe" -CONTACT = "jan.grewe@g-node.org" +VERSION = infodict["VERSION"] +AUTHOR = infodict["AUTHOR"] +CONTACT = infodict["CONTACT"] +BRIEF = infodict["BRIEF"] +HOMEPAGE = infodict["HOMEPAGE"] CLASSIFIERS = "science" -DESCRIPTION = "Efish tracking helpers for handling tracking data." - README = "README.md" + with open(README) as f: description_text = f.read() +DESCRIPTION = description_text packages = [ "etrack", "etrack.io"