From 7aa81837b01fceda63602952919aba40ab3253c7 Mon Sep 17 00:00:00 2001 From: Billy Seol Date: Fri, 15 Jun 2018 13:04:16 -0700 Subject: [PATCH 1/3] adding more documentation for python_app --- src/python/pants/backend/python/targets/python_app.py | 7 +++++++ src/python/pants/build_graph/app_base.py | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/python/pants/backend/python/targets/python_app.py b/src/python/pants/backend/python/targets/python_app.py index 5f5a142641b..cb13e94bf86 100644 --- a/src/python/pants/backend/python/targets/python_app.py +++ b/src/python/pants/backend/python/targets/python_app.py @@ -10,6 +10,13 @@ class PythonApp(AppBase): + """A deployable Python application. + Invoking the ``bundle`` goal on one of these targets creates a + self-contained artifact suitable for deployment on some other machine. + The artifact contains the executable pex, its dependencies, and + extra files like config files, startup scripts, etc. + :API: public + """ @classmethod def alias(cls): return 'python_app' diff --git a/src/python/pants/build_graph/app_base.py b/src/python/pants/build_graph/app_base.py index 517246b2e22..d5cd8ad08fa 100644 --- a/src/python/pants/build_graph/app_base.py +++ b/src/python/pants/build_graph/app_base.py @@ -212,8 +212,8 @@ def __init__(self, archive=None, **kwargs): """ - :param string binary: Target spec of the ``jvm_binary`` that contains the - app main. + :param string binary: Target spec of the ``jvm_binary`` or the ``python-binary`` + that contains the app main. :param bundles: One or more ``bundle``\s describing "extra files" that should be included with this app (e.g.: config files, startup scripts). From df98ee5cc84b217c1891ef3db09389a5374c623c Mon Sep 17 00:00:00 2001 From: Yi Cheng Date: Fri, 15 Jun 2018 16:50:30 -0700 Subject: [PATCH 2/3] Update app_base.py --- src/python/pants/build_graph/app_base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/python/pants/build_graph/app_base.py b/src/python/pants/build_graph/app_base.py index d5cd8ad08fa..30121ab8b88 100644 --- a/src/python/pants/build_graph/app_base.py +++ b/src/python/pants/build_graph/app_base.py @@ -212,7 +212,7 @@ def __init__(self, archive=None, **kwargs): """ - :param string binary: Target spec of the ``jvm_binary`` or the ``python-binary`` + :param string binary: Target spec of the ``jvm_binary`` or the ``python_binary`` that contains the app main. :param bundles: One or more ``bundle``\s describing "extra files" that should be included with this app From 1cff04569b586ba07fba9c53d31b88e042364cca Mon Sep 17 00:00:00 2001 From: Stu Hood Date: Fri, 15 Jun 2018 17:08:35 -0700 Subject: [PATCH 3/3] Add line between docs and method to fix lint error. --- src/python/pants/backend/python/targets/python_app.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/python/pants/backend/python/targets/python_app.py b/src/python/pants/backend/python/targets/python_app.py index cb13e94bf86..4643ce2e511 100644 --- a/src/python/pants/backend/python/targets/python_app.py +++ b/src/python/pants/backend/python/targets/python_app.py @@ -11,12 +11,15 @@ class PythonApp(AppBase): """A deployable Python application. + Invoking the ``bundle`` goal on one of these targets creates a self-contained artifact suitable for deployment on some other machine. The artifact contains the executable pex, its dependencies, and extra files like config files, startup scripts, etc. + :API: public """ + @classmethod def alias(cls): return 'python_app'