public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Nate DeSimone" <nathaniel.l.desimone@intel.com>
To: "Desimone, Ashley E" <ashley.e.desimone@intel.com>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: "Pandya, Puja" <puja.pandya@intel.com>
Subject: Re: [edk2-devel][edk2-staging/EdkRepo][PATCH v2 2/8] EdkRepo: Argument String Refactor Manifest Command
Date: Wed, 6 Nov 2019 22:44:21 +0000	[thread overview]
Message-ID: <02A34F284D1DA44BB705E61F7180EF0AB5BA4876@ORSMSX113.amr.corp.intel.com> (raw)
In-Reply-To: <20191106223944.18036-2-ashley.e.desimone@intel.com>

Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>

-----Original Message-----
From: Desimone, Ashley E <ashley.e.desimone@intel.com> 
Sent: Wednesday, November 6, 2019 2:40 PM
To: devel@edk2.groups.io
Cc: Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Pandya, Puja <puja.pandya@intel.com>
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/arguments/manifest_args.py and remove unused strings.

Signed-off-by: Ashley E Desimone <ashley.e.desimone@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Puja Pandya <puja.pandya@intel.com>
---
 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 edkrepo/commands/arguments/__init__.py
 create mode 100644 edkrepo/commands/arguments/manifest_args.py

diff --git a/edkrepo/commands/arguments/__init__.py b/edkrepo/commands/arguments/__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.<BR> # 
+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.<BR> # 
+SPDX-License-Identifier: BSD-2-Clause-Patent #
+
+''' Contains the help and description strings for arguments in the 
+manifest command meta data.
+'''
+
+COMMAND_DESCRIPTION = 'Lists the available projects.'
+ARCHIVED_HELP = 'Include a listing of archived projects.'
\ No newline at end of file
diff --git a/edkrepo/commands/manifest_command.py b/edkrepo/commands/manifest_command.py
index 32cac7f..44218c9 100644
--- a/edkrepo/commands/manifest_command.py
+++ b/edkrepo/commands/manifest_command.py
@@ -12,11 +12,10 @@ import os
 
 from colorama import Fore
 
-# 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 EdkrepoWorkspaceInvalidException -from edkrepo.common.argument_strings import MANIFEST_COMMAND_DESCRIPTION, ARCHIVED_HELP, MANIFEST_VERBOSE_HELP  from edkrepo.common.common_repo_functions import pull_latest_manifest_repo, verify_manifest_data  from edkrepo.common.ui_functions import init_color_console  from edkrepo.config.config_factory import get_workspace_manifest @@ -30,14 +29,14 @@ class ManifestCommand(EdkrepoCommand):
     def get_metadata(self):
         metadata = {}
         metadata['name'] = 'manifest'
-        metadata['help-text'] = MANIFEST_COMMAND_DESCRIPTION
+        metadata['help-text'] = arguments.COMMAND_DESCRIPTION
         args = []
         metadata['arguments'] = 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
 
diff --git a/edkrepo/common/argument_strings.py b/edkrepo/common/argument_strings.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 = 'Updates the global manifest repository and  UPDATE_LOCAL_MANIFEST_HELP = 'Updates the local manifest file found in the <workspace>/repo directory prior to performing sync operations.'
 SYNC_OVERRIDE_HELP = 'Without this flag sync operations will not be completed if the updated manifest adds/removes repositories or if there are local commits on the target branch.'
 
-#Args for manifest_command.py
-MANIFEST_COMMAND_DESCRIPTION = 'Lists project manifests'
-ARCHIVED_HELP = 'Include archived projects'
-MANIFEST_VERBOSE_HELP = 'Show XML path'
-
 #Args  for checkout_command.py
 CHECKOUT_COMMAND_DESCRIPTION = 'The checkout command enables checking out a specific branch combination from the project manifest located in the <workspace>/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 = 'EdkRepo checkout <Combination or sha>\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='edkrepo',
       version='2.0.0',
       description='The edkrepo tools',
-      packages=['edkrepo', 'edkrepo.commands', 'edkrepo.common', 'edkrepo.config', 'edkrepo_manifest_parser', 'project_utils'],
+      packages=['edkrepo', 'edkrepo.commands', 
+ 'edkrepo.commands.arguments', 'edkrepo.common', 'edkrepo.config', 
+ 'edkrepo_manifest_parser', 'project_utils'],
       package_data={
          },
       include_package_data=True,
--
2.16.2.windows.1


  reply	other threads:[~2019-11-06 22:44 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-06 22:39 [edk2-devel][edk2-staging/EdkRepo][PATCH v2 1/8] EdkRepo: Argument String Refactor - Removed Unused Strings Desimone, Ashley E
2019-11-06 22:39 ` [edk2-devel][edk2-staging/EdkRepo][PATCH v2 2/8] EdkRepo: Argument String Refactor Manifest Command Desimone, Ashley E
2019-11-06 22:44   ` Nate DeSimone [this message]
2019-11-06 22:39 ` [edk2-devel][edk2-staging/EdkRepo][PATCH v2 3/8] EdkRepo: Argument String Refactor - Combo Command Desimone, Ashley E
2019-11-06 22:44   ` Nate DeSimone
2019-11-06 22:39 ` [edk2-devel][edk2-staging/EdkRepo][PATCH v2 4/8] EdkRepo: Argument String Refactor - Checkout Command Desimone, Ashley E
2019-11-06 22:44   ` Nate DeSimone
2019-11-06 22:39 ` [edk2-devel][edk2-staging/EdkRepo][PATCH v2 5/8] EdkRepo: Argument Strings Refactor - Sparse Command Desimone, Ashley E
2019-11-06 22:44   ` Nate DeSimone
2019-11-06 22:39 ` [edk2-devel][edk2-staging/EdkRepo][PATCH v2 6/8] EdkRepo: Argument Strings Refactor - Sync Command Desimone, Ashley E
2019-11-06 22:44   ` Nate DeSimone
2019-11-06 22:39 ` [edk2-devel][edk2-staging/EdkRepo][PATCH v2 7/8] EdkRepo: Argument Strings Refactor - Clone Command Desimone, Ashley E
2019-11-06 22:44   ` Nate DeSimone
2019-11-06 22:39 ` [edk2-devel][edk2-staging/EdkRepo][PATCH v2 8/8] EdkRepo: Argument Strings Refactor - EdkRepo Command Desimone, Ashley E
2019-11-06 22:44   ` Nate DeSimone
2019-11-06 22:44 ` [edk2-devel][edk2-staging/EdkRepo][PATCH v2 1/8] EdkRepo: Argument String Refactor - Removed Unused Strings Nate DeSimone

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=02A34F284D1DA44BB705E61F7180EF0AB5BA4876@ORSMSX113.amr.corp.intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox