• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

int-brain-lab / iblrig / 14196118657

01 Apr 2025 12:52PM UTC coverage: 47.634% (+0.8%) from 46.79%
14196118657

Pull #795

github

cfb5bd
web-flow
Merge 5ba5d5f25 into 58cf64236
Pull Request #795: fixes for habituation CW

11 of 12 new or added lines in 1 file covered. (91.67%)

1083 existing lines in 22 files now uncovered.

4288 of 9002 relevant lines covered (47.63%)

0.95 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

92.86
/iblrig_tasks/_iblrig_tasks_trainingChoiceWorld/task.py
1
import iblrig.misc
2✔
2
from iblrig.base_choice_world import TrainingChoiceWorldSession
2✔
3

4
TRAINING_PHASE = -1
2✔
5
ADAPTIVE_REWARD = -1.0
2✔
6

7

8
def float_or_none(string: str) -> float | None:
2✔
UNCOV
9
    return None if string.lower() == 'none' else float(string)
×
10

11

12
class Session(TrainingChoiceWorldSession):
2✔
13
    @staticmethod
2✔
14
    def extra_parser():
2✔
15
        """:return: argparse.parser()"""
16
        parser = super(Session, Session).extra_parser()
2✔
17
        parser.add_argument(
2✔
18
            '--training_phase',
19
            option_strings=['--training_phase'],
20
            dest='training_phase',
21
            default=TRAINING_PHASE,
22
            type=int,
23
            help='defines the set of contrasts presented to the subject',
24
        )
25
        parser.add_argument(
2✔
26
            '--adaptive_reward',
27
            option_strings=['--adaptive_reward'],
28
            dest='adaptive_reward',
29
            default=ADAPTIVE_REWARD,
30
            type=float,
31
            help='reward volume in microliters',
32
        )
33
        parser.add_argument(
2✔
34
            '--adaptive_gain',
35
            option_strings=['--adaptive_gain'],
36
            dest='adaptive_gain',
37
            default=None,
38
            type=float_or_none,
39
            help='Gain of the wheel in degrees/mm',
40
        )
41
        return parser
2✔
42

43

44
if __name__ == '__main__':  # pragma: no cover
45
    kwargs = iblrig.misc.get_task_arguments(parents=[Session.extra_parser()])
46
    sess = Session(**kwargs)
47
    sess.run()
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc