Skip to content

Commit

Permalink
8.11.0 (#517)
Browse files Browse the repository at this point in the history
* update pip

* add method for checking availability of internet connection

* move update check to separate thread

* version number / changelog

* transfer_data CLI with argparse

* Update CHANGELOG.md

* prepare thread-worker for fetching subject details

* fix transfer test using local lab: use mock function instead of settings

* get rid of rsync-path

* add md5 check to copy_folders

* doc-strings & type-hints

* reorganize handling of CLI transfer scripts

* documentation

* Update commands.py

* Update commands.py

* Update commands.py

* Update commands.py

* Update commands.py

* Update commands.py

* more verbose copy script

* use ibllib @master

* Update transfer_experiments.py

* MD5 -> BLAKE2B

* Update commands.py

* Update transfer_experiments.py

* Update wizard.py

* Update wizard.py

* Update wizard.py

* add dud detection & update changelog

* prevent windows from going to sleep

* add doc-strings and type-hints

* add docstrings for AdvancedCW

* refactoring

* offer deletion of dud sessions (working)

* add user input to transfer CLI

* refactoring copiers

* use blake2b hashing from iblutil

* pip reset --hard? oh my ...

* Update pyproject.toml

* Update CHANGELOG.md

* add control of status LED

* disable LEDs on start of iblrig

* add control for LED

* updated installation instructions

* minor corrections

* bug report form

* skip initialization of existing singleton

* remember state of singleton & GUI position

* update icons

* correct entry-points and add respective test-case

---------

Co-authored-by: olivier <[email protected]>
  • Loading branch information
bimac and oliche authored Oct 18, 2023
1 parent 92f472f commit 493fc9f
Show file tree
Hide file tree
Showing 27 changed files with 766 additions and 389 deletions.
38 changes: 0 additions & 38 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

32 changes: 32 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Bug Report
description: File a bug report
title: "[Bug]: "
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
- type: textarea
id: what-happened
attributes:
label: What happened?
description: Also tell us, what did you expect to happen?
placeholder: A bug happened!
value: ""
validations:
required: true
- type: input
id: version
attributes:
label: Version
description: What version of IBLRIG are you running?
placeholder: 8.x.x
validations:
required: true
- type: textarea
id: logs
attributes:
label: Relevant log output
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
render: shell
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@ Changelog

-------------------------------

8.11.0
------
* add check for availability of internet
* add proper CLI for data transfer scripts
* add option for disabling Bpod status LED
* skip initialization of existing Bpod singleton
* remember settings for status LED and GUI position
* move update-check to separate thread
* detect dud (less than 42 trials) and offer deletion
* various small bugfixes

8.10.2
------
* hot-fix parsing of path args in transfer_data
Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = ['sphinx_lesson']
extensions = ['sphinx_lesson', 'sphinx.ext.autosectionlabel']
source_suffix = ['.rst', '.md']

templates_path = ['_templates']
Expand Down
17 changes: 5 additions & 12 deletions docs/source/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,11 @@ If your rig is acting up:
* Don't hesitate to **contact our developer team** for assistance. We're committed to getting your system back on track.


Bug Alert!
==========
Bug Reports & Feature Requests
==============================

Indeed, bugs are persistently present. Our team is in a perpetual quest to eliminate these pesky issues. Your
contribution is invaluable in this endeavor; kindly consider `creating an issue on GitHub <https://github.com/int-brain-lab/iblrig/issues>`_.


Feature Request?
================

IBLRIG remains in dynamic development, tailored to meet your needs. Your input shapes our direction. `Send us your
feature-requests via GitHub <https://github.com/int-brain-lab/iblrig/issues>`_ - we will do our best to help you.
IBLRIG remains in dynamic development. Your input is invaluable in shaping its direction. `Send us your
bug reports and feature-requests via GitHub <https://github.com/int-brain-lab/iblrig/issues>`_ - we will do our best to help you.


Sound Issues
Expand All @@ -55,7 +48,7 @@ Screen Issues
=============

* The ribbon cable attaching the screen to the driver board is notoriously finicky. If you are having brightness issues or do not have a signal, try gently repositioning this cable and ensure it is tightly seated in its connection.
* Screen and ribbon cable can be easily damaged. It is useful to have backup at on hand.
* Screen and ribbon cable can be easily damaged. It is useful to have backup at hand.
* If the Bonsai display is appearing on the PC screen when a task starts, try unplugging the rig screen, rebooting and plugging the screen back in. Other variations of screen unplugging and rebooting may also work.
Also make sure, that the ``DISPLAY_IDX`` value in ``hardware_settings.yaml`` is set correctly.
* Screen flashing can occur if the power supply does not match the screen specifications. Use a 12V adapter with at least 1A.
Expand Down
68 changes: 51 additions & 17 deletions docs/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,51 +3,85 @@ Installation guide

.. prerequisites::

* Windows OS
* git installation.
* Recommended: Notepad++ or a decent text file editor
* A computer running Windows 10 or 11,
* A working installation of `git for windows <https://gitforwindows.org>`_, and
* `Notepad++ <https://notepad-plus-plus.org>`_ or some other decent text editor.

.. tip::

iblrigv8 can be installed alongside older versions of iblrig without affecting the latter.

.. tip::

If you believe this guide is incomplete or requires improvements, please don't hesitate to reach out and
:ref:`submit a bug report<Bug Reports & Feature Requests>`.

Install Python 3.10
-------------------

Open an Administrator: Windows Powershell prompt and run the following:
Prepare Windows PowerShell
--------------------------

Open Windows PowerShell in administrator mode:

* Click on the Windows Start button or press the Windows key on your keyboard.
* Type "PowerShell" into the search bar.
* You should see "Windows PowerShell" or "PowerShell" in the search results.
* Right-click on it.
* In the context menu that appears, select "Run as administrator."

Now, run the following command at the prompt of Windows PowerShell:

.. code-block:: powershell
Set-ExecutionPolicy RemoteSigned
Then exit the admin window and open a new Windows Powershell prompt (no admin mode) and run the following:
.. warning:: Make sure you exit the Administrator PowerShell before continuing with the next steps!

.. admonition:: Background
:class: seealso

In PowerShell, there are execution policies that determine the level of security for running scripts. The default execution
policy is often set to ``Restricted``, which means that scripts are not allowed to run. However, to install Python or run
certain scripts, you need to adjust the execution policy. By setting the execution policy to ``RemoteSigned``, you are
allowing the execution of locally created scripts without any digital signature while requiring that remotely downloaded
scripts (from the internet) must be digitally signed by a trusted source to run. This strikes a balance between security
and usability.


Install Python 3.10
-------------------

Open a `new` Windows Powershell prompt (no administrator mode) and run the following:

.. code-block:: powershell
New-Item -ItemType Directory -Force -Path C:\Temp
Invoke-WebRequest -Uri https://www.python.org/ftp/python/3.10.11/python-3.10.11-amd64.exe -OutFile C:\Temp\python-3.10.11-amd64.exe
Start-Process -NoNewWindow -Wait -FilePath C:\Temp\python-3.10.11-amd64.exe -ArgumentList "/passive", "InstallAllUsers=0", "Include_launcher=0", "Include_test=0"
Check that everything worked by running the following command:

.. exercise:: You can check that everything worked by running the following command:
.. code-block:: powershell
.. code-block:: powershell
C:\Users\IBLuser\AppData\Local\Programs\Python\Python310\.\python.exe --version
C:\Users\IBLuser\AppData\Local\Programs\Python\Python310\.\python.exe --version
The command should return ``Python 3.10.11``

Should return `Python 3.10.11`

.. warning:: Make sure you exit the Administrator Powershell prompt before going to the next steps.
.. admonition:: Background
:class: seealso

These commands will create a temporary directory, download the Python installer from a specific URL, and then execute the
installer with specific installation options, all in a controlled and automated manner.


Install iblrigv8
----------------

1. From the Powershell command line, clone iblrig to the iblrigv8’ directory, and switch to iblrigv8 branch
1. From the Powershell command line, clone the `iblrigv8` branch of iblrig to ``C:\iblrigv8``:

.. code-block:: powershell
cd C:\
git clone https://github.com/int-brain-lab/iblrig.git iblrigv8
cd iblrigv8
git checkout iblrigv8
git clone -b iblrigv8 https://github.com/int-brain-lab/iblrig.git C:\iblrigv8
2. Install a new virtual environment and update pip (modify the <Username> value if needed)
Expand Down
2 changes: 1 addition & 1 deletion iblrig/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# 3) Check CI and eventually wet lab test
# 4) Pull request to iblrigv8
# 5) git tag the release in accordance to the version number below (after merge!)
__version__ = '8.10.2'
__version__ = '8.10.3'

# The following method call will try to get post-release information (i.e. the number of commits since the last tagged
# release corresponding to the one above), plus information about the state of the local repository (dirty/broken)
Expand Down
2 changes: 1 addition & 1 deletion iblrig/base_choice_world_params.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
'BONSAI_EDITOR': false
'CALIBRATION_VALUE': 0.067
'CONTRAST_SET': [1.0, 0.25, 0.125, 0.0625, 0.0]
'CONTRAST_SET_PROBABILITY_TYPE': uniform # uniform, skew_zero
'CONTRAST_SET_PROBABILITY_TYPE': uniform # uniform or skew_zero: uniform makes the 0 contrast as likely as the others, while skew_zero makes it half as likely as other contrasts
'GO_TONE_AMPLITUDE': 0.0272
'GO_TONE_DURATION': 0.11
'GO_TONE_IDX': 2
Expand Down
1 change: 1 addition & 0 deletions iblrig/base_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -669,6 +669,7 @@ def start_mixin_bpod(self):
"provide a valid port name.")
self.bpod = Bpod(self.hardware_settings['device_bpod']['COM_BPOD'])
self.bpod.define_rotary_encoder_actions()
self.bpod.set_status_led(False)

def softcode_handler(code):
"""
Expand Down
2 changes: 1 addition & 1 deletion iblrig/choiceworld.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def compute_adaptive_reward_volume(subject_weight_g, reward_volume_ul, delivered

def get_subject_training_info(
subject_name, task_name='_iblrig_tasks_trainingChoiceWorld',
default_reward=DEFAULT_REWARD_VOLUME, mode='silent', **kwargs):
default_reward=DEFAULT_REWARD_VOLUME, mode='silent', **kwargs) -> tuple[int, float, dict]:
"""
Goes through the history of a subject and gets the latest
training phase and the adaptive reward volume for this subject
Expand Down
Loading

0 comments on commit 493fc9f

Please sign in to comment.