Skip to content

Commit

Permalink
Add flag for ignoring expected scores
Browse files Browse the repository at this point in the history
  • Loading branch information
MasloMaslane committed Apr 5, 2024
1 parent 1669bb7 commit 61e7324
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/sinol_make/commands/run/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,9 @@ def configure_subparser(self, subparser):
help='path to oiejq executable (default: `~/.local/bin/oiejq`)')
parser.add_argument('-a', '--apply-suggestions', dest='apply_suggestions', action='store_true',
help='apply suggestions from expected scores report')
parser.add_argument('--ignore-expected', dest='ignore_expected', action='store_true',
help='ignore expected scores from config.yml. When this flag is set, '
'the expected scores are not compared with the actual scores.')
add_compilation_arguments(parser)
return parser

Expand Down Expand Up @@ -1238,6 +1241,11 @@ def run(self, args):

results, all_results = self.compile_and_run(solutions)
self.check_errors(all_results)
if self.args.ignore_expected:
print(util.warning("Ignoring expected scores."))
self.exit()
return

try:
validation_results = self.validate_expected_scores(results)
except Exception:
Expand Down
4 changes: 4 additions & 0 deletions src/sinol_make/commands/verify/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ def configure_subparser(self, subparser):
help=f'number of cpus that sinol-make will use '
f'(default: {util.default_cpu_count()})',
default=util.default_cpu_count())
parser.add_argument('--ignore-expected', dest='ignore_expected', action='store_true',
help='ignore expected scores from config.yml. When this flag is set, '
'the expected scores are not compared with the actual scores. '
'This flag will be passed to the run command.')
parsers.add_compilation_arguments(parser)

def remove_cache(self):
Expand Down

0 comments on commit 61e7324

Please sign in to comment.