Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#359: remove/obsolete subcommands #384

Merged
merged 3 commits into from
Mar 13, 2019
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 in 'split-input':
kmyk marked this conversation as resolved.
Show resolved Hide resolved
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.