From b379fbf991461df970ec6c3909d6a3866a6d65c2 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 24 Jun 2024 22:48:17 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/pre-commit-hooks: v4.1.0 → v4.6.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.1.0...v4.6.0) - https://github.com/ikamensh/flynt/: 0.76 → 1.0.1 - [github.com/psf/black: 23.3.0 → 24.4.2](https://github.com/psf/black/compare/23.3.0...24.4.2) - [github.com/PyCQA/flake8: 4.0.1 → 7.1.0](https://github.com/PyCQA/flake8/compare/4.0.1...7.1.0) - [github.com/pycqa/isort: 5.12.0 → 5.13.2](https://github.com/pycqa/isort/compare/5.12.0...5.13.2) - [github.com/sirosen/check-jsonschema: 0.14.0 → 0.28.6](https://github.com/sirosen/check-jsonschema/compare/0.14.0...0.28.6) - [github.com/kynan/nbstripout: 0.6.1 → 0.7.1](https://github.com/kynan/nbstripout/compare/0.6.1...0.7.1) --- .pre-commit-config.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2539f9cc..0d54f715 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,7 +2,7 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.1.0 + rev: v4.6.0 hooks: - id: check-json - id: check-yaml @@ -15,18 +15,18 @@ repos: exclude: *exclude_pre_commit_hooks - repo: https://github.com/ikamensh/flynt/ - rev: '0.76' + rev: '1.0.1' hooks: - id: flynt - repo: https://github.com/psf/black - rev: 23.3.0 + rev: 24.4.2 hooks: - id: black language_version: python3 # Should be a command that runs python3.6+ - repo: https://github.com/PyCQA/flake8 - rev: 4.0.1 + rev: 7.1.0 hooks: - id: flake8 args: [--count, --show-source, --statistics] @@ -40,17 +40,17 @@ repos: ) - repo: https://github.com/pycqa/isort - rev: 5.12.0 + rev: 5.13.2 hooks: - id: isort args: [--profile, black, --filter-files] - repo: https://github.com/sirosen/check-jsonschema - rev: 0.14.0 + rev: 0.28.6 hooks: - id: check-github-workflows - repo: https://github.com/kynan/nbstripout - rev: 0.6.1 + rev: 0.7.1 hooks: - id: nbstripout From 1a2e93b291a08eb46f6c5b10e37a4f61a2eb7b40 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 24 Jun 2024 22:48:30 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- aiida_sssp_workflow/workflows/convergence/_base.py | 12 ++++++------ aiida_sssp_workflow/workflows/measure/__init__.py | 1 + aiida_sssp_workflow/workflows/verifications.py | 12 ++++++------ ...run_bands_distance_calculation-checkpoint.ipynb | 14 +++++++------- examples/run_bands_distance_calculation.ipynb | 14 +++++++------- 5 files changed, 27 insertions(+), 26 deletions(-) diff --git a/aiida_sssp_workflow/workflows/convergence/_base.py b/aiida_sssp_workflow/workflows/convergence/_base.py index 432de039..ff748dce 100644 --- a/aiida_sssp_workflow/workflows/convergence/_base.py +++ b/aiida_sssp_workflow/workflows/convergence/_base.py @@ -542,18 +542,18 @@ def inspect_wfc_convergence_test(self): # specificly write output for set criteria if name == self.inputs.criteria.value: - self.ctx.output_parameters[ - "wavefunction_cutoff" - ] = self.ctx.wfc_cutoff = res["cutoff"].value + self.ctx.output_parameters["wavefunction_cutoff"] = ( + self.ctx.wfc_cutoff + ) = res["cutoff"].value self.logger.info( f"The wfc convergence at {self.ctx.wfc_cutoff} with value={res['value'].value}" ) # write output wavefunction cutoff in all criteria. - self.ctx.output_parameters[ - "all_criteria_wavefunction_cutoff" - ] = all_criteria_wavefunction_cutoff + self.ctx.output_parameters["all_criteria_wavefunction_cutoff"] = ( + all_criteria_wavefunction_cutoff + ) def run_rho_convergence_test(self): """ diff --git a/aiida_sssp_workflow/workflows/measure/__init__.py b/aiida_sssp_workflow/workflows/measure/__init__.py index 8e6dee37..d94c2dcc 100644 --- a/aiida_sssp_workflow/workflows/measure/__init__.py +++ b/aiida_sssp_workflow/workflows/measure/__init__.py @@ -2,6 +2,7 @@ This class makes it able to expose precision measure and bands measure inputs to verification workchain. """ + from aiida import orm from aiida.plugins import DataFactory diff --git a/aiida_sssp_workflow/workflows/verifications.py b/aiida_sssp_workflow/workflows/verifications.py index 6bbd4f64..ef54c093 100644 --- a/aiida_sssp_workflow/workflows/verifications.py +++ b/aiida_sssp_workflow/workflows/verifications.py @@ -231,9 +231,9 @@ def init_setup(self): if "convergence.cohesive_energy" in self.ctx.properties_list: inputs_cohesive_energy = convergence_inputs.copy() if "pw_code_large_memory" in self.inputs: - inputs_cohesive_energy[ - "pw_code_large_memory" - ] = self.inputs.pw_code_large_memory + inputs_cohesive_energy["pw_code_large_memory"] = ( + self.inputs.pw_code_large_memory + ) self.ctx.convergence_inputs["cohesive_energy"] = inputs_cohesive_energy @@ -249,9 +249,9 @@ def init_setup(self): False ) # For phonon frequencies convergence workflow, the clean dir is taken care by the the finalize step of the verification workflow. - self.ctx.convergence_inputs[ - "phonon_frequencies" - ] = inputs_phonon_frequencies + self.ctx.convergence_inputs["phonon_frequencies"] = ( + inputs_phonon_frequencies + ) if "convergence.bands" in self.ctx.properties_list: inputs_bands = convergence_inputs.copy() diff --git a/examples/.ipynb_checkpoints/run_bands_distance_calculation-checkpoint.ipynb b/examples/.ipynb_checkpoints/run_bands_distance_calculation-checkpoint.ipynb index 93e547ee..8d9e2327 100644 --- a/examples/.ipynb_checkpoints/run_bands_distance_calculation-checkpoint.ipynb +++ b/examples/.ipynb_checkpoints/run_bands_distance_calculation-checkpoint.ipynb @@ -3,7 +3,7 @@ { "cell_type": "code", "execution_count": null, - "id": "9cee1e87", + "id": "0", "metadata": {}, "outputs": [], "source": [ @@ -14,7 +14,7 @@ { "cell_type": "code", "execution_count": null, - "id": "17deac4a", + "id": "1", "metadata": {}, "outputs": [], "source": [ @@ -26,7 +26,7 @@ { "cell_type": "code", "execution_count": null, - "id": "24681474", + "id": "2", "metadata": {}, "outputs": [], "source": [ @@ -39,7 +39,7 @@ { "cell_type": "code", "execution_count": null, - "id": "531fb97d", + "id": "3", "metadata": {}, "outputs": [], "source": [ @@ -57,7 +57,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d6dba316", + "id": "4", "metadata": {}, "outputs": [], "source": [ @@ -78,7 +78,7 @@ { "cell_type": "code", "execution_count": null, - "id": "973e8f96", + "id": "5", "metadata": {}, "outputs": [], "source": [] @@ -86,7 +86,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f28f42b3", + "id": "6", "metadata": {}, "outputs": [], "source": [] diff --git a/examples/run_bands_distance_calculation.ipynb b/examples/run_bands_distance_calculation.ipynb index 93e547ee..8d9e2327 100644 --- a/examples/run_bands_distance_calculation.ipynb +++ b/examples/run_bands_distance_calculation.ipynb @@ -3,7 +3,7 @@ { "cell_type": "code", "execution_count": null, - "id": "9cee1e87", + "id": "0", "metadata": {}, "outputs": [], "source": [ @@ -14,7 +14,7 @@ { "cell_type": "code", "execution_count": null, - "id": "17deac4a", + "id": "1", "metadata": {}, "outputs": [], "source": [ @@ -26,7 +26,7 @@ { "cell_type": "code", "execution_count": null, - "id": "24681474", + "id": "2", "metadata": {}, "outputs": [], "source": [ @@ -39,7 +39,7 @@ { "cell_type": "code", "execution_count": null, - "id": "531fb97d", + "id": "3", "metadata": {}, "outputs": [], "source": [ @@ -57,7 +57,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d6dba316", + "id": "4", "metadata": {}, "outputs": [], "source": [ @@ -78,7 +78,7 @@ { "cell_type": "code", "execution_count": null, - "id": "973e8f96", + "id": "5", "metadata": {}, "outputs": [], "source": [] @@ -86,7 +86,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f28f42b3", + "id": "6", "metadata": {}, "outputs": [], "source": []