diff --git a/opensesame_extensions/updater/updater/update_widget.py b/opensesame_extensions/updater/updater/update_widget.py index 76ba0f9..699f091 100644 --- a/opensesame_extensions/updater/updater/update_widget.py +++ b/opensesame_extensions/updater/updater/update_widget.py @@ -35,9 +35,6 @@ def __init__(self, parent): def set_script(self, script): self._editor.setPlainText(script) - # cursor = self._editor.textCursor() - # cursor.movePosition(cursor.Start) - # self._editor.setTextCursor(cursor) def _run_script(self): self.extension_manager.fire('jupyter_run_code', diff --git a/opensesame_extensions/updater/updater/updater.py b/opensesame_extensions/updater/updater/updater.py index 4cdc565..2618644 100644 --- a/opensesame_extensions/updater/updater/updater.py +++ b/opensesame_extensions/updater/updater/updater.py @@ -54,7 +54,6 @@ def _pkg_info(pkg): result = subprocess.run(cmd, capture_output=True) info = json.loads(result.stdout) if len(info) != 1: - print(f'failed to parse {info}') return None, None return info[0], parse(info[0]['version']) @@ -105,7 +104,7 @@ def _check_update(pkg): def _check_updates(queue, pkgs): """The main process function that checks for each package in pkgs whether it can be updated, and puts UpdateInfo objects into the queue. - """" + """ available_updates = [] for pkg in pkgs: info = _check_update(pkg) @@ -151,7 +150,7 @@ def _check_update_process(self): oslogger.debug('checking update process') if self._queue.empty(): try: - print('update process still running') + oslogger.debug('update process still running') except ValueError: # Is raised when getting the pid of a closed process return @@ -176,7 +175,7 @@ def _finish_update_process(self): conda_updates = [info for info in self._updates if not info.pypi] if conda_updates: script.append( - '# The following packages can be updated through conda:') + _('# The following packages can be updated through conda:')) for info in conda_updates: script.append( f'# - {info.pkg} from {info.current} to {info.latest}') @@ -184,7 +183,7 @@ def _finish_update_process(self): script.append(f'%conda update {pkgs} -y') if pypi_updates: script.append( - '# The following packages can be updated through pip:') + _('# The following packages can be updated through pip:')) for info in pypi_updates: script.append( f'# - {info.pkg} from {info.current} to {info.latest}') diff --git a/pyproject.toml b/pyproject.toml index 1a21149..df95e76 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "opensesame-extension-updater" -version = "0.1.0" +version = "0.1.1" description = "Checks for updates to extensions and plugins in OpenSesame" authors = ["Sebastiaan Mathôt "] readme = "readme.md" @@ -8,6 +8,8 @@ packages = [ {include = "opensesame_extensions"}, ] license = "COPYING" +homepage = "https://osdoc.cogsci.nl" +repository = "https://github.com/open-cogsci/opensesame-extension-updater" [tool.poetry.dependencies] python = ">= 3.7"