hyperspyui.plugins.gitgetter module

class hyperspyui.plugins.gitgetter.GitSelector(main_window)

Bases: hyperspyui.plugins.plugin.Plugin

_check_git()
_get_update_list(names)
_on_load_complete()
_perform_update(package)
create_actions()
create_menu()
name = 'Version selector'
show_dialog()
update_check(silent=False)

Checks for updates to hyperspy and hyperspyUI.

If the packages are not source installs, it checks for a new version on PyPI.

Parameters

silent (bool) – If not silent (default), a message box will appear if no updates are available, with a message to that fact.

Return type

None.

class hyperspyui.plugins.gitgetter.PipOutput(parent=None)

Bases: PyQt5.QtWidgets.QDialog

create_controls()
sizeHint(self) QSize
class hyperspyui.plugins.gitgetter.VersionSelectionDialog(plugin, parent=None)

Bases: PyQt5.QtWidgets.QDialog

_cbo_changed(cbo, index)
create_controls()
class hyperspyui.plugins.gitgetter.VisualLogStream(parent=None, buf='')

Bases: _io.StringIO

_ensure_dialog()
isatty()

Return whether this is an ‘interactive’ stream.

Return False if it can’t be determined.

write(s)

Write string to file.

Returns the number of characters written, which is always equal to the length of the string.

hyperspyui.plugins.gitgetter.check_git_repo(package_name)

Try to determine if the package “package_name” is installed as a source install from a git folder.

hyperspyui.plugins.gitgetter.checkout_branch(branch, stream=None)

If branch is a string, assume it is archive url. Try to install by pip. Otherwise branch is assumed by a branch object from the git package, which will be attempted to be checked out.

hyperspyui.plugins.gitgetter.get_branches(package_name, url)

Either get git branches, or fetch branches from github.com

hyperspyui.plugins.gitgetter.get_github_branches(repo_url)

Return a list of branches for the github repo at given URL.

The branches are returned in the form of an ordered dictionary, with branch names as keys, and source zip URL as value.

hyperspyui.plugins.gitgetter.tr(text)