Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed issue where blacs couldn't close with certain tabs #87

Merged
merged 1 commit into from
Nov 24, 2021

Conversation

zakv
Copy link
Contributor

@zakv zakv commented Jan 15, 2021

Fixes #86 using Chris's suggestion there.

In short, the issue was that blacs failed to close when a PluginTab was used because that class doesn't have shutdown_workers() and finalise_close_tab() methods. This PR works around that by having blacs only call those methods on tabs that actually have them.

…_workers() and finalise_close_tab() methods.

In particular, PluginTab doesn't have these methods.
@zakv zakv mentioned this pull request Feb 6, 2021
@dihm
Copy link
Contributor

dihm commented Nov 15, 2021

@zakv @chrisjbillington This looks fine to me, but I do have a question. Could we not just add these missing methods as blank passes in the PluginTab class as well? I can certainly imagine their functionality being useful at some point for plugins, and it may also help if we ever get around to merging the PluginTab and DeviceTab classes to have them be more similar. Thoughts?

I haven't thought super hard about it, so feel free to tell me that is a bad idea.

@zakv
Copy link
Contributor Author

zakv commented Nov 22, 2021

Sorry for the slow response, I'm a bit short on time at the moment. I do think your suggestion would be the most reasonable thing to do for the class methods. I'm not as sure what to do with the required attributes state and shutdown_workers_complete though. Maybe there is a reasonable way to handle those if they are added to the PluginTab class. I haven't had a chance to dig through the code again but from my comment here it seemed like they were necessary in the current implementation.

@dihm
Copy link
Contributor

dihm commented Nov 24, 2021

Fair enough. I should have read the bug report thread more carefully. Dealing with missing attributes as well is probably just complicated enough that I'd rather not touch it now, so this is the better method. I'll go ahead and merge it.

@dihm dihm merged commit dbeccbc into labscript-suite:master Nov 24, 2021
dihm added a commit that referenced this pull request Dec 7, 2021
commit c054099
Author: David Meyer <dihm@users.noreply.github.com>
Date:   Tue Dec 7 10:26:22 2021 -0500

    Update setup.cfg to show python 3.9 support

commit d1ee324
Merge: dbeccbc ce11661
Author: David Meyer <dihm@users.noreply.github.com>
Date:   Tue Nov 30 12:42:32 2021 -0500

    Merge pull request #79 from philipstarkey/break-circular-dependency

    Updated BLACS to use the new labscript-utils device registry.

commit ce11661
Merge: 741d790 dbeccbc
Author: David Meyer <dihm@users.noreply.github.com>
Date:   Tue Nov 30 12:39:25 2021 -0500

    Merge branch 'master' into break-circular-dependency

commit dbeccbc
Merge: 641cdeb 7f9552a
Author: David Meyer <dihm@users.noreply.github.com>
Date:   Wed Nov 24 11:22:29 2021 -0500

    Merge pull request #87 from zakv/fix-86

    Fixed issue where blacs couldn't close with certain tabs

commit 641cdeb
Merge: e8bdd1b ff6f447
Author: David Meyer <dihm@users.noreply.github.com>
Date:   Wed Nov 10 16:57:14 2021 -0500

    Merge pull request #81 from zakv/conversion-import-error

    Fix Bug in AO.__init__() When Unit Conversion Import Fails

commit e8bdd1b
Merge: b083bb8 868b991
Author: David Meyer <dihm@users.noreply.github.com>
Date:   Fri Jul 16 16:06:03 2021 -0400

    Merge pull request #80 from dihm/blacs-docs

    Initial pass at BLACS docs

commit 868b991
Author: David Meyer <dihm.meyer@gmail.com>
Date:   Thu Jul 15 10:37:40 2021 -0400

    Add docstring coverage check to build.

commit ce2c490
Author: David Meyer <dihm.meyer@gmail.com>
Date:   Thu Jul 15 10:37:15 2021 -0400

    Update sphinx pin.

commit a3e6040
Author: David Meyer <dihm.meyer@gmail.com>
Date:   Fri Jul 9 12:05:25 2021 -0400

    Add unlisted dependency in `compile_and_restart` on runmanager.

commit 2c0ec0c
Author: David Meyer <dihm.meyer@gmail.com>
Date:   Fri Jul 9 11:57:36 2021 -0400

    Add missing import to conf.py

commit 03a53e2
Author: David Meyer <dihm.meyer@gmail.com>
Date:   Fri Jul 9 11:55:06 2021 -0400

    Add API documentation for the BLACS GUI.

commit 869d28f
Author: David Meyer <dihm.meyer@gmail.com>
Date:   Fri Jul 9 11:52:38 2021 -0400

    Version bump sphinx to match rest of modules.

commit 06539c4
Author: David Meyer <dihm.meyer@gmail.com>
Date:   Tue Nov 17 19:41:19 2020 -0500

    Updating high level docs from @philipstarkey Thesis.

commit d542c2f
Author: David Meyer <dihm.meyer@gmail.com>
Date:   Tue Nov 17 17:27:25 2020 -0500

    Add API documentation for the blacs submodules.

    Relies on recursive autosummary and a custom template.

    In testing builds, noticed that experiment_queue and plugins depended on
    a properly set up labconfig; namely experiment_shot_storage. Might be an
    issue on readthedocs.

commit 057d849
Author: David Meyer <dihm.meyer@gmail.com>
Date:   Tue Nov 17 17:03:41 2020 -0500

    Add pyqt5 intersphinx inventory.

commit b083bb8
Merge: 2bd2aa6 3930ffc
Author: chrisjbillington <chrisjbillington@gmail.com>
Date:   Fri Apr 9 12:27:24 2021 +1000

    Merge branch 'dihm/setuptools_scm-fix'

commit 3930ffc
Author: chrisjbillington <chrisjbillington@gmail.com>
Date:   Fri Apr 9 12:26:48 2021 +1000

    * Continue to set local scheme based on env var
      in `__version__.py` for consistency.

    * Don't require specific setuptools or [toml] extra from setuptools_scm.
      We aren't configuring setuptools_scm in pyproject.toml anyway, and
      setuptools_scm itself will specify a fairly recent version of
      setuptools (we have no special requirement ourselves)

    * no longer use env var for version_scheme in setup.py, since we're now
      hard-coding release-branch-semver.

commit 75b10aa
Author: David Meyer <dihm.meyer@gmail.com>
Date:   Fri Apr 2 13:50:25 2021 -0400

    Update setup.cfg

    Adds setuptools-scm with required version.

commit feff404
Author: David Meyer <dihm.meyer@gmail.com>
Date:   Tue Dec 29 14:22:20 2020 -0500

    Update default setuptools_scm version scheme to release-branch-semver.

    This fixes the circular dependency issue between blacs and labscript-devices.

commit 7f9552a
Author: Zak V <zakven@mit.edu>
Date:   Fri Jan 15 08:23:51 2021 -0500

    Fixed issue where blacs couldn't close if a tab doesn't have shutdown_workers() and finalise_close_tab() methods.

    In particular, PluginTab doesn't have these methods.

commit 2bd2aa6
Merge: 0e153f2 ca203a4
Author: Chris Billington <chrisjbillington@gmail.com>
Date:   Tue Jan 5 13:55:02 2021 +1100

    Merge pull request #85 from zakv/fix-84

    Fix copy/paste bug where stop_order is set to start_order

commit ca203a4
Author: Zak V <zakven@mit.edu>
Date:   Mon Jan 4 21:16:06 2021 -0500

    Fixed copy/paste bug where stop_order was set to start_order in
    QueueManager.manage().

commit ff6f447
Author: Zak V <zakven@mit.edu>
Date:   Tue Nov 24 17:30:12 2020 -0500

    Corrected mistaken change to AO.__init__() error message in previous commit.

commit e0a615a
Author: Zak V <zakven@mit.edu>
Date:   Tue Nov 24 16:54:22 2020 -0500

    Fixed bug in AO.__init__() where failure to import a unit conversion class wasn't reported correctly, causing "AttributeError: 'NoneType' object has no attribute 'base_unit'".

commit 741d790
Author: philipstarkey <philipstarkey@users.noreply.github.com>
Date:   Thu Jul 16 17:17:02 2020 +1000

    Updated BLACS to use the new labscript-utils device registry.

    Removes the circular dependency on labscript-devices.

    This update assumes we will publish a new labscript-utils beta (3.1.0b1) shortly (so will  fail to build on RTD until that is done)
@zakv zakv deleted the fix-86 branch January 2, 2023 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Blacs fails to close when using a PluginTab
2 participants