Skip to content

Commit

Permalink
Merge pull request #1837 from buildtesters/remove_buildtest_schema_co…
Browse files Browse the repository at this point in the history
…mmand

Remove buildtest schema command
  • Loading branch information
shahzebsiddiqui authored Nov 8, 2024
2 parents 9c46565 + 7cdfcac commit 905a1d7
Show file tree
Hide file tree
Showing 9 changed files with 0 additions and 341 deletions.
14 changes: 0 additions & 14 deletions bash_completion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,6 @@ _avail_buildspecs ()
buildtest buildspec find --buildspec --terse --count=-1 --no-header 2>/dev/null
}

# get list of schemas
_avail_schemas ()
{
buildtest schema
}

# list of available executors
_avail_executors ()
Expand Down Expand Up @@ -229,15 +224,6 @@ _buildtest ()
;;
stats)
COMPREPLY=( "$( compgen -W "$(_test_name)" -- "${cur}" )" );;
schema)
local opts="-h -n -e -j --name --example --json"
COMPREPLY=( "$( compgen -W "$opts" -- "${cur}" )" )

# fill auto-completion for 'buildtest schema --name'
if [[ "${prev}" == "-n" ]] || [[ "${prev}" == "--name" ]]; then
COMPREPLY=( "$( compgen -W "$(_avail_schemas)" -- "${cur}" )" )
fi
;;

report|rt)
local opts="--detailed --end --fail --filter --filterfields --format --formatfields --help --helpfilter --helpformat --latest --no-header --oldest --pager --pass --row-count --start --terse -d -e -f -h -n -p -s -t"
Expand Down
31 changes: 0 additions & 31 deletions buildtest/cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

from buildtest import BUILDTEST_COPYRIGHT, BUILDTEST_VERSION
from buildtest.defaults import console
from buildtest.schemas.defaults import schema_table


def build_filters_format(val):
Expand Down Expand Up @@ -238,7 +237,6 @@ class BuildTestParser:
"path",
"rt",
"report",
"schema",
"style",
"stylecheck",
"test",
Expand Down Expand Up @@ -266,7 +264,6 @@ def __init__(self):
"inspect": {"help": "Inspect a test", "aliases": ["it"]},
"path": {"help": "Show path attributes for a given test", "aliases": ["p"]},
"history": {"help": "Query build history", "aliases": ["hy"]},
"schema": {"help": "List schema contents and examples"},
"cdash": {"help": "Upload test to CDASH server"},
"cd": {"help": "Change directory to root of test given a test name"},
"clean": {
Expand Down Expand Up @@ -331,7 +328,6 @@ def __init__(self):
self.inspect_menu()
self.path_menu()
self.history_menu()
self.schema_menu()
self.cdash_menu()
self.unittest_menu()
self.stylecheck_menu()
Expand Down Expand Up @@ -1839,33 +1835,6 @@ def inspect_menu(self):

return

def schema_menu(self):
"""This method builds menu for ``buildtest schema``"""

parser_schema = self.subparsers.choices["schema"]

schema_args = [
(
["-e", "--example"],
{"action": "store_true", "help": "Show schema examples"},
),
(
["-j", "--json"],
{"action": "store_true", "help": "Display json schema file"},
),
(
["-n", "--name"],
{
"help": "show schema by name (e.g., script)",
"metavar": "Schema Name",
"choices": schema_table["names"],
},
),
]

for arg_info in schema_args:
parser_schema.add_argument(*arg_info[0], **arg_info[1])

def cdash_menu(self):
"""This method builds arguments for ``buildtest cdash`` command."""

Expand Down
54 changes: 0 additions & 54 deletions buildtest/cli/schema.py

This file was deleted.

21 changes: 0 additions & 21 deletions buildtest/cli/show.py
Original file line number Diff line number Diff line change
Expand Up @@ -509,25 +509,6 @@ def print_cdash_show():
console.print(table)


def print_schema_show():
"""This method will print help message for command ``buildtest show schema``"""

table = Table(title="Buildtest Schemas", show_lines=False)
table.add_column("Command", justify="left", style="cyan", overflow="fold")
table.add_column("Description", justify="left", style="magenta", overflow="fold")

table.add_row("buildtest schema", "Report all buildtest schema files")
table.add_row(
"buildtest schema -n script.schema.json -e ",
"Show example for schema type script-v1.0-schema.json",
)
table.add_row(
"buildtest schema -n script.schema.json -j",
"Show content of JSON schema for script.schema.json",
)
console.print(table)


def print_stylecheck_show():
"""This method will print help message for command ``buildtest show stylecheck``"""

Expand Down Expand Up @@ -635,8 +616,6 @@ def buildtest_show(command):
print_history_show()
elif command == "cdash":
print_cdash_show()
elif command == "schema":
print_schema_show()
elif command in ["stylecheck", "style"]:
print_stylecheck_show()
elif command in ["unittests", "test"]:
Expand Down
4 changes: 0 additions & 4 deletions buildtest/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
)
from buildtest.cli.path import path_cmd
from buildtest.cli.report import Report, report_cmd
from buildtest.cli.schema import schema_cmd
from buildtest.cli.show import buildtest_show
from buildtest.cli.stats import stats_cmd
from buildtest.config import SiteConfiguration
Expand Down Expand Up @@ -139,9 +138,6 @@ def main():
configuration=configuration,
report_file=report_file,
)
# running buildtest schema
elif args.subcommands == "schema":
schema_cmd(args)

# running buildtest cdash
elif args.subcommands == "cdash":
Expand Down
16 changes: 0 additions & 16 deletions docs/features.rst
Original file line number Diff line number Diff line change
Expand Up @@ -313,22 +313,6 @@ along with configuration file and output of log file during the report.

.. command-output:: buildtest debugreport

Example Configurations
~~~~~~~~~~~~~~~~~~~~~~~

buildtest provides a few example configurations for configuring buildtest this
can be retrieved by running ``buildtest schema -n settings.schema.json --examples``
or short option (``-e``), which will validate each example with schema file
``settings.schema.json``.

.. dropdown:: ``buildtest schema -n settings.schema.json -e``

.. command-output:: buildtest schema -n settings.schema.json -e

If you want to retrieve full json schema file for buildtest configuration you can
run ``buildtest schema -n settings.schema.json --json`` or short option ``-j``.


Accessing Log File
--------------------

Expand Down
1 change: 0 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ Useful Links
getting_started
writing_buildspecs
features
schema_examples
facility_examples
api
command
Expand Down
138 changes: 0 additions & 138 deletions docs/schema_examples.rst

This file was deleted.

Loading

0 comments on commit 905a1d7

Please sign in to comment.