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

omegaUp API change for "Restaurando el comando de instalar las dependencias de yarn (#7770)" #435

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all 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
96 changes: 46 additions & 50 deletions omegaup/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -15398,43 +15398,46 @@ def createVirtual(
def create(
self,
*,
admission_mode: Optional[Any] = None,
alias: Optional[Any] = None,
finish_time: int,
start_time: int,
submissions_gap: int,
window_length: int,
admission_mode: Optional[str] = None,
alias: Optional[str] = None,
check_plagiarism: Optional[bool] = None,
contest_for_teams: Optional[bool] = None,
description: Optional[Any] = None,
feedback: Optional[Any] = None,
finish_time: Optional[Any] = None,
languages: Optional[Any] = None,
description: Optional[str] = None,
feedback: Optional[str] = None,
languages: Optional[str] = None,
needs_basic_information: Optional[bool] = None,
penalty: Optional[Any] = None,
penalty_calc_policy: Optional[Any] = None,
penalty_type: Optional[Any] = None,
points_decay_factor: Optional[Any] = None,
penalty: Optional[int] = None,
penalty_calc_policy: Optional[str] = None,
penalty_type: Optional[str] = None,
points_decay_factor: Optional[float] = None,
problems: Optional[str] = None,
requests_user_information: Optional[Any] = None,
requests_user_information: Optional[bool] = None,
score_mode: Optional[str] = None,
scoreboard: Optional[Any] = None,
show_scoreboard_after: Optional[Any] = None,
start_time: Optional[Any] = None,
submissions_gap: Optional[Any] = None,
scoreboard: Optional[float] = None,
show_scoreboard_after: Optional[bool] = None,
teams_group_alias: Optional[str] = None,
title: Optional[Any] = None,
window_length: Optional[int] = None,
title: Optional[str] = None,
# Out-of-band parameters:
files_: Optional[Mapping[str, BinaryIO]] = None,
check_: bool = True,
timeout_: datetime.timedelta = _DEFAULT_TIMEOUT) -> None:
r"""Creates a new contest

Args:
finish_time:
start_time:
submissions_gap:
window_length:
admission_mode:
alias:
check_plagiarism:
contest_for_teams:
description:
feedback:
finish_time:
languages:
needs_basic_information:
penalty:
Expand All @@ -15446,41 +15449,41 @@ def create(
score_mode:
scoreboard:
show_scoreboard_after:
start_time:
submissions_gap:
teams_group_alias:
title:
window_length:

Returns:
The API result object.
"""
parameters: Dict[str, str] = {}
parameters: Dict[str, str] = {
'finish_time': str(finish_time),
'start_time': str(start_time),
'submissions_gap': str(submissions_gap),
'window_length': str(window_length),
}
if admission_mode is not None:
parameters['admission_mode'] = str(admission_mode)
parameters['admission_mode'] = admission_mode
if alias is not None:
parameters['alias'] = str(alias)
parameters['alias'] = alias
if check_plagiarism is not None:
parameters['check_plagiarism'] = str(check_plagiarism)
if contest_for_teams is not None:
parameters['contest_for_teams'] = str(contest_for_teams)
if description is not None:
parameters['description'] = str(description)
parameters['description'] = description
if feedback is not None:
parameters['feedback'] = str(feedback)
if finish_time is not None:
parameters['finish_time'] = str(finish_time)
parameters['feedback'] = feedback
if languages is not None:
parameters['languages'] = str(languages)
parameters['languages'] = languages
if needs_basic_information is not None:
parameters['needs_basic_information'] = str(
needs_basic_information)
if penalty is not None:
parameters['penalty'] = str(penalty)
if penalty_calc_policy is not None:
parameters['penalty_calc_policy'] = str(penalty_calc_policy)
parameters['penalty_calc_policy'] = penalty_calc_policy
if penalty_type is not None:
parameters['penalty_type'] = str(penalty_type)
parameters['penalty_type'] = penalty_type
if points_decay_factor is not None:
parameters['points_decay_factor'] = str(points_decay_factor)
if problems is not None:
Expand All @@ -15494,16 +15497,10 @@ def create(
parameters['scoreboard'] = str(scoreboard)
if show_scoreboard_after is not None:
parameters['show_scoreboard_after'] = str(show_scoreboard_after)
if start_time is not None:
parameters['start_time'] = str(start_time)
if submissions_gap is not None:
parameters['submissions_gap'] = str(submissions_gap)
if teams_group_alias is not None:
parameters['teams_group_alias'] = teams_group_alias
if title is not None:
parameters['title'] = str(title)
if window_length is not None:
parameters['window_length'] = str(window_length)
parameters['title'] = title
self._client.query('/api/contest/create/',
payload=parameters,
files_=files_,
Expand Down Expand Up @@ -16211,6 +16208,7 @@ def update(
*,
contest_alias: str,
finish_time: int,
start_time: int,
submissions_gap: int,
window_length: int,
admission_mode: Optional[str] = None,
Expand All @@ -16219,19 +16217,18 @@ def update(
contest_for_teams: Optional[bool] = None,
default_show_all_contestants_in_scoreboard: Optional[bool] = None,
description: Optional[str] = None,
feedback: Optional[Any] = None,
languages: Optional[Any] = None,
feedback: Optional[str] = None,
languages: Optional[str] = None,
needs_basic_information: Optional[bool] = None,
penalty: Optional[int] = None,
penalty_calc_policy: Optional[Any] = None,
penalty_type: Optional[Any] = None,
penalty_calc_policy: Optional[str] = None,
penalty_type: Optional[str] = None,
points_decay_factor: Optional[float] = None,
problems: Optional[str] = None,
requests_user_information: Optional[str] = None,
score_mode: Optional[str] = None,
scoreboard: Optional[float] = None,
show_scoreboard_after: Optional[bool] = None,
start_time: Optional[datetime.datetime] = None,
teams_group_alias: Optional[str] = None,
title: Optional[str] = None,
# Out-of-band parameters:
Expand All @@ -16244,6 +16241,7 @@ def update(
Args:
contest_alias:
finish_time:
start_time:
submissions_gap:
window_length:
admission_mode:
Expand All @@ -16264,7 +16262,6 @@ def update(
score_mode:
scoreboard:
show_scoreboard_after:
start_time:
teams_group_alias:
title:

Expand All @@ -16274,6 +16271,7 @@ def update(
parameters: Dict[str, str] = {
'contest_alias': contest_alias,
'finish_time': str(finish_time),
'start_time': str(start_time),
'submissions_gap': str(submissions_gap),
'window_length': str(window_length),
}
Expand All @@ -16291,18 +16289,18 @@ def update(
if description is not None:
parameters['description'] = description
if feedback is not None:
parameters['feedback'] = str(feedback)
parameters['feedback'] = feedback
if languages is not None:
parameters['languages'] = str(languages)
parameters['languages'] = languages
if needs_basic_information is not None:
parameters['needs_basic_information'] = str(
needs_basic_information)
if penalty is not None:
parameters['penalty'] = str(penalty)
if penalty_calc_policy is not None:
parameters['penalty_calc_policy'] = str(penalty_calc_policy)
parameters['penalty_calc_policy'] = penalty_calc_policy
if penalty_type is not None:
parameters['penalty_type'] = str(penalty_type)
parameters['penalty_type'] = penalty_type
if points_decay_factor is not None:
parameters['points_decay_factor'] = str(points_decay_factor)
if problems is not None:
Expand All @@ -16315,8 +16313,6 @@ def update(
parameters['scoreboard'] = str(scoreboard)
if show_scoreboard_after is not None:
parameters['show_scoreboard_after'] = str(show_scoreboard_after)
if start_time is not None:
parameters['start_time'] = str(int(start_time.timestamp()))
if teams_group_alias is not None:
parameters['teams_group_alias'] = teams_group_alias
if title is not None:
Expand Down
Loading