public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Desimone, Ashley E" <ashley.e.desimone@intel.com>
To: devel@edk2.groups.io
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>,
	Puja Pandya <puja.pandya@intel.com>
Subject: [edk2-devel][edk2-staging/EdkRepo][PATCH 5/8] EdkRepo: Argument Strings Refactor - Sparse Command
Date: Tue,  5 Nov 2019 16:02:27 -0800	[thread overview]
Message-ID: <20191106000230.7432-5-ashley.e.desimone@intel.com> (raw)
In-Reply-To: <20191106000230.7432-1-ashley.e.desimone@intel.com>

Move all argument strings for sparse_command.py to
edkrepo/commands/arguments/sparse_args.py

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/sparse_args.py | 16 ++++++++++++++++
 edkrepo/commands/sparse_command.py        |  8 ++++----
 edkrepo/common/argument_strings.py        |  4 ----
 3 files changed, 20 insertions(+), 8 deletions(-)
 create mode 100644 edkrepo/commands/arguments/sparse_args.py

diff --git a/edkrepo/commands/arguments/sparse_args.py b/edkrepo/commands/arguments/sparse_args.py
new file mode 100644
index 0000000..d38a0ae
--- /dev/null
+++ b/edkrepo/commands/arguments/sparse_args.py
@@ -0,0 +1,16 @@
+#!/usr/bin/env python3
+#
+## @file
+# sparse_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
+sparse command meta data.
+'''
+
+COMMAND_DESCRIPTION = 'Displays the current sparse checkout status and enables changing the sparse checkout state.'
+ENABLE_HELP = 'Enables sparse checkout is supported in the project manifest file.'
+DISABLE_HELP = 'Disables sparse checkout if it is currently enabled.'
\ No newline at end of file
diff --git a/edkrepo/commands/sparse_command.py b/edkrepo/commands/sparse_command.py
index a20bd89..5d4ef90 100644
--- a/edkrepo/commands/sparse_command.py
+++ b/edkrepo/commands/sparse_command.py
@@ -8,7 +8,7 @@
 #
 
 from edkrepo.commands.edkrepo_command import EdkrepoCommand
-from edkrepo.common.argument_strings import SPARSE_COMMAND_DESCRIPTION, SPARSE_ENABLE_HELP, SPARSE_DISABLE_HELP
+import edkrepo.commands.arguments.sparse_args as arguments
 from edkrepo.config.config_factory import get_workspace_path, get_workspace_manifest
 from edkrepo.common.common_repo_functions import sparse_checkout_enabled, sparse_checkout, reset_sparse_checkout
 from edkrepo.common.common_repo_functions import check_dirty_repos
@@ -24,17 +24,17 @@ class SparseCommand(EdkrepoCommand):
     def get_metadata(self):
         metadata = {}
         metadata['name'] = 'sparse'
-        metadata['help-text'] = SPARSE_COMMAND_DESCRIPTION
+        metadata['help-text'] = arguments.COMMAND_DESCRIPTION
         args = []
         metadata['arguments'] = args
         args.append({'name': 'enable',
                      'positional': False,
                      'required': False,
-                     'help-text': SPARSE_ENABLE_HELP})
+                     'help-text': arguments.ENABLE_HELP})
         args.append({'name': 'disable',
                      'positional': False,
                      'required': False,
-                     'help-text': SPARSE_DISABLE_HELP})
+                     'help-text': arguments.DISABLE_HELP})
         return metadata
 
     def run_command(self, args, config):
diff --git a/edkrepo/common/argument_strings.py b/edkrepo/common/argument_strings.py
index e5146df..50e25ee 100644
--- a/edkrepo/common/argument_strings.py
+++ b/edkrepo/common/argument_strings.py
@@ -41,7 +41,3 @@ 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 sparse_command.py
-SPARSE_COMMAND_DESCRIPTION = 'Displays the current sparse checkout status and allows for changing the sparse checkout state.'
-SPARSE_ENABLE_HELP = 'Enables sparse checkout if supported by the manifest.'
-SPARSE_DISABLE_HELP = 'Disables sparse checkout if enabled.'
-- 
2.16.2.windows.1


  parent reply	other threads:[~2019-11-06  0:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-06  0:02 [edk2-devel][edk2-staging/EdkRepo][PATCH 1/8] EdkRepo: Argument String Refactor - Removed Unused Strings Desimone, Ashley E
2019-11-06  0:02 ` [edk2-devel][edk2-staging/EdkRepo][PATCH 2/8] EdkRepo: Argument String Refactor Manifest Command Desimone, Ashley E
2019-11-06  0:02 ` [edk2-devel][edk2-staging/EdkRepo][PATCH 3/8] EdkRepo: Argument String Refactor - Combo Command Desimone, Ashley E
2019-11-06  0:02 ` [edk2-devel][edk2-staging/EdkRepo][PATCH 4/8] EdkRepo: Argument String Refactory " Desimone, Ashley E
2019-11-06  0:02 ` Desimone, Ashley E [this message]
2019-11-06  0:02 ` [edk2-devel][edk2-staging/EdkRepo][PATCH 6/8] EdkRepo: Argument Strings Refactor - Sync Command Desimone, Ashley E
2019-11-06  0:02 ` [edk2-devel][edk2-staging/EdkRepo][PATCH 7/8] EdkRepo: Argument Strings Refactor - Clone Command Desimone, Ashley E
2019-11-06  0:02 ` [edk2-devel][edk2-staging/EdkRepo][PATCH 8/8] EdkRepo: Argument Strings Refactor - EdkRepo Command Desimone, Ashley E

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=20191106000230.7432-5-ashley.e.desimone@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