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

int-brain-lab / iblrig / 15073834064

16 May 2025 05:16PM UTC coverage: 49.414% (+2.6%) from 46.79%
15073834064

Pull #750

github

c98309
web-flow
Merge 8e475a77c into e481532ae
Pull Request #750: Online plots

538 of 720 new or added lines in 3 files covered. (74.72%)

1000 existing lines in 20 files now uncovered.

4677 of 9465 relevant lines covered (49.41%)

0.49 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
1✔
2
from iblrig.base_choice_world import TrainingChoiceWorldSession
1✔
3

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

7

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

11

12
class Session(TrainingChoiceWorldSession):
1✔
13
    @staticmethod
1✔
14
    def extra_parser():
1✔
15
        """:return: argparse.parser()"""
16
        parser = super(Session, Session).extra_parser()
1✔
17
        parser.add_argument(
1✔
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(
1✔
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(
1✔
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
1✔
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