From 8ff311798256b883157272245f35a52c5d839505 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 6 Nov 2023 16:49:03 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- aiidalab_sssp/inspect/plot_utils.py | 1 - aiidalab_sssp/inspect/subwidgets/convergence.py | 2 -- aiidalab_sssp/inspect/subwidgets/plot.py | 11 ----------- aiidalab_sssp/process.py | 1 - aiidalab_sssp/setup_codes.py | 2 -- aiidalab_sssp/steps.py | 7 ------- setup.cfg | 5 +---- viewers.py | 2 +- 8 files changed, 2 insertions(+), 29 deletions(-) diff --git a/aiidalab_sssp/inspect/plot_utils.py b/aiidalab_sssp/inspect/plot_utils.py index ca1c4bd..5228c92 100644 --- a/aiidalab_sssp/inspect/plot_utils.py +++ b/aiidalab_sssp/inspect/plot_utils.py @@ -17,7 +17,6 @@ def convergence(pseudos: dict, wf_name, measure_name, ylabel, threshold=None): - px = 1 / plt.rcParams["figure.dpi"] fig, (ax1, ax2) = plt.subplots( 1, 2, gridspec_kw={"width_ratios": [2, 1]}, figsize=(960 * px, 360 * px) diff --git a/aiidalab_sssp/inspect/subwidgets/convergence.py b/aiidalab_sssp/inspect/subwidgets/convergence.py index 27ebeda..0273d28 100644 --- a/aiidalab_sssp/inspect/subwidgets/convergence.py +++ b/aiidalab_sssp/inspect/subwidgets/convergence.py @@ -81,11 +81,9 @@ def get_threshold(property_name) -> dict: class ConvergenceWidget(ipw.VBox): - pseudos = traitlets.Dict(allow_none=True) def __init__(self): - # using raido button widget so user only choose one proper to check # at one time. It can be more, but pollute the UX and not useful. self.property_select = ipw.RadioButtons( diff --git a/aiidalab_sssp/inspect/subwidgets/plot.py b/aiidalab_sssp/inspect/subwidgets/plot.py index 429d598..b4df694 100644 --- a/aiidalab_sssp/inspect/subwidgets/plot.py +++ b/aiidalab_sssp/inspect/subwidgets/plot.py @@ -6,7 +6,6 @@ class _PlotConvergenBaseWidget(ipw.VBox): - selected_pseudos = traitlets.Dict(allow_none=True) _WF = "Not implement" @@ -26,7 +25,6 @@ def __init__(self): @traitlets.observe("selected_pseudos") def _on_pseudos_change(self, change): - if change["new"]: with self.output: clear_output(wait=True) @@ -42,7 +40,6 @@ def _on_pseudos_change(self, change): class PlotCohesiveEnergyConvergeWidget(_PlotConvergenBaseWidget): - _WF = "convergence_cohesive_energy" _MEASURE = "cohesive_energy_per_atom" _YLABEL = "Cohesive Energy per atom (meV/atom)" @@ -50,7 +47,6 @@ class PlotCohesiveEnergyConvergeWidget(_PlotConvergenBaseWidget): class PlotCohesiveEnergyConvergeDiffWidget(_PlotConvergenBaseWidget): - _WF = "convergence_cohesive_energy" _MEASURE = "absolute_diff" _YLABEL = "Cohesive Energy per atom (absolute error, meV/atom)" @@ -58,7 +54,6 @@ class PlotCohesiveEnergyConvergeDiffWidget(_PlotConvergenBaseWidget): class PlotPhononFrequenciesConvergeAbsWidget(_PlotConvergenBaseWidget): - _WF = "convergence_phonon_frequencies" _MEASURE = "absolute_diff" _YLABEL = "Phonon frequencies ω (absolute error, cm-1)" @@ -66,7 +61,6 @@ class PlotPhononFrequenciesConvergeAbsWidget(_PlotConvergenBaseWidget): class PlotPhononFrequenciesConvergeRelWidget(_PlotConvergenBaseWidget): - _WF = "convergence_phonon_frequencies" _MEASURE = "relative_diff" _YLABEL = "Phonon frequencies ω (relative error, %)" @@ -74,7 +68,6 @@ class PlotPhononFrequenciesConvergeRelWidget(_PlotConvergenBaseWidget): class PlotPressureConvergeWidget(_PlotConvergenBaseWidget): - _WF = "convergence_pressure" _MEASURE = "pressure" _YLABEL = "Pressure (GPa)" @@ -82,7 +75,6 @@ class PlotPressureConvergeWidget(_PlotConvergenBaseWidget): class PlotPressureConvergeRelWidget(_PlotConvergenBaseWidget): - _WF = "convergence_pressure" _MEASURE = "relative_diff" _YLABEL = "Pressure (relative error, %)" @@ -90,7 +82,6 @@ class PlotPressureConvergeRelWidget(_PlotConvergenBaseWidget): class PlotDeltaConvergeWidget(_PlotConvergenBaseWidget): - _WF = "convergence_delta" _MEASURE = "delta" _YLABEL = "Δ -factor (meV)" @@ -98,7 +89,6 @@ class PlotDeltaConvergeWidget(_PlotConvergenBaseWidget): class PlotDeltaConvergeRelWidget(_PlotConvergenBaseWidget): - _WF = "convergence_delta" _MEASURE = "relative_diff" _YLABEL = "Delta (relative error, %)" @@ -106,7 +96,6 @@ class PlotDeltaConvergeRelWidget(_PlotConvergenBaseWidget): class PlotBandsConvergeWidget(_PlotConvergenBaseWidget): - _WF = "convergence_bands" _MEASURE = "eta_c" _YLABEL = "η up above fermi energe 5 eV (meV)" diff --git a/aiidalab_sssp/process.py b/aiidalab_sssp/process.py index 0d1b7b8..2959144 100644 --- a/aiidalab_sssp/process.py +++ b/aiidalab_sssp/process.py @@ -9,7 +9,6 @@ class WorkChainSelector(ipw.HBox): - # The PK of a 'aiida.workflows:quantumespresso.pw.bands' WorkChainNode. value = traitlets.Unicode(allow_none=True) diff --git a/aiidalab_sssp/setup_codes.py b/aiidalab_sssp/setup_codes.py index bcc54bf..0541af4 100644 --- a/aiidalab_sssp/setup_codes.py +++ b/aiidalab_sssp/setup_codes.py @@ -98,7 +98,6 @@ def setup_codes(): class QESetupWidget(ipw.VBox): - installed = traitlets.Bool(allow_none=True).tag(readonly=True) busy = traitlets.Bool().tag(readonly=True) error = traitlets.Unicode().tag(readonly=True) @@ -324,7 +323,6 @@ def __init__(self, description_layout=None, *args, **kwargs): super().__init__([self._label, self._progress_bar], *args, **kwargs) def _animate(self, refresh_rate=0.01): - v0 = self._progress_bar.value t0 = time() diff --git a/aiidalab_sssp/steps.py b/aiidalab_sssp/steps.py index 7fb60a3..b67d66a 100644 --- a/aiidalab_sssp/steps.py +++ b/aiidalab_sssp/steps.py @@ -159,7 +159,6 @@ def reset(self): # unconfirm class WorkChainSettings(ipw.VBox): - calc_type_help = ipw.HTML( """