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

Tests fail with version 0.7.3 with installed extras #111

Open
yurivict opened this issue Sep 21, 2018 · 7 comments
Open

Tests fail with version 0.7.3 with installed extras #111

yurivict opened this issue Sep 21, 2018 · 7 comments

Comments

@yurivict
Copy link

Thanks for fixing some other failures yesterday. Today I installed extras, and some tests fail again:

================================================================================= FAILURES ==================================================================================
____________________________________________________________ test_get_native__a_substance_no_composition[solve0] ____________________________________________________________

solve = ()

    @pytest.mark.veryslow
    @requires('pygslodeiv2', 'pyodesys')
    @pytest.mark.parametrize('solve', [(), ('H2O',)])
    def test_get_native__a_substance_no_composition(solve):
        rsys = ReactionSystem.from_string('\n'.join(['H2O -> H2O+ + e-(aq); 1e-8', 'e-(aq) + H2O+ -> H2O; 1e10']))
        odesys, extra = get_odesys(rsys)
        c0 = {'H2O': 0, 'H2O+': 2e-9, 'e-(aq)': 3e-9}
        if len(solve) > 0:
            from pyodesys.symbolic import PartiallySolvedSystem
            odesys = PartiallySolvedSystem(odesys, extra['linear_dependencies'](solve))
>       odesys = get_native(rsys, odesys, 'gsl')

/usr/local/lib/python2.7/site-packages/chempy/kinetics/tests/test__native.py:99: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

rsys = <chempy.reactionsystem.ReactionSystem object at 0x812b501d0>, odesys = <pyodesys.symbolic.SymbolicSys object at 0x8162bda90>, integrator = 'gsl', skip_keys = (0,)
steady_state_root = False, conc_roots = None

    def get_native(rsys, odesys, integrator, skip_keys=(0,), steady_state_root=False, conc_roots=None):
        comp_keys = Substance.composition_keys(rsys.substances.values(), skip_keys=skip_keys)
        if PartiallySolvedSystem is None:
>           raise ValueError("Failed to import 'native_sys' from 'pyodesys.native'")
E           ValueError: Failed to import 'native_sys' from 'pyodesys.native'

/usr/local/lib/python2.7/site-packages/chempy/kinetics/_native.py:113: ValueError
____________________________________________________________ test_get_native__a_substance_no_composition[solve1] ____________________________________________________________

solve = ('H2O',)

    @pytest.mark.veryslow
    @requires('pygslodeiv2', 'pyodesys')
    @pytest.mark.parametrize('solve', [(), ('H2O',)])
    def test_get_native__a_substance_no_composition(solve):
        rsys = ReactionSystem.from_string('\n'.join(['H2O -> H2O+ + e-(aq); 1e-8', 'e-(aq) + H2O+ -> H2O; 1e10']))
        odesys, extra = get_odesys(rsys)
        c0 = {'H2O': 0, 'H2O+': 2e-9, 'e-(aq)': 3e-9}
        if len(solve) > 0:
            from pyodesys.symbolic import PartiallySolvedSystem
            odesys = PartiallySolvedSystem(odesys, extra['linear_dependencies'](solve))
>       odesys = get_native(rsys, odesys, 'gsl')

/usr/local/lib/python2.7/site-packages/chempy/kinetics/tests/test__native.py:99: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

rsys = <chempy.reactionsystem.ReactionSystem object at 0x816468610>, odesys = <pyodesys.symbolic.PartiallySolvedSystem object at 0x8130a33d0>, integrator = 'gsl'
skip_keys = (0,), steady_state_root = False, conc_roots = None

    def get_native(rsys, odesys, integrator, skip_keys=(0,), steady_state_root=False, conc_roots=None):
        comp_keys = Substance.composition_keys(rsys.substances.values(), skip_keys=skip_keys)
        if PartiallySolvedSystem is None:
>           raise ValueError("Failed to import 'native_sys' from 'pyodesys.native'")
E           ValueError: Failed to import 'native_sys' from 'pyodesys.native'

/usr/local/lib/python2.7/site-packages/chempy/kinetics/_native.py:113: ValueError
========================================================================== short test summary info ==========================================================================
SKIP [1] ../../../../../local/lib/python2.7/site-packages/chempy/kinetics/tests/test_ode.py:808: Unfulfilled requirements. Missing modules: pycvodes.
SKIP [3] ../../../../../local/lib/python2.7/site-packages/chempy/kinetics/tests/test__native.py:181: Unfulfilled requirements. Missing modules: pycvodes.
SKIP [1] ../../../../../local/lib/python2.7/site-packages/chempy/kinetics/tests/test_ode.py:915: Unfulfilled requirements. Missing modules: pycvodes.
SKIP [2] ../../../../../local/lib/python2.7/site-packages/chempy/kinetics/tests/test__native.py:49: Unfulfilled requirements. Missing modules: pycvodes.
SKIP [2] ../../../../../local/lib/python2.7/site-packages/chempy/kinetics/tests/test__native.py:108: Unfulfilled requirements. Missing modules: pycvodes.
SKIP [1] ../../../../../local/lib/python2.7/site-packages/chempy/util/tests/test_graph.py:30: graphviz not installed? (dot command missing)
SKIP [1] ../../../../../local/lib/python2.7/site-packages/chempy/kinetics/tests/test_ode.py:569: Unfulfilled requirements. Missing modules: pycvodes.
SKIP [1] ../../../../../local/lib/python2.7/site-packages/chempy/util/tests/test_table.py:58: latex not installed? (pdflatex command missing)
SKIP [1] ../../../../../local/lib/python2.7/site-packages/chempy/kinetics/tests/test_ode.py:710: Unfulfilled requirements. Missing modules: pycvodes.
SKIP [1] ../../../../../local/lib/python2.7/site-packages/chempy/kinetics/tests/test_ode.py:539: Unfulfilled requirements. Missing modules: pycvodes.
SKIP [1] ../../../../../local/lib/python2.7/site-packages/chempy/util/tests/test_graph.py:48: graphviz not installed? (dot command missing)
SKIP [1] ../../../../../local/lib/python2.7/site-packages/chempy/kinetics/tests/test_ode.py:858: Unfulfilled requirements. Missing modules: pycvodes.
SKIP [1] ../../../../../local/lib/python2.7/site-packages/chempy/kinetics/tests/test_ode.py:497: Unfulfilled requirements. Missing modules: pycvodes.
SKIP [1] ../../../../../local/lib/python2.7/site-packages/chempy/kinetics/tests/test_ode.py:675: Unfulfilled requirements. Missing modules: pycvodes.
SKIP [1] ../../../../../local/lib/python2.7/site-packages/chempy/kinetics/tests/test_ode.py:510: Unfulfilled requirements. Missing modules: pycvodes.
SKIP [1] ../../../../../local/lib/python2.7/site-packages/chempy/kinetics/tests/test_ode.py:757: Unfulfilled requirements. Missing modules: pycvodes.
SKIP [1] ../../../../../local/lib/python2.7/site-packages/chempy/kinetics/tests/test__native.py:156: Unfulfilled requirements. Missing modules: pycvodes.
SKIP [1] ../../../../../local/lib/python2.7/site-packages/chempy/kinetics/tests/test_ode.py:949: Unfulfilled requirements. Missing modules: pycvodes.
SKIP [4] ../../../../../local/lib/python2.7/site-packages/chempy/kinetics/tests/test_ode.py:475: Unfulfilled requirements. Missing modules: pycvodes.
SKIP [2] ../../../../../local/lib/python2.7/site-packages/chempy/util/tests/test_table.py:46: latex not installed? (pdflatex command missing)
============================================================================= warnings summary ==============================================================================
chempy/kinetics/tests/test_ode.py::test_get_ode__Radiolytic__units__multi
  /usr/local/lib/python2.7/site-packages/pyodesys/core.py:519: UserWarning: 'adaptive' mode with SciPy's integrator (vode/lsoda) may overshoot (itask=2)
    warnings.warn("'adaptive' mode with SciPy's integrator (vode/lsoda) may overshoot (itask=2)")
  /usr/local/lib/python2.7/site-packages/pyodesys/core.py:520: UserWarning: 'adaptive' mode with SciPy's integrator is unreliable, consider using e.g. cvode
    warnings.warn("'adaptive' mode with SciPy's integrator is unreliable, consider using e.g. cvode")

chempy/kinetics/tests/test_rates.py::test_RateExpr__subclass_from_callback
  /usr/local/lib/python2.7/site-packages/chempy/kinetics/tests/test_rates.py:52: ChemPyDeprecationWarning: subclass_from_callback is deprecated. Use from_callback instead.
    lambda v, a, backend: a[0]*v['H2']*v['Br2']**(3/2) / (v['Br2'] + a[1]*v['HBr'])

chempy/kinetics/tests/test_rates.py::test_MassAction__subclass_from_callback
  /usr/local/lib/python2.7/site-packages/chempy/kinetics/tests/test_rates.py:100: ChemPyDeprecationWarning: subclass_from_callback is deprecated. Use MassAction.from_callback instead.
    rate_coeff, cls_attrs=dict(parameter_keys=('temperature',), nargs=2))
  /usr/local/lib/python2.7/site-packages/chempy/kinetics/rates.py:180: ChemPyDeprecationWarning: subclass_from_callback is deprecated. Use from_callback instead.
    _RateExpr = super(MassAction, cls).subclass_from_callback(cb, cls_attrs=cls_attrs)

chempy/tests/test__equilibrium.py::test_solve_equilibrium_1
  /usr/local/lib/python2.7/site-packages/chempy/chemistry.py:859: RuntimeWarning: divide by zero encountered in double_scalars
    tot *= conc**nr

chempy/tests/test_henry.py::test_Henry__with_units
  /usr/local/lib/python2.7/site-packages/chempy/tests/test_henry.py:23: ChemPyDeprecationWarning: get_kH_at_T is deprecated since (not including) 0.3.1, it will be missing in 0.5.0. Use __call__ instead.
    assert allclose(kH_H2.get_kH_at_T(

chempy/tests/test_reactionsystem.py::test_ReactionSystem__html_tables
  /usr/local/lib/python2.7/site-packages/chempy/tests/test_reactionsystem.py:101: ChemPyDeprecationWarning: unimolecular_html_table is deprecated since (not including) 0.5.7, it will be missing in 0.8.0. Use chempy.printing.tables.UnimolecularTable instead.
    ut, unc = rs.unimolecular_html_table()
  /usr/local/lib/python2.7/site-packages/chempy/tests/test_reactionsystem.py:106: ChemPyDeprecationWarning: bimolecular_html_table is deprecated since (not including) 0.5.7, it will be missing in 0.8.0. Use chempy.printing.tables.BimolecularTable instead.
    bt, bnc = rs.bimolecular_html_table()

chempy/util/tests/test_expr.py::test_mk_Poly
  /usr/local/lib/python2.7/site-packages/chempy/util/tests/test_expr.py:165: ChemPyDeprecationWarning: _mk_Poly is deprecated. Use create_Poly instead.
    Poly = mk_Poly('T', reciprocal=True)

chempy/util/tests/test_expr.py::test_PiecewisePoly
  /usr/local/lib/python2.7/site-packages/chempy/util/tests/test_expr.py:208: ChemPyDeprecationWarning: _mk_PiecewisePoly is deprecated. Use create_Piecewise instead.
    TPiecewisePoly = mk_PiecewisePoly('temperature')

chempy/util/tests/test_parsing.py::test_formula_to_composition
  /usr/local/lib/python2.7/site-packages/chempy/util/tests/test_parsing.py:16: ChemPyDeprecationWarning: / depr. (before 0.5.0): use 'Fe+3' over 'Fe/3+'
    assert formula_to_composition('Fe/3+') == {0: 3, 26: 1}
  /usr/local/lib/python2.7/site-packages/chempy/util/tests/test_parsing.py:16: ChemPyDeprecationWarning: 'Fe/3+' deprecated, use e.g. 'Fe+3'
    assert formula_to_composition('Fe/3+') == {0: 3, 26: 1}

chempy/util/tests/test_parsing.py::test_formula_to_latex
  /usr/local/lib/python2.7/site-packages/chempy/util/parsing.py:435: ChemPyDeprecationWarning: / depr. (before 0.5.0): use 'Fe+3' over 'Fe/3+'
    formula, prefixes, infixes, **kwargs)
  /usr/local/lib/python2.7/site-packages/chempy/util/parsing.py:435: ChemPyDeprecationWarning: 'Fe/3+' deprecated, use e.g. 'Fe+3'
    formula, prefixes, infixes, **kwargs)

chempy/util/tests/test_periodic.py::test_mass_from_composition__formula
  /usr/local/lib/python2.7/site-packages/chempy/util/tests/test_periodic.py:44: ChemPyDeprecationWarning: / depr. (before 0.5.0): use 'Fe+3' over 'Fe/3+'
    Fminus = mass_from_composition(formula_to_composition('F/-'))

-- Docs: http://doc.pytest.org/en/latest/warnings.html
====================================================== 2 failed, 274 passed, 28 skipped, 16 warnings in 11.71 seconds =======================================================
*** Error code 1
@bjodah
Copy link
Owner

bjodah commented Sep 21, 2018

Is pygslodeiv2 properly installed? (i.e. are tests passing for pytest --pyargs pygslodeiv2?)
Edit: and are tests passing for pytest --pyargs pyodesys?

@yurivict
Copy link
Author

The example from their page works, but tests (pytest) fail in a similar way.
I will report this to them,

@yurivict
Copy link
Author

Tests still fail in 0.7.4.

@bjodah
Copy link
Owner

bjodah commented Oct 19, 2018

still because of this?:
bjodah/pygslodeiv2#36

that one looked like a packaging issue to me (see last comment)

@yurivict
Copy link
Author

The package pygslodeiv2 is installed and can be imported, yet the tests fail.
I can't tell what is the problem.

This statement

from pygslodeiv2 import (
    integrate_adaptive, integrate_predefined, requires_jac
)

succeeds when run by itself.

@bjodah
Copy link
Owner

bjodah commented Oct 19, 2018

does python -m pytest --pyargs pygslodeiv2 pass in that environment?

@yurivict
Copy link
Author

does python -m pytest --pyargs pygslodeiv2 pass in that environment?

No, it fails the same way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants