Skip to content

Failing tests #45

Open
Open

Description

@sanjayankur31

We're seeing these tests fail on Fedora 31 (rawhide). Looks like something changed in sympy:

+ cd nineml-python-1.0.1
+ nosetests-3.7 --exclude test_flat_body
BUILDSTDERR: ..................E..........................E...................................................................................................................................................................................
BUILDSTDERR: ======================================================================
BUILDSTDERR: ERROR: test_trigger (unittests.abstraction_test.dynamics_test.OnCondition_test)
BUILDSTDERR: ----------------------------------------------------------------------
BUILDSTDERR: Traceback (most recent call last):
BUILDSTDERR:   File "/usr/lib/python3.7/site-packages/sympy/core/evalf.py", line 1308, in evalf
BUILDSTDERR:     rf = evalf_table[x.func]
BUILDSTDERR: KeyError: <class 'sympy.core.relational.StrictGreaterThan'>
BUILDSTDERR: During handling of the above exception, another exception occurred:
BUILDSTDERR: Traceback (most recent call last):
BUILDSTDERR:   File "/builddir/build/BUILD/nineml-python-1.0.1/nineml/abstraction/expressions/base.py", line 199, in nineml_expression
BUILDSTDERR:     val = self.rhs.evalf(subs=kwargs)
BUILDSTDERR:   File "/usr/lib/python3.7/site-packages/sympy/core/evalf.py", line 1442, in evalf
BUILDSTDERR:     result = evalf(self, prec + 4, options)
BUILDSTDERR:   File "/usr/lib/python3.7/site-packages/sympy/core/evalf.py", line 1314, in evalf
BUILDSTDERR:     xe = x._eval_evalf(prec)
BUILDSTDERR: AttributeError: 'BooleanTrue' object has no attribute '_eval_evalf'
BUILDSTDERR: During handling of the above exception, another exception occurred:
BUILDSTDERR: Traceback (most recent call last):
BUILDSTDERR:   File "/builddir/build/BUILD/nineml-python-1.0.1/test/unittests/abstraction_test/dynamics_test.py", line 713, in test_trigger
BUILDSTDERR:     self.assertEquals(return_values[i], python_func(**param_dict))
BUILDSTDERR:   File "/builddir/build/BUILD/nineml-python-1.0.1/nineml/abstraction/expressions/base.py", line 206, in nineml_expression
BUILDSTDERR:     "', '".join(self.rhs_symbol_names)))
BUILDSTDERR: nineml.exceptions.NineMLUsageError: Incorrect arguments provided to expression 'A > -B/tau_r': 'A', 'B', 'tau_r' (expected 'B', 'tau_r', 'A')
BUILDSTDERR: ======================================================================
BUILDSTDERR: ERROR: test_Valid (unittests.abstraction_test.expressions_test.Expression_test)
BUILDSTDERR: ----------------------------------------------------------------------
BUILDSTDERR: Traceback (most recent call last):
BUILDSTDERR:   File "/usr/lib/python3.7/site-packages/sympy/core/evalf.py", line 1309, in evalf
BUILDSTDERR:     r = rf(x, prec, options)
BUILDSTDERR:   File "/usr/lib/python3.7/site-packages/sympy/core/evalf.py", line 1227, in evalf_symbol
BUILDSTDERR:     val = options['subs'][x]
BUILDSTDERR: KeyError: w
BUILDSTDERR: During handling of the above exception, another exception occurred:
BUILDSTDERR: Traceback (most recent call last):
BUILDSTDERR:   File "/builddir/build/BUILD/nineml-python-1.0.1/nineml/abstraction/expressions/base.py", line 199, in nineml_expression
BUILDSTDERR:     val = self.rhs.evalf(subs=kwargs)
BUILDSTDERR:   File "/usr/lib/python3.7/site-packages/sympy/core/evalf.py", line 1442, in evalf
BUILDSTDERR:     result = evalf(self, prec + 4, options)
BUILDSTDERR:   File "/usr/lib/python3.7/site-packages/sympy/core/evalf.py", line 1309, in evalf
BUILDSTDERR:     r = rf(x, prec, options)
BUILDSTDERR:   File "/usr/lib/python3.7/site-packages/sympy/core/evalf.py", line 785, in evalf_trig
BUILDSTDERR:     re, im, re_acc, im_acc = evalf(arg, xprec, options)
BUILDSTDERR:   File "/usr/lib/python3.7/site-packages/sympy/core/evalf.py", line 1314, in evalf
BUILDSTDERR:     xe = x._eval_evalf(prec)
BUILDSTDERR: AttributeError: 'ImmutableDenseNDimArray' object has no attribute '_eval_evalf'
BUILDSTDERR: During handling of the above exception, another exception occurred:
BUILDSTDERR: Traceback (most recent call last):
BUILDSTDERR:   File "/builddir/build/BUILD/nineml-python-1.0.1/test/unittests/abstraction_test/expressions_test.py", line 85, in test_Valid
BUILDSTDERR:     v = return_values[i] - python_func(**param_dict)
BUILDSTDERR:   File "/builddir/build/BUILD/nineml-python-1.0.1/nineml/abstraction/expressions/base.py", line 206, in nineml_expression
BUILDSTDERR:     "', '".join(self.rhs_symbol_names)))
BUILDSTDERR: nineml.exceptions.NineMLUsageError: Incorrect arguments provided to expression 'sin(w)': 'w' (expected 'w')
BUILDSTDERR: ----------------------------------------------------------------------
BUILDSTDERR: Ran 225 tests in 156.559s
BUILDSTDERR: FAILED (errors=2)

Versions used in this build:

DEBUG util.py:587:    hdf5-devel-1.10.5-2.fc31.ppc64le                                              
DEBUG util.py:587:    python3-devel-3.7.4-3.fc31.ppc64le                                            
DEBUG util.py:587:    python3-h5py-2.9.0-4.fc31.ppc64le                                             
DEBUG util.py:587:    python3-lxml-4.2.5-2.fc30.ppc64le                                             
DEBUG util.py:587:    python3-nose-1.3.7-23.fc31.noarch                                             
DEBUG util.py:587:    python3-numpy-1:1.16.4-2.fc31.ppc64le                                         
DEBUG util.py:587:    python3-numpydoc-0.9.1-1.fc31.noarch                                          
DEBUG util.py:587:    python3-pyyaml-5.1.1-2.fc31.ppc64le                                           
DEBUG util.py:587:    python3-sphinx-1:2.1.2-1.fc31.noarch                                          
DEBUG util.py:587:    python3-sphinx_rtd_theme-0.4.3-2.fc31.noarch                                  
DEBUG util.py:587:    python3-sympy-1.4-1.fc31.noarch                                                       

Activity

  1. NineML-Committee commented on Aug 2, 2019

    @NineML-Committee
  2. sanjayankur31 commented on Aug 12, 2019

    @sanjayankur31
    ContributorAuthor

    Hi Tom,

    Have you had a chance to look at this? If there's anything I can do to help debug the issue, please let me know.

    Cheers!
    Ankur

  3. tclose commented on Aug 13, 2019

    @tclose
    Contributor
  4. sanjayankur31 commented on Aug 13, 2019

    @sanjayankur31
    ContributorAuthor

    I don't seem to have free cycles this week, but I'll try next week if I can.

  5. eclipseo commented on Aug 24, 2019

    @eclipseo

    Even if we "fix" the expression, the error keeps changing:

    nineml.exceptions.NineMLUsageError: Incorrect arguments provided to expression 'A > -B/tau_r': 'tau_r', 'B', 'A' (expected 'B', 'tau_r', 'A')
    nineml.exceptions.NineMLUsageError: Incorrect arguments provided to expression 'A > -B/tau_r': 'B', 'tau_r', 'A' (expected 'tau_r', 'A', 'B')
    nineml.exceptions.NineMLUsageError: Incorrect arguments provided to expression 'A > -B/tau_r': 'tau_r', 'A', 'B' (expected 'B', 'tau_r', 'A')
    
  6. sanjayankur31 commented on Sep 10, 2019

    @sanjayankur31
    ContributorAuthor

    So, this is a sympy related change. if one uses a virtual environment with sympy 1.3, the test passes. So, looking at what changed in 1.4 now: https://github.com/sympy/sympy/wiki/Release-Notes-for-1.4

  7. sanjayankur31 commented on Sep 19, 2019

    @sanjayankur31
    ContributorAuthor

    I expect they will be quite isolated issues (i.e. contained to the Expressions class that is raising the exception), so it might be something that you could find an easy fix for. Cheers, Tom

    Unfortunately, I've not had the time to really fix the issue either. Would you take a look please @tclose ---it should hopefully be something straightforward for someone that knows the codebase well.

  8. tclose commented on Sep 19, 2019

    @tclose
    Contributor
  9. sanjayankur31 commented on Feb 18, 2020

    @sanjayankur31
    ContributorAuthor

    Hi @tclose : any chance of a look at this sometime? We're nearing the Fedora 32 release so we'll have to drop NineML there if we can't get it fixed and building soonish.

  10. tclose commented on Feb 18, 2020

    @tclose
    Contributor
  11. DhanashreePetare commented on Dec 26, 2025

    @DhanashreePetare

    Can this be assigned to me if its available.

  12. SAMREEN111-hash commented on Jan 19, 2026

    @SAMREEN111-hash

    Hi! I'm interested in working on this issue.

    @DhanashreePetare, I see you asked 3 weeks ago. Are you still
    planning to work on this? If so, I'll find another issue.
    If not, I'd be happy to take it on.

    @tclose or other maintainers - could you confirm if this issue
    is still relevant and available?

    Thanks!

  13. DhanashreePetare commented on Jan 21, 2026

    @DhanashreePetare

    I wasn't assigned the work @SAMREEN111-hash ..so I haven't worked. I guess you can continue.

  14. sanchalitorpe13 commented on Jan 26, 2026

    @sanchalitorpe13

    Hi all,
    It looks like the failing tests are mostly caused by changes in sympy 1.4, which affect how expressions are evaluated in NineML. One way to address this could be:

    • Pin sympy==1.3 in the CI/test environment temporarily to keep the tests passing.
    • Update the Expressions class to handle the new evalf behavior in sympy 1.4+ so it works with newer versions. This might involve checking argument ordering and supporting new object types like BooleanTrue.

    If needed, I can help investigate and submit a PR that updates the code to be compatible with sympy 1.4+ while keeping the tests passing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions