problem_yaml

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 23, 2024 License: AGPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParserAndIdentifier

func ParserAndIdentifier(opts ...Option) (problems.ConfigParser, problems.ConfigIdentifier)

Types

type Attachment

type Attachment struct {
	Name string
	Path string
}

type Checker

type Checker struct {
	Type string `yaml:"type"`
	Path string `yaml:"path"`
}

type Option

type Option func(*config)

func CompileBinaries

func CompileBinaries(compile bool) Option

type Problem

type Problem struct {
	Path                   string               `yaml:"-"`
	GeneratedStatementList problems.Contents    `yaml:"-"`
	AttachmentList         problems.Attachments `yaml:"-"`

	ShortName      string       `yaml:"shortname"`
	TitleList      []Title      `yaml:"titles"`
	StatementList  []Statement  `yaml:"statements"`
	AttachmentInfo []Attachment `yaml:"attachments"`

	Tests Tests `yaml:"tests"`
}

func (Problem) Attachments

func (p Problem) Attachments() problems.Attachments

func (Problem) Checker

func (p Problem) Checker() problems.Checker

func (Problem) EvaluationFiles added in v0.4.0

func (p Problem) EvaluationFiles() []problems.EvaluationFile

func (Problem) GetTaskType

func (p Problem) GetTaskType() problems.TaskType

func (Problem) InputOutputFiles

func (p Problem) InputOutputFiles() (string, string)

func (Problem) Languages

func (p Problem) Languages() []language.Language

func (Problem) MemoryLimit

func (p Problem) MemoryLimit() memory.Amount

func (Problem) Name

func (p Problem) Name() string

func (Problem) Statements

func (p Problem) Statements() problems.Contents

func (Problem) StatusSkeleton

func (p Problem) StatusSkeleton(name string) (*problems.Status, error)

func (Problem) Tags

func (p Problem) Tags() []string

func (Problem) TimeLimit

func (p Problem) TimeLimit() int

func (Problem) Titles

func (p Problem) Titles() problems.Contents

type Statement

type Statement struct {
	Language string
	Path     string
	Type     string
}

type Stub added in v0.6.0

type Stub struct {
	Lang string `yaml:"lang"`
	Path string `yaml:"path"`
}

type Subtask

type Subtask struct {
	TestCount          int       `yaml:"test_count"`
	InputList          []string  `yaml:"input_list"`
	OutputList         []string  `yaml:"output_list"`
	InputPattern       string    `yaml:"input_pattern"`
	OutputPattern      string    `yaml:"output_pattern"`
	ZeroIndexedPattern bool      `yaml:"zero_indexed_pattern"`
	Scoring            string    `yaml:"scoring"`
	MaxScore           float64   `yaml:"max_score"`
	Scores             []float64 `yaml:"scores"`
}

type Tests added in v0.6.0

type Tests struct {
	TaskType     string   `yaml:"task_type"`
	TaskTypeArgs []string `yaml:"task_type_args"`

	Stubs              []Stub    `yaml:"stubs"`
	InputFile          string    `yaml:"input_file"`
	OutputFile         string    `yaml:"output_file"`
	MemoryLimit        int       `yaml:"memory_limit"`
	TimeLimit          float64   `yaml:"time_limit"`
	TestCount          int       `yaml:"test_count"`
	InputPattern       string    `yaml:"input_pattern"`
	OutputPattern      string    `yaml:"output_pattern"`
	InputList          []string  `yaml:"input_list"`
	OutputList         []string  `yaml:"output_list"`
	ZeroIndexedPattern bool      `yaml:"zero_indexed_pattern"`
	Checker            Checker   `yaml:"checker"`
	FeedbackType       string    `yaml:"feedback_type"`
	Scores             []float64 `yaml:"scores"`
	Subtasks           []Subtask `yaml:"subtasks"`
	// contains filtered or unexported fields
}

type Title

type Title struct {
	Language string
	Title    string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL