Return-Path: X-Original-To: apmail-aurora-reviews-archive@minotaur.apache.org Delivered-To: apmail-aurora-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 4D9A717951 for ; Thu, 30 Oct 2014 01:01:33 +0000 (UTC) Received: (qmail 11082 invoked by uid 500); 30 Oct 2014 01:01:33 -0000 Delivered-To: apmail-aurora-reviews-archive@aurora.apache.org Received: (qmail 11055 invoked by uid 500); 30 Oct 2014 01:01:33 -0000 Mailing-List: contact reviews-help@aurora.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: reviews@aurora.incubator.apache.org Delivered-To: mailing list reviews@aurora.incubator.apache.org Received: (qmail 11041 invoked by uid 99); 30 Oct 2014 01:01:32 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Oct 2014 01:01:32 +0000 X-ASF-Spam-Status: No, hits=-1998.4 required=5.0 tests=ALL_TRUSTED,HTML_MESSAGE,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 30 Oct 2014 01:01:30 +0000 Received: (qmail 10674 invoked by uid 99); 30 Oct 2014 01:01:10 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Oct 2014 01:01:10 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id CA8641DF943; Thu, 30 Oct 2014 01:01:14 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============1388819574464174467==" MIME-Version: 1.0 Subject: Re: Review Request 27364: Add a script to generate a PyCharm-compatible virtualenv. From: "Kevin Sweeney" To: "Bill Farner" , "Brian Wickman" , "Joshua Cohen" Cc: "Aurora" , "Kevin Sweeney" Date: Thu, 30 Oct 2014 01:01:14 -0000 Message-ID: <20141030010114.7143.63823@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org Auto-Submitted: auto-generated Sender: "Kevin Sweeney" X-ReviewGroup: Aurora X-ReviewRequest-URL: https://reviews.apache.org/r/27364/ X-Sender: "Kevin Sweeney" References: <20141030005605.7137.2572@reviews.apache.org> In-Reply-To: <20141030005605.7137.2572@reviews.apache.org> Reply-To: "Kevin Sweeney" X-ReviewRequest-Repository: aurora X-Virus-Checked: Checked by ClamAV on apache.org --===============1388819574464174467== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit > On Oct. 29, 2014, 5:56 p.m., Joshua Cohen wrote: > > It feels a bit strange to change actual code for the sake of an IDE? The relative imports I'm fine with, but adding the BadZipFile error handling feels off to me. Not necessarily a -1 on this, but I'm curious if there's an alternative. The BadZipfile error was just an uncovered bug - if sys.argv[0] doesn't point to a zip file we PexInfo.from_pex raises a BadZipfile exception, not an IOError or OSError. In this case we were already trying to be defensive here in case we weren't deployed as a .pex, just incorrect. Without this change this codepath breaks when the production code is pip-installed anyway. - Kevin ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/27364/#review59093 ----------------------------------------------------------- On Oct. 29, 2014, 5:39 p.m., Kevin Sweeney wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/27364/ > ----------------------------------------------------------- > > (Updated Oct. 29, 2014, 5:39 p.m.) > > > Review request for Aurora, Joshua Cohen, Bill Farner, and Brian Wickman. > > > Repository: aurora > > > Description > ------- > > Note there are a few changes to test code to allow running without pants as the test runner: > > * Use relative imports in test packages. > * Added blank `__init__.py` files to test directories that need to use relative imports now. > * Catch PexInfo errors that result from not running inside a PEX. > * Add requirements.txt to .gitignore (we generate it from pants) - it helps pycharm offer quick fixes and identify packages with updates available. > > To create a PyCharm project: > > Add src/main/python as a Sources Root. > Set the project interpreter to pycharm.venv/bin/python > Add a py.test run configuration with cwd set to the repo root and arguments set to src/test/python. > > > Diffs > ----- > > .gitignore f551c88ea6a077c870b4bd60a640065f2e90e487 > build-support/python/make-pycharm-virtualenv PRE-CREATION > src/main/python/apache/aurora/client/cli/__init__.py 376106c88abe6d06ef6f3cb7027ab8f66f052686 > src/main/python/apache/aurora/executor/executor_vars.py 908d89fdcbdbbb33c9ddde26574244ba0476a524 > src/test/python/apache/aurora/client/api/__init__.py PRE-CREATION > src/test/python/apache/aurora/client/api/test_restarter.py 2b264de71c7374646e3adddd63857b7650cd0f07 > src/test/python/apache/aurora/client/api/test_updater.py f0e45e3f33de0dcb87251021bbf96bfea6f38ea8 > src/test/python/apache/aurora/client/cli/__init__.py PRE-CREATION > src/test/python/apache/aurora/client/cli/test_api_from_cli.py 4de8bb488b17d59ec2e43cd51a9f315e0b0ed4ba > src/test/python/apache/aurora/client/cli/test_cancel_update.py e7052465411165acb3d5145664f2f166ac052500 > src/test/python/apache/aurora/client/cli/test_command_hooks.py 60c75300501c36ac20a97f78ff18b3ca7af30699 > src/test/python/apache/aurora/client/cli/test_config_noun.py dfcbd7217b1d51609fa01c4d9cefed5471c91718 > src/test/python/apache/aurora/client/cli/test_create.py a56d8b95c3e3521eb3f576427f361b6ac4cb10df > src/test/python/apache/aurora/client/cli/test_cron.py c7b71c29d44150162fec8066947623fa91815424 > src/test/python/apache/aurora/client/cli/test_diff.py 78694d7559f2041f27cd2a7e4cb81ca467f63ac2 > src/test/python/apache/aurora/client/cli/test_help.py 551c9f949cda3971a370cb696216ec9584584336 > src/test/python/apache/aurora/client/cli/test_inspect.py e997b9743b63d71f8624ecf5ca1dcae0227be70d > src/test/python/apache/aurora/client/cli/test_kill.py f7601d82dbb45900bec2939dca2b921bf147961d > src/test/python/apache/aurora/client/cli/test_logging.py 9ca4dceeaa87d5fb2e38fe0d83fdcdf1ee597a0e > src/test/python/apache/aurora/client/cli/test_open.py c20649f5cada241d0f6e9ae5f88d300eac073517 > src/test/python/apache/aurora/client/cli/test_plugins.py dc5edd4f03cee062673231a04908193480c8071c > src/test/python/apache/aurora/client/cli/test_quota.py 88fb9aec4d1eae6ad05da01752a670f902bafb1b > src/test/python/apache/aurora/client/cli/test_restart.py a753ab4aead7e2560cae77c441562811924f8f1b > src/test/python/apache/aurora/client/cli/test_sla.py a1a3d8161ba747aa23a5e614e9ae31473d2058c1 > src/test/python/apache/aurora/client/cli/test_status.py 8894a1e7998342d290221e803606c950f0a1f3c4 > src/test/python/apache/aurora/client/cli/test_supdate.py f3fa6cf6e9e080689593c40e787018eff46f8ede > src/test/python/apache/aurora/client/cli/test_task_run.py 12163df0d2e1e42f2a321603ec10ff9359848216 > src/test/python/apache/aurora/client/cli/test_update.py 08f277e2b46f2bfe04a49ba6b8c2e40f64e5dd25 > src/test/python/apache/aurora/client/commands/__init__.py PRE-CREATION > src/test/python/apache/aurora/client/commands/test_admin.py 769545ba86a669685001e4483d95091cfbfb4097 > src/test/python/apache/aurora/client/commands/test_admin_sla.py 994b123fbd9e351859e918c74f9c2c0917b722e6 > src/test/python/apache/aurora/client/commands/test_cancel_update.py 13aa1fef1d94d46f2837f500606028baa694fa6e > src/test/python/apache/aurora/client/commands/test_create.py 4a753fb5942555854538047eb947e5465cdff607 > src/test/python/apache/aurora/client/commands/test_diff.py 9f1d459e51c663b9ad62bbbbb16a8127568662d1 > src/test/python/apache/aurora/client/commands/test_hooks.py d4d8d3cd15704353d958e1ef6b220eaa37696a4d > src/test/python/apache/aurora/client/commands/test_kill.py 1e13b926379147295a3a1b3d6ce79a727719dedb > src/test/python/apache/aurora/client/commands/test_listjobs.py f2a325ee025c78fcafab3f73a63c88c4245a7fee > src/test/python/apache/aurora/client/commands/test_maintenance.py 13d753f6870c9f552903b077e3c38d306ead5bc4 > src/test/python/apache/aurora/client/commands/test_restart.py efa0849c1f11d9304e2da981dfb9c1d0ff59a15d > src/test/python/apache/aurora/client/commands/test_run.py 0c395f7a8106acf3d45842a6f536dfb74b71a309 > src/test/python/apache/aurora/client/commands/test_ssh.py cf9f425b3dd64afe9d8fcfd70495a3c58108824f > src/test/python/apache/aurora/client/commands/test_status.py 9eb8def26692cf5fbd0c20bc96975125e411f0ba > src/test/python/apache/aurora/client/commands/test_update.py 555ea0d2727fca61256faf7815945320fcbde55d > src/test/python/apache/aurora/executor/common/__init__.py PRE-CREATION > src/test/python/apache/aurora/executor/common/test_health_checker.py 2be5b6c7e0e25480a4a48c326bcf22ee248739c1 > src/test/python/apache/aurora/executor/common/test_task_info.py c4fe9054f7449c056539b755c5cba52f9edad25f > src/test/python/apache/aurora/executor/test_executor_builds.py 88368f8956a4db8db74ed9d896390db1d5e97fb3 > > Diff: https://reviews.apache.org/r/27364/diff/ > > > Testing > ------- > > ./pants src/test/python:all > > ./build-support/python/make-pycharm-virtualenv > source build-support/python/pycharm.venv/bin/activate > PYTHONPATH=src/main/python py.test src/test/python > > Tested PyCharm Community Edition 3.4. Basic navigation (Ctrl-click) works. Find usages works. Py.Test works if configured manually. Not a great experience, but better than no IDE whatsoever for some things. > > > Thanks, > > Kevin Sweeney > > --===============1388819574464174467==--