From 2673cb84f3e198f73b24ceb57c25ba05b6544865 Mon Sep 17 00:00:00 2001 From: Florian Rau Date: Thu, 19 Oct 2023 15:37:29 +0100 Subject: [PATCH 1/4] make iblrig_custom_tasks optional --- iblrig/gui/wizard.py | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/iblrig/gui/wizard.py b/iblrig/gui/wizard.py index f63d202c1..2752d7524 100644 --- a/iblrig/gui/wizard.py +++ b/iblrig/gui/wizard.py @@ -21,7 +21,12 @@ from one.api import ONE import iblrig_tasks -import iblrig_custom_tasks +try: + import iblrig_custom_tasks + CUSTOM_TASKS = True +except ImportError: + CUSTOM_TASKS = False + pass import iblrig.path_helper from iblrig.constants import BASE_DIR from iblrig.misc import _get_task_argument_parser @@ -95,11 +100,15 @@ def __post_init__(self): self.iblrig_settings = iblrig.path_helper.load_settings_yaml() self.all_users = [self.iblrig_settings['ALYX_USER']] if self.iblrig_settings['ALYX_USER'] else [] self.all_procedures = sorted(PROCEDURES) - # for the tasks, we build a dictionary that contains the task name as key and the path to the task.py as value + + # for the tasks, we build a dictionary that contains the task name as key and the path to task.py as value tasks = sorted([p for p in Path(iblrig_tasks.__file__).parent.rglob('task.py')]) - tasks.extend(sorted([p for p in Path(iblrig_custom_tasks.__file__).parent.rglob('task.py')])) + if CUSTOM_TASKS: + tasks.extend(sorted([p for p in Path(iblrig_custom_tasks.__file__).parent.rglob('task.py')])) self.all_tasks = OrderedDict({p.parts[-2]: p for p in tasks}) + self.all_projects = sorted(PROJECTS) + # get the subjects from iterating over folders in the the iblrig data path if self.iblrig_settings['iblrig_local_data_path'] is None: self.all_subjects = [self.test_subject_name] @@ -847,6 +856,7 @@ def main(): QtCore.QCoreApplication.setOrganizationName("International Brain Laboratory") QtCore.QCoreApplication.setOrganizationDomain("internationalbrainlab.org") QtCore.QCoreApplication.setApplicationName("IBLRIG Wizard") + if os.name == 'nt': app_id = f'IBL.iblrig.wizard.{iblrig.__version__}' ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID(app_id) From caf9201c478225a597106ed917c3c9af5516e20f Mon Sep 17 00:00:00 2001 From: Florian Rau Date: Thu, 19 Oct 2023 16:08:20 +0100 Subject: [PATCH 2/4] recover iblrig entry-point how did this get lost in the first place?! --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index dd1b2fc9d..d9b2e7487 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,6 +56,7 @@ transfer_video_data = "iblrig.commands:transfer_video_data_cli" transfer_ephys_data = "iblrig.commands:transfer_ephys_data_cli" flush = "iblrig.commands:flush" remove-old-sessions = "iblrig.commands:remove_local_sessions" +iblrig = "iblrig.gui.wizard:main" upgrade_iblrig = "iblrig.version_management:upgrade" install_spinnaker = "iblrig.camera:install_spinnaker_sdk" From 923426514f1694d2f20853ec850a28ef7d12a0a4 Mon Sep 17 00:00:00 2001 From: Florian Rau Date: Thu, 19 Oct 2023 16:08:47 +0100 Subject: [PATCH 3/4] fetch remote_tags only if connected to internet --- iblrig/version_management.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iblrig/version_management.py b/iblrig/version_management.py index 845157ae8..fc8fc744d 100644 --- a/iblrig/version_management.py +++ b/iblrig/version_management.py @@ -173,7 +173,7 @@ def get_remote_tags() -> None: ----- This method will only work with installations managed through Git. """ - if get_remote_tags.is_fetched_already: + if get_remote_tags.is_fetched_already or not internet_available(): return if not IS_GIT: log.error('This installation of iblrig is not managed through git') From 16ba474a47fb02775aa427cd29514163c6ee097f Mon Sep 17 00:00:00 2001 From: Florian Rau Date: Thu, 19 Oct 2023 16:14:08 +0100 Subject: [PATCH 4/4] 8.11.2 --- CHANGELOG.md | 6 ++++++ iblrig/__init__.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c58d85af1..a65f6c066 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,12 @@ Changelog ------------------------------- +8.11.2 +------ +* make custom_tasks optional +* repair lost entry-point for iblrig wizard +* fetch remote tags only if connected to internet + 8.11.1 ------ * add GUI options for AdvancedChoiceWorld diff --git a/iblrig/__init__.py b/iblrig/__init__.py index f718b5f93..900a1b117 100644 --- a/iblrig/__init__.py +++ b/iblrig/__init__.py @@ -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.11.1' +__version__ = '8.11.2' # 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)