beeware / cricket

A GUI tool for running Python test suites.
BSD 3-Clause "New" or "Revised" License
213 stars 69 forks source link

(GSoC) Port Cricket to use Toga, instead of Tkinter #65

Closed Dayof closed 6 years ago

Dayof commented 7 years ago

Detail about this PR on issue #58 !
This PR is dependent of the PR pybee/toga#201 . Demo : https://youtu.be/5kz_CmQYFYE.

phildini commented 7 years ago

Hi there! In trying to test this end to end on local machine, I ran into an error. This is probably me doing something wrong, but I'd like to double-check so I can help review.

My steps:

  1. Checkout cricket and toga
  2. Switch to the pr branches for cricket and toga (ie, this branch and pybee/toga#201)
  3. in toga, pip install -e .
  4. in cricket pip install -e .
  5. in cricket, cricket-unittest

This results in the following error:

Traceback (most recent call last):
  File "/Users/phildini/.virtualenvs/cricket/bin/cricket-unittest", line 11, in <module>
    load_entry_point('cricket', 'console_scripts', 'cricket-unittest')()
  File "/Users/phildini/Repos/pybee/cricket/cricket/unittest/__main__.py", line 9, in main
    cricket_main(UnittestProject)
  File "/Users/phildini/Repos/pybee/cricket/cricket/main.py", line 85, in main
    view.main_loop()
  File "/Users/phildini/.virtualenvs/cricket/lib/python3.5/site-packages/toga_cocoa/app.py", line 167, in main_loop
    self._startup()
  File "/Users/phildini/.virtualenvs/cricket/lib/python3.5/site-packages/toga_cocoa/app.py", line 118, in _startup
    self.startup()
  File "/Users/phildini/Repos/pybee/cricket/cricket/view.py", line 220, in startup
    self._setup_main_content()
  File "/Users/phildini/Repos/pybee/cricket/cricket/view.py", line 360, in _setup_main_content
    self._setup_left_frame()
  File "/Users/phildini/Repos/pybee/cricket/cricket/view.py", line 383, in _setup_left_frame
    data=TogaDataSource(self.tests_tree_data))
TypeError: __init__() got an unexpected keyword argument 'data'

I know that this PR depends on the changes interface from pybee/toga#201, which makes me think I'm installing something wrong?

If @Dayof or @freakboy3742 have thoughts, I'd love to help review this.

freakboy3742 commented 7 years ago

@phildini AFAIK, It should just be a matter of using the #201 PR branch; if that's not working, I'll have to dig deeper. I haven't had a chance to take this code for a run myself, yet.

freakboy3742 commented 7 years ago

@phildini Looking at your details: If you've done a pip install -e in the toga directory, then you'll probably find that you haven't got the branch's version of toga-cocoa installed - you'll have 0.2.14 (or similar) from PyPI. You'll need to completely uninstall toga, then go into the toga/src/core directory, pip install -e . there, and then do the same thing in the toga/src/cocoa directory.

This is required because the base toga package is just there to define dependencies; and pip goes to PyPI for those dependencies by default.

phildini commented 7 years ago

I blew away my venv and started over, and still got an error... do I need to setup more packages than src/core, src/cocoa, toga, and cricket?

https://gist.github.com/phildini/a46d507a32e9de9de9d818696fdad1ad

Dayof commented 7 years ago

@phildini I cleaned my env and I installed all over again and didn't find these errors, I'll open an vm to test this.

phildini commented 7 years ago

@Dayof if both you and @freakboy3742 are able to get this running on your machines, then don't worry about trying to remote-debug my machine. @freakboy3742 is probably more qualified to review anyways. :)