Skip to content

Commit

Permalink
Merge pull request #384 from kmyk/issue/359b
Browse files Browse the repository at this point in the history
#359: remove/obsolete subcommands
  • Loading branch information
fukatani authored Mar 13, 2019
2 parents f231af6 + 750831b commit 4b74843
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 83 deletions.
47 changes: 0 additions & 47 deletions onlinejudge/_implementation/command/code_statistics.py

This file was deleted.

14 changes: 3 additions & 11 deletions onlinejudge/_implementation/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import onlinejudge.__about__ as version
import onlinejudge._implementation.logging as log
import onlinejudge._implementation.utils as utils
from onlinejudge._implementation.command.code_statistics import code_statistics
from onlinejudge._implementation.command.download import download
from onlinejudge._implementation.command.generate_output import generate_output
from onlinejudge._implementation.command.get_standings import get_standings
Expand Down Expand Up @@ -165,7 +164,7 @@ def get_parser() -> argparse.ArgumentParser:
subparser.add_argument('--ignore-backup', action='store_true', help='ignore backup files and hidden files (i.e. files like "*~", "\\#*\\#" and ".*") (default)')

# split input
subparser = subparsers.add_parser('split-input', aliases=['s/i'], help='split a input file which contains many cases, using your implementation', formatter_class=argparse.RawTextHelpFormatter, epilog='''\
subparser = subparsers.add_parser('split-input', help='split a input file which contains many cases, using your implementation (experimental)', formatter_class=argparse.RawTextHelpFormatter, epilog='''\
format string for --output:
%i index
Expand Down Expand Up @@ -230,13 +229,8 @@ def get_parser() -> argparse.ArgumentParser:
subparser.add_argument('-c', '--command', default='./a.out', help='your solution to be tested. (default: "./a.out")')
subparser.add_argument('judge', help='judge program using standard I/O')

# code statistics
subparser = subparsers.add_parser('code-statistics', aliases=['c/s'], help='print the code statistics used in Anarchy Golf', formatter_class=argparse.RawTextHelpFormatter, epilog='''\
''')
subparser.add_argument('file')

# get standings
subparser = subparsers.add_parser('get-standings', help='get and print the standings', formatter_class=argparse.RawTextHelpFormatter, epilog='''\
subparser = subparsers.add_parser('get-standings', help='get and print the standings (experimental)', formatter_class=argparse.RawTextHelpFormatter, epilog='''\
supported services:
Topcoder (Marathon Match)
''')
Expand Down Expand Up @@ -266,10 +260,8 @@ def run_program(args: argparse.Namespace, parser: argparse.ArgumentParser) -> No
test_reactive(args)
elif args.subcommand in ['generate-output', 'g/o']:
generate_output(args)
elif args.subcommand in ['split-input', 's/i']:
elif args.subcommand == 'split-input':
split_input(args)
elif args.subcommand in ['code-statistics', 'c/s']:
code_statistics(args)
elif args.subcommand == 'get-standings':
get_standings(args)
else:
Expand Down
1 change: 0 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ Tools for online judge services. Downloading sample cases, Testing/Submitting yo
- Test your solution for reactive problem
- Generate output files from input and reference implementation
- Split an input file with many cases to files
- Print the code statistics used in Anarchy Golf

## How to install

Expand Down
24 changes: 0 additions & 24 deletions tests/command_code_statistics.py

This file was deleted.

0 comments on commit 4b74843

Please sign in to comment.