From 81d38a3d4a42caf955299f236a932c5219c5d4b1 Mon Sep 17 00:00:00 2001 From: Andi Gerken <andi.gerken@gmail.com> Date: Tue, 22 Jun 2021 11:27:10 +0200 Subject: [PATCH] Updated deprecation warning version numbers Fixed gen_docs.sh --- gen_docs.sh | 4 ++-- src/robofish/io/entity.py | 12 ++++++------ src/robofish/io/file.py | 12 ++++++------ tests/robofish/io/test_entity.py | 3 ++- 4 files changed, 16 insertions(+), 15 deletions(-) diff --git a/gen_docs.sh b/gen_docs.sh index 81aebfc..1d99b30 100755 --- a/gen_docs.sh +++ b/gen_docs.sh @@ -1,5 +1,5 @@ cd "${0%/*}" -pdoc3 --html fish_models --force -cp -r docs/img/ html/fish_models/ +pdoc3 --html robofish.io --force +cp -r docs/img/ html/robofish/io diff --git a/src/robofish/io/entity.py b/src/robofish/io/entity.py index 83f8c59..f1b836a 100644 --- a/src/robofish/io/entity.py +++ b/src/robofish/io/entity.py @@ -151,8 +151,8 @@ class Entity(h5py.Group): @property @deprecation.deprecated( - deprecated_in="1.2", - removed_in="1.2.4", + deprecated_in="0.2", + removed_in="0.2.4", details="We found that our calculation of 'poses_calc_ori_rad' is flawed and replaced it " "Use the original poses ('poses_rad') with tracked orientations instead. " "If you see this message and you don't know what to do, update all packages, " @@ -172,8 +172,8 @@ class Entity(h5py.Group): @property @deprecation.deprecated( - deprecated_in="1.2", - removed_in="1.2.4", + deprecated_in="0.2", + removed_in="0.2.4", details="We found that our calculation of 'poses_calc_ori' is flawed and replaced it " "Use the original poses ('poses') with tracked orientations instead. " "If you see this message and you don't know what to do, update all packages, " @@ -206,8 +206,8 @@ class Entity(h5py.Group): @property @deprecation.deprecated( - deprecated_in="1.2", - removed_in="1.2.4", + deprecated_in="0.2", + removed_in="0.2.4", details="We found that our calculation of 'speed_turn' is flawed and replaced it " "with 'actions_speeds_turns'. The difference in calculation is, that the tracked " "orientation is used now which gives the fish the ability to swim backwards. " diff --git a/src/robofish/io/file.py b/src/robofish/io/file.py index 04f5ef5..ff211af 100644 --- a/src/robofish/io/file.py +++ b/src/robofish/io/file.py @@ -424,8 +424,8 @@ class File(h5py.File): @property @deprecation.deprecated( - deprecated_in="1.2", - removed_in="1.2.4", + deprecated_in="0.2", + removed_in="0.2.4", details="We found that our calculation of 'poses_calc_ori' is flawed." "Please replace it with 'poses' and use the tracked orientation." "If you see this message and you don't know what to do, update all packages and if nothing helps, contact Andi.\n" @@ -436,8 +436,8 @@ class File(h5py.File): @property @deprecation.deprecated( - deprecated_in="1.2", - removed_in="1.2.4", + deprecated_in="0.2", + removed_in="0.2.4", details="We found that our calculation of 'poses_calc_ori_rad' is flawed." "Please replace it with 'poses_rad' and use the tracked orientation." "If you see this message and you don't know what to do, update all packages and if nothing helps, contact Andi.\n" @@ -450,8 +450,8 @@ class File(h5py.File): @property @deprecation.deprecated( - deprecated_in="1.2", - removed_in="1.2.4", + deprecated_in="0.2", + removed_in="0.2.4", details="We found that our calculation of 'speed_turn' is flawed and replaced it " "with 'actions_speeds_turns'. The difference in calculation is, that the tracked " "orientation is used now which gives the fish the ability to swim backwards. " diff --git a/tests/robofish/io/test_entity.py b/tests/robofish/io/test_entity.py index 0101aca..0d843bb 100644 --- a/tests/robofish/io/test_entity.py +++ b/tests/robofish/io/test_entity.py @@ -36,7 +36,8 @@ def test_entity_turns_speeds(): There were issues with the calculation of speeds and turns. The corresponding functions were set to be deprecated. This test was adapted to have plausible orientations which are used when the speeds and turns are calculated. The reconstructed track is not identical to the original track. The reson for this is unknown. - TODO: Find the reason, why the reconstructed track differs + + There is an open issue, to check this test again: https://git.imp.fu-berlin.de/bioroboticslab/robofish/io/-/issues/14 """ f = robofish.io.File(world_size_cm=[100, 100], frequency_hz=25) -- GitLab