Skip to content

Fix test/petab/test_amici_predictor.py failures#1672

Merged
dweindl merged 1 commit intoICB-DCM:developfrom
dweindl:fix_test/petab/test_amici_predictor.py
Jan 19, 2026
Merged

Fix test/petab/test_amici_predictor.py failures#1672
dweindl merged 1 commit intoICB-DCM:developfrom
dweindl:fix_test/petab/test_amici_predictor.py

Conversation

@dweindl
Copy link
Member

@dweindl dweindl commented Jan 19, 2026

Fixes recent test failures probably related to the recent swig-4.4.1:

>           testmodel.setFixedParameters(amici.DoubleVector(fp))

test/petab/test_amici_predictor.py:131:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <amici.amici.ModelPtr; proxy of <Swig Object of type 'std::unique_ptr< amici::Model > *' at 0x7f719c1d4970> >
k = <Swig Object of type 'std::vector< double > *' at 0x7f719e83ad30; array([2., 0.]) >

    def setFixedParameters(self, k: Sequence[float]):
        """
        Set values for constants.
        :param k: Vector of fixed parameters
        """
>       return _amici.ModelPtr_setFixedParameters(self, k)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E       TypeError: in method 'ModelPtr_setFixedParameters', argument 2 of type 'std::vector< amici::realtype,std::allocator< amici::realtype > > const &'

Fixes recent test failures probably related to the recent swig-4.4.1:

```
>           testmodel.setFixedParameters(amici.DoubleVector(fp))

test/petab/test_amici_predictor.py:131:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <amici.amici.ModelPtr; proxy of <Swig Object of type 'std::unique_ptr< amici::Model > *' at 0x7f719c1d4970> >
k = <Swig Object of type 'std::vector< double > *' at 0x7f719e83ad30; array([2., 0.]) >

    def setFixedParameters(self, k: Sequence[float]):
        """
        Set values for constants.
        :param k: Vector of fixed parameters
        """
>       return _amici.ModelPtr_setFixedParameters(self, k)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E       TypeError: in method 'ModelPtr_setFixedParameters', argument 2 of type 'std::vector< amici::realtype,std::allocator< amici::realtype > > const &'
```
@dweindl dweindl requested a review from FFroehlich as a code owner January 19, 2026 21:01
@dweindl dweindl self-assigned this Jan 19, 2026
@dweindl dweindl changed the base branch from main to develop January 19, 2026 21:01
@codecov-commenter
Copy link

codecov-commenter commented Jan 19, 2026

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.34%. Comparing base (c5acea7) to head (c67de39).
⚠️ Report is 1 commits behind head on develop.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1672      +/-   ##
===========================================
- Coverage    84.36%   84.34%   -0.03%     
===========================================
  Files          164      164              
  Lines        14320    14320              
===========================================
- Hits         12081    12078       -3     
- Misses        2239     2242       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dweindl dweindl merged commit b1bf44c into ICB-DCM:develop Jan 19, 2026
18 checks passed
@dweindl dweindl deleted the fix_test/petab/test_amici_predictor.py branch January 19, 2026 21:30
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

Successfully merging this pull request may close these issues.

2 participants