Closed eagmon closed 1 year ago
I found an alternate solution to fix the numpy bug; turns out multi-dimensional indexing still works if its done using a tuple. We don't need the slices to be mutable, so a cast to tuple worked just fine for our purposes. Closes #123
nice find @CodeByDrescher! Looks like the NumPy bug is fixed. There are still 4 tests failing, but maybe those should be addressed in a separate PR?
@jcschaff -- there are 4 failing tests left. Maybe we divide and conquer? We could also do that in a separate PR if we just want to get the NumPy bug fixed now to unblock progress in the test suite.
Base: 96.62% // Head: 96.64% // Increases project coverage by +0.02%
:tada:
Coverage data is based on head (
99db91d
) compared to base (9355bad
). Patch coverage: 100.00% of modified lines in pull request are covered.
:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
Kudos, SonarCloud Quality Gate passed!
0 Bugs
0 Vulnerabilities
0 Security Hotspots
1 Code Smell
No Coverage information
0.0% Duplication
This PR was previously opened with a different branch in PR #121. This PR fixes a long-standing NumPy error in which a slice object can no longer be used as an index, described in issue #123. Instead, I am pulling the ranges out of the slice object and using them directly.
I also fixed some listing errors and matplotlib deprecation errors, but left 4 tests still failing, down from 13 failing before this PR:
FAILED tests/model_lang/bngl/test_bngl_utils.py::BgnlUtilsTestCase::test_get_parameters_variables_for_simulation_with_empty_sample_times - AssertionError: “failed to parse action” does not match “Model file /home/runner/work/Biosimulators_utils/Biosimulators_utils/tests/model_lang/bngl/../../fixtures/bngl/empty-sample-times.bngl is not a valid BNGL or BNGL XML file. FAILED tests/sedml/test_sedml_validation.py::ValidationTestCase::test_validate_calculation - AssertionError: ‘The syntax’ not found in ‘- The mathematical expression a * is invalid.\n - unexpected EOF while parsing (, line 1)’ FAILED tests/combine/test_combine_exec.py::ExecCombineTestCase::test_1 - AssertionError: None != {‘sim.sedml’: {‘report1’: ‘ABC’, ‘report2’: ‘DEF’}} FAILED tests/combine/test_combine_exec.py::ExecCombineTestCase::test_2 - AssertionError: Lists differ: [‘log.yml’] != [‘dir1’, ‘log.yml’, ‘plots.zip’, ‘reports.zip’]