Skip to content

Reduce the number of warnings in tests

../../python-venv/lib/python3.10/site-packages/fireworks/core/rocket.py:6
  python-venv/lib/python3.10/site-packages/fireworks/core/rocket.py:6: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
    import distutils.dir_util

tests/test_amml.py: 143 warnings
tests/test_chemistry.py: 11 warnings
tests/test_datastructures.py: 184 warnings
tests/test_io.py: 15 warnings
tests/test_resources.py: 24 warnings
tests/test_session.py: 49 warnings
tests/test_units.py: 8 warnings
  python-venv/lib/python3.10/site-packages/pandas/core/dtypes/cast.py:1598: UnitStrippedWarning: The unit of the quantity is stripped when downcasting to ndarray.
    result[:] = values

tests/test_amml.py: 38 warnings
  python-venv/lib/python3.10/site-packages/ase/atoms.py:440: UnitStrippedWarning: The unit of the quantity is stripped when downcasting to ndarray.
    self._pbc[:] = pbc

tests/test_amml.py: 12 warnings
tests/test_builtins.py: 83 warnings
tests/test_chemistry.py: 2 warnings
tests/test_cli.py: 2 warnings
tests/test_datastructures.py: 133 warnings
tests/test_functions.py: 59 warnings
tests/test_imports.py: 17 warnings
tests/test_io.py: 68 warnings
tests/test_resources.py: 32 warnings
tests/test_session.py: 187 warnings
tests/test_units.py: 28 warnings
  python-venv/lib/python3.10/site-packages/fireworks/utilities/fw_serializers.py:256: PendingDeprecationWarning: 
  safe_load will be removed, use
  
    yaml=YAML(typ='safe', pure=True)
    yaml.load(...)
  
  instead
    dct = yaml.safe_load(f_str)

tests/test_amml.py: 12 warnings
tests/test_builtins.py: 83 warnings
tests/test_chemistry.py: 2 warnings
tests/test_cli.py: 2 warnings
tests/test_datastructures.py: 133 warnings
tests/test_functions.py: 59 warnings
tests/test_imports.py: 17 warnings
tests/test_io.py: 68 warnings
tests/test_resources.py: 32 warnings
tests/test_session.py: 187 warnings
tests/test_units.py: 28 warnings
  python-venv/lib/python3.10/site-packages/ruamel/yaml/main.py:1111: PendingDeprecationWarning: 
  load will be removed, use
  
    yaml=YAML(typ='unsafe', pure=True)
    yaml.load(...)
  
  instead
    return load(stream, SafeLoader, version)

tests/test_builtins.py::test_invalid_reference_to_vary_statement[INSTANT]
tests/test_builtins.py::test_invalid_reference_to_vary_statement[DEFERRED]
tests/test_builtins.py::test_invalid_reference_to_vary_statement[WORKFLOW]
  python-venv/lib/python3.10/site-packages/virtmat/language/constraints/processors.py:24: UserWarning: vary statement has no effect
    warnings.warn('vary statement has no effect', UserWarning)

tests/test_chemistry.py::test_chemistry_chem_reaction[INSTANT]
tests/test_chemistry.py::test_chemistry_chem_reaction[INSTANT]
tests/test_chemistry.py::test_chemistry_chem_reaction[INSTANT]
tests/test_chemistry.py::test_chemistry_chem_reaction[DEFERRED]
tests/test_chemistry.py::test_chemistry_chem_reaction[DEFERRED]
tests/test_chemistry.py::test_chemistry_chem_reaction[DEFERRED]
tests/test_chemistry.py::test_chemistry_chem_reaction[WORKFLOW]
tests/test_chemistry.py::test_chemistry_chem_reaction[WORKFLOW]
tests/test_chemistry.py::test_chemistry_chem_reaction[WORKFLOW]
  python-venv/lib/python3.10/site-packages/virtmat/language/utilities/chemistry.py:47: FutureWarning: ChainedAssignmentError: behaviour will change in pandas 3.0!
  You are setting values through chained assignment. Currently this works in certain cases, but when using Copy-on-Write (which will become the default behaviour in pandas 3.0) this will never work to update the original DataFrame or Series, because the intermediate object on which we are setting values will behave as a copy.
  A typical example is when you are setting values in a column of a DataFrame, like:
  
  df["col"][row_indexer] = value
  
  Use `df.loc[row_indexer, "col"] = values` instead, to perform the assignment in a single step and ensure this keeps updating the original `df`.
  
  See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  
    self.props[prop][0] += term['coefficient']*propval[prop][0]

tests/test_cli.py: 3 warnings
tests/test_resources.py: 4 warnings
tests/test_session.py: 3 warnings
  python-venv/lib/python3.10/site-packages/fireworks/utilities/fw_serializers.py:237: PendingDeprecationWarning: 
  safe_dump will be removed, use
  
    yaml=YAML(typ='safe', pure=True)
    yaml.dump(...)
  
  instead
    return yaml.safe_dump(self.to_dict(), default_flow_style=YAML_STYLE, allow_unicode=True)

tests/test_cli.py: 3 warnings
tests/test_resources.py: 4 warnings
tests/test_session.py: 3 warnings
  python-venv/lib/python3.10/site-packages/ruamel/yaml/main.py:1390: PendingDeprecationWarning: 
  dump_all will be removed, use
  
    yaml=YAML(typ='unsafe', pure=True)
    yaml.dump_all(...)
  
  instead
    return dump_all([data], stream, Dumper=SafeDumper, **kwds)

tests/test_resources.py::test_number_of_chunks[WORKFLOW]
tests/test_resources.py::test_parallel_map[WORKFLOW]
tests/test_resources.py::test_parallel_filter[WORKFLOW]
tests/test_resources.py::test_parallel_reduce[WORKFLOW]
tests/test_resources.py::test_parallelization_error_large_nchunks[WORKFLOW]
  python-venv/lib/python3.10/site-packages/numpy/core/fromnumeric.py:59: FutureWarning: 'FWSeries.swapaxes' is deprecated and will be removed in a future version. Please use 'FWSeries.transpose' instead.
    return bound(*args, **kwds)

tests/test_resources.py::test_number_of_chunks[WORKFLOW]
tests/test_resources.py::test_parallel_map[WORKFLOW]
tests/test_resources.py::test_parallel_filter[WORKFLOW]
tests/test_resources.py::test_parallel_reduce[WORKFLOW]
tests/test_resources.py::test_parallelization_error_large_nchunks[WORKFLOW]
  python-venv/lib/python3.10/site-packages/numpy/core/fromnumeric.py:59: FutureWarning: 'Series.swapaxes' is deprecated and will be removed in a future version. Please use 'Series.transpose' instead.
    return bound(*args, **kwds)

tests/test_session.py::test_vary_from_non_varied_new_vars_two_ssesions
tests/test_session.py::test_vary_from_varied_new_vars_two_sessions
tests/test_session.py::test_extend_varied_model_in_new_session
  python-venv/lib/python3.10/site-packages/virtmat/language/interpreter/session_manager.py:71: UserWarning: provided grammar ignored in favor of grammar from provided uuid
    warnings.warn(msg, UserWarning)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
Edited by Ivan Kondov