add info files

This commit is contained in:
Jan Grewe 2024-05-24 17:31:52 +02:00
parent b3ba30ced6
commit 32c0a65c58
5 changed files with 57 additions and 7 deletions

View File

@ -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

View File

@ -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:

10
etrack/info.json Normal file
View File

@ -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"
}

26
etrack/info.py Normal file
View File

@ -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"]
~

View File

@ -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"