Skip to content

Commit

Permalink
import interactor
Browse files Browse the repository at this point in the history
  • Loading branch information
adilyas authored and niyaznigmatullin committed Nov 13, 2023
1 parent 62bd201 commit b82d201
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions polygon_cli/problem.py
Original file line number Diff line number Diff line change
Expand Up @@ -604,14 +604,11 @@ def read_tutorial(self, problem_node, directory, language):
return content

def save_statement_resource_files(self, directory):
example_pat = re.compile(r'example.\d*\.?a?')
skip_list = ['problem-properties.json', 'problem.tex', 'tutorial.tex']
for file in os.listdir(directory):
file_name = os.path.basename(file)
if os.path.isdir(file_name):
continue
if example_pat.fullmatch(file_name):
continue
if file_name in skip_list:
continue

Expand Down Expand Up @@ -798,6 +795,11 @@ def upload_file_from_node(node, type, tag=None):
checker_name = os.path.basename(checker_node.find('source').attrib['path'])
self.set_utility_file(checker_name, 'checker')

for interactor_node in assets_node.findall('interactor'):
interactor_name = os.path.basename(interactor_node.find('source').attrib['path'])
self.update_info(None, None, None, None, interactive='true')
self.set_utility_file(interactor_name, 'interactor')

validators_node = assets_node.find('validators')
if validators_node is not None:
for validator_node in validators_node.findall('validator'):
Expand Down

0 comments on commit b82d201

Please sign in to comment.