Coder Social home page Coder Social logo

isabella232 / rtox Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pycontribs/rtox

0.0 0.0 0.0 149 KB

Develop locally, run tox remotely. This fork is the officially maintained version that is released on PYPI.

Home Page: https://pypi.org/project/rtox/

License: Apache License 2.0

Python 99.64% Makefile 0.36%

rtox's Introduction

https://travis-ci.org/pycontribs/rtox.svg?branch=master

rtox

This project represents an experimental development workflow with the following considerations in mind:

  • tox is an excellent tool for managing test activities in a virtualenv.
  • Servers in the cloud are faster and far more powerful than my local development environment (usually a laptop).
  • Latency introduced to the command line by a remote connection, especially on bad WiFi, is painful.
  • Running huge test suites on a cloud server doesn't drain my laptop's battery (or spin up my desktop's fans) like running them locally would.
  • Your local development platform might not actually have the binary dependencies available that your project requires from your target platform (developing a Linux application on OS X, for example).
  • Running tests with tox is easy. Running tests with rtox on a remote host against the local codebase should be just as easy.

This project currently makes a few assumptions that you'd have to meet for it to be useful to you:

  • You're a Python developer (that's why you're interested in tox, right?).
  • You're using git.
  • You're working on a publicly available repository (I'd like to break this assumption).

Usage

Configure rtox with an .rtox.cfg file like the following:

[ssh]
user = root
hostname = localhost
port = 22

rtox will look for config file in current folder or its parents and use ~/.rtox.cfg as fallback. This allows user to have different configs for different projects or groups of projects.

rtox simply needs to be pointed at an SSH host with git, tox and virtualenv installed.

Once it's configured, just use rtox in place of tox. For example:

$ rtox -e py27 -e pep8

The state of your local codebase will be mirrored to the remote host, and tox will be executed there.

untox

Untox is a small script that obliterates any tox.ini commands that are installing python packages inside the virtualenv, removing sepctions like deps, pip install ..., truncating requirements.txt files and enabling sitepackages = True on all tox environments.

Its purpose is to enable testing of python code with only system packages, something that may be desired by those that are planning to ship these modules as RPMs, DEBs.

untox script is installed as a command alongside rtox and once called it expectes to find a tox.ini in current folder. Be warned that changes are made in-place without any backup.

You also have the option to call rtox --untox ... which will run untox on the remote system after doing the rsync and before running tox. This option is handy as it keeps the local repository untoched.

rtox's People

Contributors

dolph avatar ssbarnea avatar

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.