From reviews-return-73878-apmail-mesos-reviews-archive=mesos.apache.org@mesos.apache.org Fri Feb 23 10:04:29 2018 Return-Path: X-Original-To: apmail-mesos-reviews-archive@minotaur.apache.org Delivered-To: apmail-mesos-reviews-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E118418CDF for ; Fri, 23 Feb 2018 10:04:29 +0000 (UTC) Received: (qmail 94047 invoked by uid 500); 23 Feb 2018 10:04:29 -0000 Delivered-To: apmail-mesos-reviews-archive@mesos.apache.org Received: (qmail 94011 invoked by uid 500); 23 Feb 2018 10:04:29 -0000 Mailing-List: contact reviews-help@mesos.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: reviews@mesos.apache.org Delivered-To: mailing list reviews@mesos.apache.org Received: (qmail 93993 invoked by uid 99); 23 Feb 2018 10:04:29 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Feb 2018 10:04:29 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id B3FC2C0145; Fri, 23 Feb 2018 10:04:28 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.94 X-Spam-Level: X-Spam-Status: No, score=0.94 tagged_above=-999 required=6.31 tests=[HTML_MESSAGE=2, KAM_LAZY_DOMAIN_SECURITY=1, KAM_LOTSOFHASH=0.25, RCVD_IN_DNSWL_MED=-2.3, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id 2kbQdboqQfuh; Fri, 23 Feb 2018 10:04:26 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id A2AD85F189; Fri, 23 Feb 2018 10:04:25 +0000 (UTC) Received: from reviews.apache.org (unknown [10.41.0.12]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id E57D8E00B8; Fri, 23 Feb 2018 10:04:24 +0000 (UTC) Received: from reviews-vm2.apache.org (localhost [IPv6:::1]) by reviews.apache.org (ASF Mail Server at reviews-vm2.apache.org) with ESMTP id 9BDEAC401BF; Fri, 23 Feb 2018 10:04:22 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============6003826752731768108==" MIME-Version: 1.0 Subject: Re: Review Request 64970: Replace ad hoc venv under support/ with tox. From: Mesos Reviewbot To: Armand Grillet , Kevin Klues , Jason Lai Cc: Mesos Reviewbot , mesos , Eric Chung Date: Fri, 23 Feb 2018 10:04:22 -0000 Message-ID: <20180223100422.12420.57283@reviews-vm2.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: Mesos Reviewbot X-ReviewGroup: mesos X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/64970/ X-Sender: Mesos Reviewbot References: <20180223075856.12421.93571@reviews-vm2.apache.org> In-Reply-To: <20180223075856.12421.93571@reviews-vm2.apache.org> X-ReviewBoard-Diff-For: src/python/cli_new/tox.ini X-ReviewBoard-Diff-For: src/python/lib/requirements-test.in Reply-To: Mesos Reviewbot X-ReviewRequest-Repository: mesos --===============6003826752731768108== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/64970/#review198171 ----------------------------------------------------------- Patch looks great! Reviews applied: [64970] Passed command: export OS='ubuntu:14.04' BUILDTOOL='autotools' COMPILER='gcc' CONFIGURATION='--verbose --disable-libtool-wrappers' ENVIRONMENT='GLOG_v=1 MESOS_VERBOSE=1'; ./support/docker-build.sh - Mesos Reviewbot On Feb. 23, 2018, 7:58 a.m., Eric Chung wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/64970/ > ----------------------------------------------------------- > > (Updated Feb. 23, 2018, 7:58 a.m.) > > > Review request for mesos, Armand Grillet, Jason Lai, and Kevin Klues. > > > Repository: mesos > > > Description > ------- > > Use tox for linting and testing code living uder src/python. > > At the moment, all linting is done through the same `pylint` > installation under support/.virtualenv, which requires ALL dependencies > (i.e. pip-requirements.txt, requirements.in scattered in various > directories) to be installed in the same virtualenv, making things > really messy -- e.g. when I've changed some code under `src/python/lib`, > but don't have the dev virtualenv activated, linting will fail since > none of the dependencies under `src/python/lib` have been installed. > > Using tox, we can solve this problem by distributing a "test spec" > (tox.ini) in each of the python source directories which are aware of > its local dependencies only. To test or lint the code there would be as > simple as running `tox -e py27-lint `, and the corresponding > virtualenv and test dependencies would automatically be setup. > > This patch modifies `support/mesos-style.py` to install `tox` in > `support/.virtualenv` and delegates linting to a `tox` call when it sees > python directories that have tox setup for it. Linting for all other > languages will not be effected. > > Testing Done: > 1. intentionally create a lint error, such as extra spaces before a > parens in a python file > 2. run the pre-commit hook and see tox in action > > Reviewed at https://reviews.apache.org/r/64970/ > > > Diffs > ----- > > src/python/cli_new/tox.ini PRE-CREATION > src/python/lib/requirements-test.in b2b73aab65377d9310797203ea84c5150ae60805 > src/python/lib/tox.ini fd5e89c77c8608fea21e9caad814c6e111ad57db > support/mesos-style.py 47ec36949010fa511d1b3974739c5ad5c03f6f7f > > > Diff: https://reviews.apache.org/r/64970/diff/4/ > > > Testing > ------- > > 1. intentionally create a lint error, such as extra spaces before a parens in a python file > 2. run the pre-commit hook and see tox in action > > > Thanks, > > Eric Chung > > --===============6003826752731768108==--