Пример #1
0
    def create_layout(contest_path, config):
        """Copies contest skeleton to contest_path and saves specified configurations

        Args:
            contest_path (Filepath)
        """
        ocimatic_dir = FilePath(__file__).directory()
        contest_skel = ocimatic_dir.chdir('resources', 'contest-skel')
        contest_skel.copy_tree(contest_path, ['auto'])
        contest_dir = contest_path.get_or_create_dir()
        with FilePath(contest_dir,
                      '.ocimatic_contest').open('w') as config_file:
            json.dump(config, config_file, indent=4)
Пример #2
0
 def create_layout(task_path):
     ocimatic_dir = FilePath(__file__).directory()
     skel = ocimatic_dir.chdir('resources', 'task-skel')
     skel.copy_tree(task_path)