bart icon indicating copy to clipboard operation
bart copied to clipboard

Python 3 compat

Open douglas-raillard-arm opened this issue 7 years ago • 5 comments

Add Python 3 support using the past package, and its 2to3-based futurize script: https://pypi.org/project/past/

TODO: update the required version of TRAPpy once its Python 3 PR is merged

TypeError in TRAPpy are fixed by its Python 3 PR and will go away once merged

douglas-raillard-arm avatar Sep 07 '18 10:09 douglas-raillard-arm

That PR has been used for a few months now successfully using lisa-next (https://github.com/ARM-software/lisa/tree/next). As we seem to be the main user, I'll merge that PR in a week unless somebody screams :-)

douglas-raillard-arm avatar Feb 01 '19 15:02 douglas-raillard-arm

Please go ahead :-)

On Fri, Feb 1, 2019, 4:55 PM Douglas Raillard <[email protected] wrote:

That PR has been used for a few months now successfully using lisa-next ( https://github.com/ARM-software/lisa/tree/next). As we seem to be the main user, I'll merge that PR in a week unless somebody screams :-)

— You are receiving this because your review was requested. Reply to this email directly, view it on GitHub https://github.com/ARM-software/bart/pull/66#issuecomment-459769575, or mute the thread https://github.com/notifications/unsubscribe-auth/ACDZbDMmEZG-U8ulZ2Yj3azwdIwB7Urqks5vJGNxgaJpZM4WenSi .

sinkap avatar Feb 01 '19 17:02 sinkap

Does this have build errors still?

sinkap avatar Feb 01 '19 17:02 sinkap

Let's update setup.py to see ... EDIT: trappy version on PyPI is still stuck at 5.9 (2016), so there is no way I can mandate the right version in bart's setup.py until a new version is officially released.

douglas-raillard-arm avatar Feb 01 '19 18:02 douglas-raillard-arm

Looks like the tests are passing, with an intermittent failure:

======================================================================
ERROR: Test that the result of getSignal covers the requested range
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/dourai01/Data/Git/lisa/py3k/external/bart/tests/test_pelt_sim.py", line 91, in test_signal_time_range
    def test_signal_time_range(self, task_args, sim_args, signal_range):
  File "/home/dourai01/Data/Git/lisa/py3k/.lisa-venv-3.7/lib/python3.7/site-packages/hypothesis/core.py", line 1002, in wrapped_test
    raise the_error_hypothesis_found
  File "/home/dourai01/Data/Git/lisa/py3k/.lisa-venv-3.7/lib/python3.7/site-packages/hypothesis/core.py", line 961, in wrapped_test
    state.run()
  File "/home/dourai01/Data/Git/lisa/py3k/.lisa-venv-3.7/lib/python3.7/site-packages/hypothesis/core.py", line 682, in run
    falsifying_example.__expected_traceback,
  File "/home/dourai01/Data/Git/lisa/py3k/.lisa-venv-3.7/lib/python3.7/site-packages/hypothesis/core.py", line 558, in execute
    result = self.test_runner(data, run)
  File "/home/dourai01/Data/Git/lisa/py3k/.lisa-venv-3.7/lib/python3.7/site-packages/hypothesis/executors.py", line 56, in default_new_style_executor
    return function(data)
  File "/home/dourai01/Data/Git/lisa/py3k/.lisa-venv-3.7/lib/python3.7/site-packages/hypothesis/core.py", line 556, in run
    return test(*args, **kwargs)
  File "/home/dourai01/Data/Git/lisa/py3k/external/bart/tests/test_pelt_sim.py", line 91, in test_signal_time_range
    def test_signal_time_range(self, task_args, sim_args, signal_range):
  File "/home/dourai01/Data/Git/lisa/py3k/.lisa-venv-3.7/lib/python3.7/site-packages/hypothesis/core.py", line 526, in test
    raise DeadlineExceeded(runtime, self.settings.deadline)
hypothesis.errors.DeadlineExceeded: Test took 210.05ms, which exceeds the deadline of 200.00ms
-------------------- >> begin captured stdout << ---------------------
Falsifying example: test_signal_time_range(self=<test_pelt_sim.TestSimulator testMethod=test_signal_time_range>, task_args=(62709, 192, 8113, None), sim_args=(626, 256, None), signal_range=(10, 190))

You can reproduce this example by temporarily adding @reproduce_failure('4.4.3', b'ALD/////rf/5Cr4FHgf/AnL/AQAEBwcCAPT0BgF6wAIAxR+x') as a decorator on your test case

--------------------- >> end captured stdout << ----------------------

----------------------------------------------------------------------

douglas-raillard-arm avatar Feb 01 '19 18:02 douglas-raillard-arm