From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mx.groups.io with SMTP id smtpd.web10.177.1573080262071203522 for ; Wed, 06 Nov 2019 14:44:22 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.20, mailfrom: nathaniel.l.desimone@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Nov 2019 14:44:21 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,276,1569308400"; d="scan'208";a="228867901" Received: from orsmsx104.amr.corp.intel.com ([10.22.225.131]) by FMSMGA003.fm.intel.com with ESMTP; 06 Nov 2019 14:44:21 -0800 Received: from orsmsx152.amr.corp.intel.com (10.22.226.39) by ORSMSX104.amr.corp.intel.com (10.22.225.131) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 6 Nov 2019 14:44:21 -0800 Received: from orsmsx113.amr.corp.intel.com ([169.254.9.28]) by ORSMSX152.amr.corp.intel.com ([169.254.8.128]) with mapi id 14.03.0439.000; Wed, 6 Nov 2019 14:44:21 -0800 From: "Nate DeSimone" To: "Desimone, Ashley E" , "devel@edk2.groups.io" CC: "Pandya, Puja" Subject: Re: [edk2-devel][edk2-staging/EdkRepo][PATCH v2 2/8] EdkRepo: Argument String Refactor Manifest Command Thread-Topic: [edk2-devel][edk2-staging/EdkRepo][PATCH v2 2/8] EdkRepo: Argument String Refactor Manifest Command Thread-Index: AQHVlPMcuccMIiOUxE61X/6WKVE5qKd+vPPw Date: Wed, 6 Nov 2019 22:44:21 +0000 Message-ID: <02A34F284D1DA44BB705E61F7180EF0AB5BA4876@ORSMSX113.amr.corp.intel.com> References: <20191106223944.18036-1-ashley.e.desimone@intel.com> <20191106223944.18036-2-ashley.e.desimone@intel.com> In-Reply-To: <20191106223944.18036-2-ashley.e.desimone@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiOTY0ZGIyMTItYmJmZi00NjRhLWJjYWYtYjkxZmMzYzU5ZDI1IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiQUlrTzJXU2tVSGFWQ0FPUUFVU1VUTTZtVUxzbjhvWlwvTURsSVlGWHRrbGdKQUZcL2NSQVMzaFlveVIwUGN0RUhcLyJ9 x-ctpclassification: CTP_NT x-originating-ip: [10.22.254.139] MIME-Version: 1.0 Return-Path: nathaniel.l.desimone@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Nate DeSimone -----Original Message----- From: Desimone, Ashley E =20 Sent: Wednesday, November 6, 2019 2:40 PM To: devel@edk2.groups.io Cc: Desimone, Nathaniel L ; Pandya, Puja Subject: [edk2-devel][edk2-staging/EdkRepo][PATCH v2 2/8] EdkRepo: Argument= String Refactor Manifest Command Update setup.py to add edkrepo.commands.arguments. Move all argument strings for manifest_command.py to edkrepo/commands/argum= ents/manifest_args.py and remove unused strings. Signed-off-by: Ashley E Desimone Cc: Nate DeSimone Cc: Puja Pandya --- edkrepo/commands/arguments/__init__.py | 8 ++++++++ edkrepo/commands/arguments/manifest_args.py | 15 +++++++++++++++ edkrepo/commands/manifest_command.py | 7 +++---- edkrepo/common/argument_strings.py | 5 ----- setup.py | 2 +- 5 files changed, 27 insertions(+), 10 deletions(-) create mode 100644 edk= repo/commands/arguments/__init__.py create mode 100644 edkrepo/commands/arguments/manifest_args.py diff --git a/edkrepo/commands/arguments/__init__.py b/edkrepo/commands/argu= ments/__init__.py new file mode 100644 index 0000000..dea6eb4 --- /dev/null +++ b/edkrepo/commands/arguments/__init__.py @@ -0,0 +1,8 @@ +#!/usr/bin/env python3 +# +## @file +# __init__.py +# +# Copyright (c) 2019, Intel Corporation. All rights reserved.
#=20 +SPDX-License-Identifier: BSD-2-Clause-Patent # diff --git a/edkrepo/commands/arguments/manifest_args.py b/edkrepo/commands= /arguments/manifest_args.py new file mode 100644 index 0000000..25b9773 --- /dev/null +++ b/edkrepo/commands/arguments/manifest_args.py @@ -0,0 +1,15 @@ +#!/usr/bin/env python3 +# +## @file +# manifest_args.py +# +# Copyright (c) 2019, Intel Corporation. All rights reserved.
#=20 +SPDX-License-Identifier: BSD-2-Clause-Patent # + +''' Contains the help and description strings for arguments in the=20 +manifest command meta data. +''' + +COMMAND_DESCRIPTION =3D 'Lists the available projects.' +ARCHIVED_HELP =3D 'Include a listing of archived projects.' \ No newline at end of file diff --git a/edkrepo/commands/manifest_command.py b/edkrepo/commands/manife= st_command.py index 32cac7f..44218c9 100644 --- a/edkrepo/commands/manifest_command.py +++ b/edkrepo/commands/manifest_command.py @@ -12,11 +12,10 @@ import os =20 from colorama import Fore =20 -# Our modules from edkrepo.commands.edkrepo_command import EdkrepoCommand from edkrepo.= commands.edkrepo_command import ColorArgument +import edkrepo.commands.arguments.manifest_args as arguments from edkrepo.common.edkrepo_exception import EdkrepoWorkspaceInvalidExcept= ion -from edkrepo.common.argument_strings import MANIFEST_COMMAND_DESCRIPTI= ON, ARCHIVED_HELP, MANIFEST_VERBOSE_HELP from edkrepo.common.common_repo_f= unctions import pull_latest_manifest_repo, verify_manifest_data from edkre= po.common.ui_functions import init_color_console from edkrepo.config.confi= g_factory import get_workspace_manifest @@ -30,14 +29,14 @@ class ManifestC= ommand(EdkrepoCommand): def get_metadata(self): metadata =3D {} metadata['name'] =3D 'manifest' - metadata['help-text'] =3D MANIFEST_COMMAND_DESCRIPTION + metadata['help-text'] =3D arguments.COMMAND_DESCRIPTION args =3D [] metadata['arguments'] =3D args args.append({'name': 'archived', 'short-name': 'a', 'positional': False, 'required': False, - 'help-text': ARCHIVED_HELP}) + 'help-text': arguments.ARCHIVED_HELP}) args.append(ColorArgument) return metadata =20 diff --git a/edkrepo/common/argument_strings.py b/edkrepo/common/argument_s= trings.py index 93db079..fd74f37 100644 --- a/edkrepo/common/argument_strings.py +++ b/edkrepo/common/argument_strings.py @@ -41,11 +41,6 @@ UPDATE_LOCAL_MANIFEST_DESCRIPTION =3D 'Updates the globa= l manifest repository and UPDATE_LOCAL_MANIFEST_HELP =3D 'Updates the loca= l manifest file found in the /repo directory prior to performing= sync operations.' SYNC_OVERRIDE_HELP =3D 'Without this flag sync operations will not be comp= leted if the updated manifest adds/removes repositories or if there are loc= al commits on the target branch.' =20 -#Args for manifest_command.py -MANIFEST_COMMAND_DESCRIPTION =3D 'Lists project manifests' -ARCHIVED_HELP =3D 'Include archived projects' -MANIFEST_VERBOSE_HELP =3D 'Show XML path' - #Args for checkout_command.py CHECKOUT_COMMAND_DESCRIPTION =3D 'The checkout command enables checking ou= t a specific branch combination from the project manifest located in the /repo directory or the sha of a specific commit which will update = all repos in the workspace to this commit.\nNote that checkout SHA will put= the affected repos into detached head mode.\n' CHECKOUT_COMBINATION_DESCRIPTION =3D 'EdkRepo checkout \n' diff --git a/setup.py b/setup.py index ed07594..4be04f1 100755 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ from setuptools import setup setup(name=3D'edkrepo', version=3D'2.0.0', description=3D'The edkrepo tools', - packages=3D['edkrepo', 'edkrepo.commands', 'edkrepo.common', 'edkrep= o.config', 'edkrepo_manifest_parser', 'project_utils'], + packages=3D['edkrepo', 'edkrepo.commands',=20 + 'edkrepo.commands.arguments', 'edkrepo.common', 'edkrepo.config',=20 + 'edkrepo_manifest_parser', 'project_utils'], package_data=3D{ }, include_package_data=3DTrue, -- 2.16.2.windows.1