diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e74329365fa39e389f305c72e7396c2a8e6a35c9..f8cd10dc6d5954ebe1032696839411c8c395eb9d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,16 +2,16 @@ # See https://pre-commit.com/hooks.html for more hooks repos: - repo: https://github.com/timothycrosley/isort - rev: 5.6.4 + rev: 5.10.1 hooks: - id: isort args: [-sl] - repo: https://github.com/psf/black - rev: 20.8b1 + rev: 22.3.0 hooks: - id: black - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v3.4.0 + rev: v4.1.0 hooks: - id: check-ast - id: check-case-conflict @@ -23,11 +23,11 @@ repos: - id: check-yaml exclude: conda/meta.yaml - repo: https://github.com/PyCQA/flake8/ - rev: 3.9.0 + rev: 4.0.1 hooks: - id: flake8 - repo: https://github.com/PyCQA/bandit - rev: 1.7.0 + rev: 1.7.4 hooks: - id: bandit exclude: beat/editor/test diff --git a/beat/editor/test/test_spinboxes.py b/beat/editor/test/test_spinboxes.py index 0798e7cf8196c368806bc52cc0269fe3777293a0..859fced564b602eea0df5aca5a623fa5fc8e650d 100644 --- a/beat/editor/test/test_spinboxes.py +++ b/beat/editor/test/test_spinboxes.py @@ -48,7 +48,7 @@ def expected_values(): class TestInvalidTypes: """Test using invalid types for creation""" - @pytest.mark.parametrize("invalid_type", [None, np.bool, np.str]) + @pytest.mark.parametrize("invalid_type", [None, bool, np.str]) def test_invalid_type(self, qtbot, invalid_type): with pytest.raises(RuntimeError): NumpySpinBox(invalid_type) @@ -57,7 +57,7 @@ class TestInvalidTypes: class SpinBoxBaseTest: numpy_type = None - @pytest.mark.parametrize("invalid_type", [None, np.bool, np.str]) + @pytest.mark.parametrize("invalid_type", [None, bool, np.str]) def test_set_invalid_type(self, qtbot, invalid_type): spinbox = NumpySpinBox(self.numpy_type) with pytest.raises(RuntimeError): diff --git a/beat/editor/widgets/assetwidget.py b/beat/editor/widgets/assetwidget.py index e68813081a26106e81faf74c3f6ff6f5bd5d21d4..29e2f8b7d5b6903c195aae5a34dd3db9d6a7dda5 100644 --- a/beat/editor/widgets/assetwidget.py +++ b/beat/editor/widgets/assetwidget.py @@ -208,7 +208,7 @@ class AssetWidget(QWidget): @property def current_editor(self): - """Returns the current visible editor """ + """Returns the current visible editor""" return self.editors.currentWidget() diff --git a/beat/editor/widgets/experimenteditor.py b/beat/editor/widgets/experimenteditor.py index a6d1f2629c88892d661154e2481d78cc7d3c7b8d..be4d3c75c0d6ce22418ef1c8c53c672042f0c835 100644 --- a/beat/editor/widgets/experimenteditor.py +++ b/beat/editor/widgets/experimenteditor.py @@ -597,7 +597,7 @@ class ExecutionPropertiesEditor(AbstractBaseEditor): super().__init__(prefix_path, parent) self.json_object = {} - self.io_mapping = {} + self.io_mapping = {"inputs": {}} self.environment_changed = False self.queue_changed = False self._queue_enabled = True @@ -664,7 +664,6 @@ class ExecutionPropertiesEditor(AbstractBaseEditor): @pyqtSlot() def __remapIO(self): - status, mapping = IOMapperDialog.getIOMapping(self.prefix_path, self.dump()) if status and self.io_mapping != mapping: @@ -756,12 +755,7 @@ class ExecutionPropertiesEditor(AbstractBaseEditor): def load(self, json_object): self.json_object = copy.deepcopy(json_object) inputs = json_object.get("inputs", {}) - - self.io_mapping = {"inputs": inputs} - outputs = json_object.get("outputs", {}) - if outputs: - self.io_mapping["outputs"] = outputs self.algorithm_model.setInputCount(len(inputs)) self.algorithm_model.setOutputCount(len(outputs)) @@ -793,6 +787,10 @@ class ExecutionPropertiesEditor(AbstractBaseEditor): if parameters: self.parameters_editor.load(parameters) + self.io_mapping = {"inputs": inputs} + if outputs: + self.io_mapping["outputs"] = outputs + self.environment_changed = False self.queue_changed = False self.parameters_changed = False diff --git a/conda/meta.yaml b/conda/meta.yaml index a4cdabae11fca41168d10478a665ddc480522122..3f4fc65ddaba24510591f7b17a8c732e2bc1fd8c 100644 --- a/conda/meta.yaml +++ b/conda/meta.yaml @@ -6,6 +6,7 @@ package: version: {{ environ.get('BOB_PACKAGE_VERSION', '0.0.1') }} build: + skip: True # [arm64] number: {{ environ.get('BOB_BUILD_NUMBER', 0) }} run_exports: - {{ pin_subpackage(name) }} diff --git a/doc/conf.py b/doc/conf.py index c9b21f53e944d6262233e68a31f08ff92cce653f..e5af3efd5632de02d48f5a8b1186bd06067b87b7 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -78,9 +78,9 @@ source_suffix = ".rst" master_doc = "index" # General information about the project. -project = u"beat.editor" +project = "beat.editor" -copyright = u"%s, Idiap Research Institute" % time.strftime("%Y") +copyright = "%s, Idiap Research Institute" % time.strftime("%Y") # Grab the setup entry distribution = pkg_resources.require(project)[0] @@ -130,8 +130,8 @@ pygments_style = "sphinx" # Some variables which are useful for generated material project_variable = project.replace(".", "_") -short_description = u"BEAT Platform (Python backend)" -owner = [u"Idiap Research Institute"] +short_description = "BEAT Platform (Python backend)" +owner = ["Idiap Research Institute"] # -- Options for HTML output --------------------------------------------------- @@ -212,7 +212,7 @@ html_favicon = "img/favicon.ico" # html_file_suffix = None # Output file base name for HTML help builder. -htmlhelp_basename = project_variable + u"_doc" +htmlhelp_basename = project_variable + "_doc" # -- Post configuration -------------------------------------------------------- diff --git a/doc/get_dep_licenses.py b/doc/get_dep_licenses.py index 5d626bfa0b7e242998b90848f24873b5b877aad8..b83cb9d618820c73fa8a70e65d28609f9baca420 100755 --- a/doc/get_dep_licenses.py +++ b/doc/get_dep_licenses.py @@ -71,7 +71,7 @@ def _call_conda(extra_args): def _get_pip_info(): - """ Get license info from pip""" + """Get license info from pip""" return _run_cmd(["pip-licenses", "--format-json"])