Code Monkey home page Code Monkey logo

retox's Introduction

Hi there πŸ‘‹ Welcome to my GitHub Workshop! I'm Anthony Shaw, Python Software Foundation Fellow, ASF member, and Python-author. I work at Microsoft on the Open-Source Advocacy team focused on Python.

Some projects I'm working on right now that you might find interesting:

The most recently published blog posts:

My blog is up on my website along with links to all my πŸŽ™podcast interviews and πŸ‘¨β€conference talks. I'm currently working on a book, so check that out too!

GitHub Stats

I'm also on Mastodon.

retox's People

Contributors

bstpierre avatar pyup-bot avatar tonybaloney avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

retox's Issues

Cannot run any commands using retox

I have a Python 3.6 environment I've set up using conda. I've activated and done pip install retox into it. I am trying to set up the most simple layout to verify the retox is working. However, it looks as if it does not.

This is my tox.ini file:


[tox]
envlist = py36

[testenv]
basepython = 
	C:\Users\user\AppData\Local\Continuum\Anaconda2\envs\RetoxEnv\python.exe
commands = 
	{envpython} -m python -m unittest discover src/

When I run retox in the folder where I have my Python modules and the tests, I can see the blue screen with the information [pass] Get environment and the env is green. However, I see no output from the testing. I suspect that no commands are being executed.

The contents of retox.log:

System stdout encoding is utf-8
 
 ---- Starting new test run ----
Completing py36 with status 0
tox:   py36: commands succeeded
tox:   congratulations :)
tox: wrote json report at: C:\path\SampleFiles\.retox.json

Where should I look for hints?

Display logs to user

Retox needs a feature to see why a virtual env failed. The output from pylint or pytest for example.
This is a blanket issue for that discussion and open for additional input

Main function should use args=None

When installing through pip, I get this executable file:

#!/home/pawamoy/Data/isolated/virtualenvs/py35/bin/python3.5

# -*- coding: utf-8 -*-
import re
import sys

from retox.__main__ import main

if __name__ == '__main__':
    sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
    sys.exit(main())

As you can see, it runs main() without parameters, which results in the following error;

Traceback (most recent call last):
  File "/home/pawamoy/Data/isolated/virtualenvs/py35/bin/retox", line 11, in <module>
    sys.exit(main())
TypeError: main() missing 1 required positional argument: 'args'

Project needs CI/CD process

Raised issues after launch need to be caught inline, find a way to check the following;

  • tool is installable
  • retox command is callable
  • dependencies are still valid
  • check at least mac and linux.

Initial Update

Hi πŸ‘Š

This is my first visit to this fine repo, but it seems you have been working hard to keep all dependencies updated so far.

Once you have closed this issue, I'll create separate pull requests for every update as soon as I find one.

That's it for now!

Happy merging! πŸ€–

ImportError no module named _curses

When running retox I get this error:

Traceback (most recent call last):
  File "/home/pawamoy/Data/isolated/virtualenvs/py35/bin/retox", line 7, in <module>
    from retox.__main__ import main
  File "/home/pawamoy/Data/isolated/virtualenvs/py35/lib/python3.5/site-packages/retox/__main__.py", line 11, in <module>
    from asciimatics.screen import Screen
  File "/home/pawamoy/Data/isolated/virtualenvs/py35/lib/python3.5/site-packages/asciimatics/screen.py", line 1918, in <module>
    import curses
  File "/usr/local/lib/python3.5/curses/__init__.py", line 13, in <module>
    from _curses import *
ImportError: No module named '_curses'

Am I missing a dependency here? I already have libncurses5-dev installed. I'm on Debian Jessie by the way.

support for exclude (or include) flag

I had intended to open an issue to add support for multiple exclude flags, but I noticed that you recently changed the test to only explicitly watch .py.

I'd prefer to have exclude functionality because another project I'm working on runs tox checks against some .rst and other files, and I'd generally rather have retox run the checks even when non-python files change (e.g. .pylintrc, etc).

If it's something you'd accept I can work up a PR to:

  • add --exclude=regex argument
  • change get_hashes() to take an exclude=regex arg

Python 3 crashes

I get this crazy error on Python 3, it seems to be asciimatics related, but their documentation says they support Python 3 so it must be something in retox

 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ py27 β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ py36 β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ lint β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ pylint ─────────────────────────────┐
 β”‚Running                                                          β”‚β”‚Running                                                          β”‚β”‚Running                                                          β”‚β”‚Running                                                          β”‚
 β”‚                                                                 β–ˆβ”‚                                                                 β–ˆβ”‚                                                                 β–ˆβ”‚                                                                 β–ˆ
 β”‚                                                                 β–‘β”‚                                                                 β–‘β”‚                                                                 β–‘β”‚                                                                 β–‘
 β”‚                                                                 β–‘β”‚                                                                 β–‘β”‚                                                                 β–‘β”‚                                                                 β–‘
 β”‚                                                                 β–‘β”‚                                                                 β–‘β”‚                                                                 β–‘β”‚                                                                 β–‘
 β”‚                                                                 β–‘β”‚                                                                 β–‘β”‚                                                                 β–‘β”‚                                                                 β–‘
 β”‚                                                                 β–‘β”‚                                                                 β–‘β”‚                                                                 β–‘β”‚                                                                 β–‘
 β”‚                                                                 β–‘β”‚                                                                 β–‘β”‚                                                                 β–‘β”‚                                                                 β–‘
 β”‚                                                                 β–‘β”‚                                                                 β–‘β”‚                                                                 β–‘β”‚                                                                 β–‘
 β”‚                                                                 β–‘β”‚                                                                 β–‘β”‚                                                                 β–‘β”‚                                                                 β–‘
 β”‚Completed Get environment                                        β–‘β”‚Completed Get environment                                        β–‘β”‚Completed Get environment                                        β–‘β”‚Completed Get environmentTraceback (most recent call last):      β–‘
 β”‚                                                                 β–‘β”‚                                                                 β–‘β”‚                                                                 β–‘β”‚                                                             File "/Users/anthonyshaw/repo/libcloud/lib/python3.6/site-packages/eventlet/hubs/hub.py", line 458, in fire_timers                          β–‘β”‚                                                                 β–‘β”‚                                                                 β–‘
 β”‚                                                                 β–‘β”‚                                           timer()               β–‘β”‚                                                                 β–‘β”‚                                                                 β–‘
 β”‚                                                                 β–‘β”‚                                                    File "/Users/anthonyshaw/repo/libcloud/lib/python3.6/site-packages/eventlet/hubs/timer.py", line 58, in __call__                                   β–‘
 β”‚                                                                 β–‘β”‚                                                                 β–‘β”‚                                                                 β–‘β”‚                                  cb(*args, **kw)                β–‘
 β”‚                                                                 β–‘β”‚                                                                 β–‘β”‚                                                                 β–‘β”‚                                                   File "/Users/anthonyshaw/repo/retox-2/retox/reporter.py", line 67, in _loopreport  β–‘β”‚                                                                 β–‘β”‚                                                                 β–‘β”‚                                                                 β–‘
 β”‚                                                                   self.screen.draw_next_frame(repeat=False)                        β–‘β”‚                                                                 β–‘β”‚                                                                 β–‘
 β”‚                                                                 β–‘β”‚                                           File "/Users/anthonyshaw/repo/libcloud/lib/python3.6/site-packages/asciimatics/screen.py", line 1457, in draw_next_frame                                    β–‘
 β”‚                                                                 β–‘β”‚                                                                 β–‘β”‚                                                                 β–‘β”‚                                 self.refresh()                  β–‘
 β”‚                                                                 β–‘β”‚                                                                 β–‘β”‚                                                                 β–‘β”‚                                                 File "/Users/anthonyshaw/repo/libcloud/lib/python3.6/site-packages/asciimatics/screen.py", line 2126, in refresh                                        β–‘β”‚                                                                 β–‘β”‚                                                                 β–‘
 β”‚                                                                 β–‘β”‚                             super(_CursesScreen, self).refresh()β–‘β”‚                                                                 β–‘β”‚                                                                 β–‘
 β”‚                                                                 β–‘β”‚                                                                   File "/Users/anthonyshaw/repo/libcloud/lib/python3.6/site-packages/asciimatics/screen.py", line 1217, in refresh                    β–‘
 β”‚        Install Package                                          β–‘β”‚        Install Package                                          β–‘β”‚        Install Package                                          β–‘β”‚        Install PackageTraceback (most recent call last):int_at(new_cell[0], x, y, new_cell[4])                                       β–‘β”‚                                                                 β–‘β”‚                                                                 β–‘β”‚                                                           File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/runpy.py", line 193, in _run_module_as_mainics/screen.py", line 2256, in _print_at                                                         β”‚β”‚                                                                 β”‚
 β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€    "__main__", mod_spec)β”€β”€β”€β”€β”˜β””β”€β”€β”€β”€β”€β”€β”€β”€    self._safe_write(cursor + text)β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                                                                                                                    File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/runpy.py", line 85, in _run_codesite-packages/asciimatics/screen.py", line 2084, in _safe_write                                                                                                                                                                                                                   exec(code, run_globals)
                               sys.stdout.write(msg)                                                                                                                                                                                                                   File "/Users/anthonyshaw/repo/retox-2/retox/__main__.py", line 86, in <module>onyshaw/repo/libcloud/bin/../lib/python3.6/codecs.py", line 377, in write
                                                                           main()                                                                   self.stream.write(data)
                                                                                   File "/Users/anthonyshaw/repo/libcloud/lib/python3.6/site-packages/click/core.py", line 722, in __call__nthonyshaw/repo/libcloud/bin/../lib/python3.6/codecs.py", line 376, in write
                                                                                                                                                                                               return self.main(*args, **kwargs)                                           data, consumed = self.encode(object, self.errors)                                                                                                                                                                                    File "/Users/anthonyshaw/repo/libcloud/lib/python3.6/site-packages/click/core.py", line 697, in main utf_8_encode() argument 1 must be str, not bytes
                                                            rv = self.invoke(ctx)                        Traceback (most recent call last):
                                                                                   File "/Users/anthonyshaw/repo/libcloud/lib/python3.6/site-packages/click/core.py", line 895, in invokeython3.6/site-packages/eventlet/greenpool.py", line 88, in _spawn_n_impl
                                                                                                                                                                                             return ctx.invoke(self.callback, **ctx.params)                          func(*args, **kwargs)                                                                                                                                                                                                                                 File "/Users/anthonyshaw/repo/libcloud/lib/python3.6/site-packages/click/core.py", line 535, in invoke, line 85, in runtests
 Commands : (q) quit (b) build                                           return callback(*args, **kwargs)xsession.installpkg(venv, sdist):
                                                                                                           File "/Users/anthonyshaw/repo/retox-2/retox/__main__.py", line 41, in mainb/python3.6/site-packages/tox/session.py", line 511, in installpkg
                                                                                                                                                                                         out = service.run(tox_args.envlist)                               return False
                                                                                                                                                                                                                              File "/Users/anthonyshaw/repo/retox-2/retox/service.py", line 49, in run/libcloud/lib/python3.6/site-packages/tox/session.py", line 97, in __exit__
                            retcode = self._toxsession._summary()                                      self.report.logaction_finish(self)
                                                                   File "/Users/anthonyshaw/repo/libcloud/lib/python3.6/site-packages/tox/session.py", line 598, in _summaryox-2/retox/reporter.py", line 78, in logaction_finish
                                                                                                                                                                                self.report.startsummary()                           self._env_screens[action.venv.name].stop(action.activity, action)                                                                                                                                                                                    File "/Users/anthonyshaw/repo/retox-2/retox/reporter.py", line 91, in startsummary          File "/Users/anthonyshaw/repo/retox-2/retox/ui.py", line 79, in stop
                    frame.finish(venv.status)                                                     self._screen.refresh()
                                               File "/Users/anthonyshaw/repo/retox-2/retox/ui.py", line 92, in finish     File "/Users/anthonyshaw/repo/libcloud/lib/python3.6/site-packages/asciimatics/screen.py", line 2126, in refresh
                                                                                                                         self._screen.refresh()                                                                                               super(_CursesScreen, self).refresh()                                                                                                                                             File "/Users/anthonyshaw/repo/libcloud/lib/python3.6/site-packages/asciimatics/screen.py", line 2126, in refresh
      File "/Users/anthonyshaw/repo/libcloud/lib/python3.6/site-packages/asciimatics/screen.py", line 1217, in refresh                                                                                                                                               super(_CursesScreen, self).refresh()                                                                                               self._print_at(new_cell[0], x, y, new_cell[4])
                             File "/Users/anthonyshaw/repo/libcloud/lib/python3.6/site-packages/asciimatics/screen.py", line 1216, in refresh                             File "/Users/anthonyshaw/repo/libcloud/lib/python3.6/site-packages/asciimatics/screen.py", line 2256, in _print_at                                                                                                                                   self._change_colours(new_cell[1], new_cell[2], new_cell[3])
                  self._safe_write(cursor + text)                                                                                                                                                             File "/Users/anthonyshaw/repo/libcloud/lib/python3.6/site-packages/asciimatics/screen.py", line 2222, in _change_colours"/Users/anthonyshaw/repo/libcloud/lib/python3.6/site-packages/asciimatics/screen.py", line 2084, in _safe_write
                                                            self._safe_write(self._a_normal)                                                                               sys.stdout.write(msg)
                                                                                              File "/Users/anthonyshaw/repo/libcloud/lib/python3.6/site-packages/asciimatics/screen.py", line 2084, in _safe_writehonyshaw/repo/libcloud/bin/../lib/python3.6/codecs.py", line 377, in write                                                                                                                                                                                                        sys.stdout.write(msg)
                  self.stream.write(data)                                                                                                                                                                                                    File "/Users/anthonyshaw/repo/libcloud/bin/../lib/python3.6/codecs.py", line 377, in write() argument must be str, not bytes
                                                             self.stream.write(data)
                                                                                      File "/Users/anthonyshaw/repo/libcloud/bin/../lib/python3.6/codecs.py", line 376, in write
                                                                                                                                                                                    data, consumed = self.encode(object, self.errors)
                                                                                                                                                                                                                                     TypeError: utf_8_encode() argument 1 must be str, not bytes

screen not redrawn when window size changes

When the terminal window changes size, retox doesn't redraw the screen. Then if I force a build, it draws text for the results but it makes a mess out of the screen -- I think it's writing using the old window geometry?

I think it just needs to handle SIGWINCH and do a resize/redraw.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.