Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup warning from unit tests #490

Closed
danielhollas opened this issue Jun 25, 2023 · 0 comments · Fixed by #509
Closed

Cleanup warning from unit tests #490

danielhollas opened this issue Jun 25, 2023 · 0 comments · Fixed by #509
Labels
good first issue Good for newcomers

Comments

@danielhollas
Copy link
Contributor

Just noticed that runnning pytest tests/ results in a fair amount of Warnings. Not sure how critical they are but we should clear them up.

tests/test_bug_report.py::test_fingerprint_parser
  /opt/conda/lib/python3.9/site-packages/aiida/manage/configuration/settings.py:59: UserWarning: Creating AiiDA configuration folder `/tmp/pytest-of-jovyan/pytest-1/config0/.aiida`.
    warnings.warn(f'Creating AiiDA configuration folder `{path}`.')

tests/test_bug_report.py::test_fingerprint_parser
  /home/jovyan/.local/lib/python3.9/site-packages/ipywidgets_extended/dropdown.py:37: DeprecationWarning: metadata {'trait': <traitlets.traitlets.Unicode object at 0x7f630ef44610>} was set from the constructor. With traitlets 4.1, metadata should be set using the .tag() method, e.g., Int().tag(key1='value1', key2='value2')
    _disabled_options_labels = traitlets.Tuple(

tests/test_computational_resources.py: 21 warnings
tests/test_process.py: 2 warnings
tests/test_structures.py: 15 warnings
tests/test_viewers.py: 2 warnings
  /opt/conda/lib/python3.9/site-packages/ipywidgets/widgets/widget_selection.py:121: DeprecationWarning: Support for mapping types has been deprecated and will be dropped in a future release.
    warnings.warn("Support for mapping types has been deprecated and will be dropped in a future release.", DeprecationWarning)

tests/test_computational_resources.py::test_computaional_resources_widget
tests/test_computational_resources.py::test_computaional_resources_widget
tests/test_databases.py::test_computational_resources_database_widget
tests/test_databases.py::test_computational_resources_database_widget
tests/test_databases.py::test_computational_resources_database_widget
tests/test_databases.py::test_computational_resources_database_widget
  /opt/conda/lib/python3.9/site-packages/ipywidgets/widgets/widget.py:477: DeprecationWarning: Passing unrecognized arguments to super(Dropdown).__init__(disable=False).
  object.__init__() takes exactly one argument (the instance to initialize)
  This is deprecated in traitlets 4.2.This error will be raised in a future release of traitlets.
    super(Widget, self).__init__(**kwargs)

tests/test_computational_resources.py::test_computaional_resources_widget
tests/test_computational_resources.py::test_ssh_computer_setup_widget
  /opt/conda/lib/python3.9/site-packages/ipywidgets/widgets/widget.py:477: DeprecationWarning: Passing unrecognized arguments to super(ButtonStyle).__init__(description_width='180px').
  object.__init__() takes exactly one argument (the instance to initialize)
  This is deprecated in traitlets 4.2.This error will be raised in a future release of traitlets.
    super(Widget, self).__init__(**kwargs)

tests/test_databases.py::test_cod_query_widget
  /home/jovyan/.local/lib/python3.9/site-packages/ase/io/cif.py:401: UserWarning: crystal system 'cubic' is not interpreted for space group 'Pm-3m'. This may result in wrong setting!
    warnings.warn(

tests/test_nodes.py::test_open_aiida_node_in_app_widget
  /opt/conda/lib/python3.9/site-packages/ipywidgets/widgets/widget.py:477: DeprecationWarning: Passing unrecognized arguments to super(Tab).__init__(style={'description_width': 'initial'}).
  object.__init__() takes exactly one argument (the instance to initialize)
  This is deprecated in traitlets 4.2.This error will be raised in a future release of traitlets.
    super(Widget, self).__init__(**kwargs)

tests/test_process.py::test_process_inputs_widget
  /home/jovyan/apps/aiidalab-widgets-base/aiidalab_widgets_base/process.py:215: UserWarning: Did not find an appropriate viewer for the <class 'aiida.orm.nodes.data.int.Int'> object. Returning the object itself.
    display(viewer(selected_input))

tests/test_process.py::test_process_outputs_widget
  /home/jovyan/apps/aiidalab-widgets-base/aiidalab_widgets_base/process.py:252: UserWarning: Did not find an appropriate viewer for the <class 'aiida.orm.nodes.data.int.Int'> object. Returning the object itself.
    display(viewer(selected_output))

tests/test_process.py::test_process_follower_widget
  /home/jovyan/apps/aiidalab-widgets-base/aiidalab_widgets_base/process.py:733: DeprecationWarning: Passing unrecognized arguments to super(ProcessMonitor).__init__(process=<WorkChainNode: uuid: dc758115-37cc-4b5b-bb49-74c8b2a63df0 (pk: 59) (aiida.workflows:core.arithmetic.multiply_add)>).
  object.__init__() takes exactly one argument (the instance to initialize)
  This is deprecated in traitlets 4.2.This error will be raised in a future release of traitlets.
    super().__init__(**kwargs)

tests/test_process.py::test_progress_bar_widget
tests/test_process.py::test_progress_bar_widget
  /opt/conda/lib/python3.9/site-packages/ipywidgets/widgets/widget.py:477: DeprecationWarning: Passing unrecognized arguments to super(IntProgress).__init__(step=1).
  object.__init__() takes exactly one argument (the instance to initialize)
  This is deprecated in traitlets 4.2.This error will be raised in a future release of traitlets.
    super(Widget, self).__init__(**kwargs)

tests/test_process.py::test_running_calcjob_output_widget
  /opt/conda/lib/python3.9/site-packages/ipywidgets/widgets/widget.py:477: DeprecationWarning: Passing unrecognized arguments to super(RunningCalcJobOutputWidget).__init__(calculation=<CalcJobNode: uuid: a0c09027-de64-4fb8-ad6d-194a1e0922c2 (pk: 104) (aiida.calculations:base)>).
  object.__init__() takes exactly one argument (the instance to initialize)
  This is deprecated in traitlets 4.2.This error will be raised in a future release of traitlets.
    super(Widget, self).__init__(**kwargs)

tests/test_structures.py::test_structure_manager_widget
tests/test_structures.py::test_structure_manager_widget
tests/test_viewers.py::test_structure_data_viwer
  /opt/conda/lib/python3.9/site-packages/ipywidgets/widgets/widget.py:477: DeprecationWarning: Passing unrecognized arguments to super(ToggleButtons).__init__(orientation='vertical').
  object.__init__() takes exactly one argument (the instance to initialize)
  This is deprecated in traitlets 4.2.This error will be raised in a future release of traitlets.
    super(Widget, self).__init__(**kwargs)

tests/test_structures.py::test_structure_manager_widget
tests/test_structures.py::test_structure_manager_widget
tests/test_viewers.py::test_structure_data_viwer
  /opt/conda/lib/python3.9/site-packages/ipywidgets/widgets/widget_button.py:70: DeprecationWarning: icons names no longer start with 'fa-', just use the class name itself (for example, 'check' instead of 'fa-check')
    warnings.warn("icons names no longer start with 'fa-', "

tests/test_structures.py::test_smiles_widget
  /home/jovyan/.local/lib/python3.9/site-packages/sklearn/utils/multiclass.py:14: DeprecationWarning: Please use `spmatrix` from the `scipy.sparse` namespace, the `scipy.sparse.base` namespace is deprecated.
    from scipy.sparse.base import spmatrix

tests/test_structures.py::test_smiles_widget
  /home/jovyan/.local/lib/python3.9/site-packages/sklearn/utils/optimize.py:18: DeprecationWarning: Please use `line_search_wolfe2` from the `scipy.optimize` namespace, the `scipy.optimize.linesearch` namespace is deprecated.
    from scipy.optimize.linesearch import line_search_wolfe2, line_search_wolfe1

tests/test_structures.py::test_smiles_widget
  /home/jovyan/.local/lib/python3.9/site-packages/sklearn/utils/optimize.py:18: DeprecationWarning: Please use `line_search_wolfe1` from the `scipy.optimize` namespace, the `scipy.optimize.linesearch` namespace is deprecated.
    from scipy.optimize.linesearch import line_search_wolfe2, line_search_wolfe1

tests/test_viewers.py::test_several_data_viewers
  /home/jovyan/apps/aiidalab-widgets-base/tests/test_viewers.py:11: UserWarning: Did not find an appropriate viewer for the <class 'aiida.orm.nodes.data.int.Int'> object. Returning the object itself.
    v = viewer(orm.Int(1))

tests/test_viewers.py::test_several_data_viewers
  /home/jovyan/.local/lib/python3.9/site-packages/bokeh/core/property/primitive.py:37: DeprecationWarning: `np.bool8` is a deprecated alias for `np.bool_`.  (Deprecated NumPy 1.24)
    bokeh_bool_types += (np.bool8,)

tests/test_viewers.py::test_several_data_viewers
  /opt/conda/lib/python3.9/site-packages/ipywidgets/widgets/widget.py:477: DeprecationWarning: Passing unrecognized arguments to super(BandsDataViewer).__init__(downloadable=True).
  object.__init__() takes exactly one argument (the instance to initialize)
  This is deprecated in traitlets 4.2.This error will be raised in a future release of traitlets.
    super(Widget, self).__init__(**kwargs)

tests/test_viewers.py::test_several_data_viewers
  /opt/conda/lib/python3.9/site-packages/ipywidgets/widgets/widget.py:477: DeprecationWarning: Passing unrecognized arguments to super(ProcessNodeViewerWidget).__init__(downloadable=True).
  object.__init__() takes exactly one argument (the instance to initialize)
  This is deprecated in traitlets 4.2.This error will be raised in a future release of traitlets.
    super(Widget, self).__init__(**kwargs)

tests/test_viewers.py::test_structure_data_viwer
  /opt/conda/lib/python3.9/site-packages/ipywidgets/widgets/widget.py:477: DeprecationWarning: Passing unrecognized arguments to super(StructureDataViewer).__init__(downloadable=True).
  object.__init__() takes exactly one argument (the instance to initialize)
  This is deprecated in traitlets 4.2.This error will be raised in a future release of traitlets.
    super(Widget, self).__init__(**kwargs)
@danielhollas danielhollas added the good first issue Good for newcomers label Jun 25, 2023
unkcpz added a commit to unkcpz/aiidalab-widgets-base that referenced this issue Nov 16, 2023
fixes aiidalab#490

In this commit, we pinging the aiida-pseudo version to use the
--download-only option to download the pseudo archive to the container
for quick installation when the container first time start.
Note that from the test all 8 pseudos seems to only save ~10s but in the place where the network condition is bad, this is very helpful.

Further more Refactoring the methods in setup_pseudos.py to support flexible parameter passing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant