rbx.cp 0.7.0__py3-none-any.whl → 0.9.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. rbx/box/cd.py +2 -2
  2. rbx/box/cli.py +87 -33
  3. rbx/box/code.py +133 -84
  4. rbx/box/contest/build_contest_statements.py +2 -2
  5. rbx/box/contest/contest_package.py +1 -1
  6. rbx/box/contest/main.py +29 -2
  7. rbx/box/environment.py +140 -80
  8. rbx/box/formatting.py +2 -1
  9. rbx/box/global_package.py +74 -0
  10. rbx/box/package.py +11 -24
  11. rbx/box/packaging/__init__.py +0 -0
  12. rbx/box/packaging/boca/__init__.py +0 -0
  13. rbx/box/packaging/polygon/packager.py +3 -3
  14. rbx/box/presets/__init__.py +369 -53
  15. rbx/box/presets/lock_schema.py +42 -2
  16. rbx/box/presets/schema.py +4 -0
  17. rbx/box/remote.py +21 -2
  18. rbx/box/retries.py +3 -2
  19. rbx/box/sanitizers/warning_stack.py +5 -5
  20. rbx/box/solutions.py +37 -25
  21. rbx/box/statements/build_statements.py +6 -6
  22. rbx/box/statements/builders.py +1 -1
  23. rbx/box/stats.py +10 -0
  24. rbx/box/stresses.py +47 -66
  25. rbx/box/stressing/finder_parser.py +11 -16
  26. rbx/box/tasks.py +33 -22
  27. rbx/box/testcase_utils.py +3 -3
  28. rbx/box/tooling/boca/scraper.py +1 -1
  29. rbx/grading/caching.py +98 -47
  30. rbx/grading/debug_context.py +31 -0
  31. rbx/grading/grading_context.py +96 -0
  32. rbx/grading/judge/cacher.py +93 -21
  33. rbx/grading/judge/sandbox.py +8 -4
  34. rbx/grading/judge/sandboxes/isolate.py +3 -2
  35. rbx/grading/judge/sandboxes/stupid_sandbox.py +3 -2
  36. rbx/grading/judge/sandboxes/timeit.py +1 -1
  37. rbx/grading/judge/storage.py +170 -35
  38. rbx/grading/profiling.py +126 -0
  39. rbx/grading/steps.py +46 -17
  40. rbx/grading/steps_with_caching.py +52 -26
  41. rbx/resources/envs/default.rbx.yml +2 -3
  42. rbx/resources/envs/isolate.rbx.yml +2 -3
  43. rbx/resources/presets/default/contest/.gitignore +6 -0
  44. rbx/resources/presets/default/contest/contest.rbx.yml +14 -1
  45. rbx/resources/presets/default/contest/statement/contest.rbx.tex +24 -86
  46. rbx/resources/presets/default/contest/statement/instructions.tex +40 -0
  47. rbx/resources/presets/default/contest/statement/logo.png +0 -0
  48. rbx/resources/presets/default/env.rbx.yml +67 -0
  49. rbx/resources/presets/default/preset.rbx.yml +6 -2
  50. rbx/resources/presets/default/problem/.gitignore +1 -1
  51. rbx/resources/presets/default/problem/problem.rbx.yml +12 -8
  52. rbx/resources/presets/default/shared/contest_template.rbx.tex +57 -0
  53. rbx/resources/presets/default/shared/icpc.sty +322 -0
  54. rbx/resources/presets/default/shared/problem_template.rbx.tex +57 -0
  55. rbx/submitors/codeforces.py +3 -2
  56. rbx/test.py +1 -1
  57. rbx/utils.py +6 -1
  58. {rbx_cp-0.7.0.dist-info → rbx_cp-0.9.0.dist-info}/METADATA +4 -1
  59. {rbx_cp-0.7.0.dist-info → rbx_cp-0.9.0.dist-info}/RECORD +67 -58
  60. rbx/resources/presets/default/contest/statement/olymp.sty +0 -250
  61. rbx/resources/presets/default/contest/statement/template.rbx.tex +0 -42
  62. rbx/resources/presets/default/problem/statement/olymp.sty +0 -250
  63. rbx/resources/presets/default/problem/statement/template.rbx.tex +0 -89
  64. /rbx/resources/presets/default/problem/{gen.cpp → gens/gen.cpp} +0 -0
  65. /rbx/resources/presets/default/problem/{tests → manual_tests}/samples/000.in +0 -0
  66. /rbx/resources/presets/default/problem/{tests → manual_tests}/samples/001.in +0 -0
  67. /rbx/resources/presets/default/problem/{random.py → testplan/random.py} +0 -0
  68. /rbx/resources/presets/default/problem/{random.txt → testplan/random.txt} +0 -0
  69. {rbx_cp-0.7.0.dist-info → rbx_cp-0.9.0.dist-info}/LICENSE +0 -0
  70. {rbx_cp-0.7.0.dist-info → rbx_cp-0.9.0.dist-info}/WHEEL +0 -0
  71. {rbx_cp-0.7.0.dist-info → rbx_cp-0.9.0.dist-info}/entry_points.txt +0 -0
@@ -1,250 +0,0 @@
1
- % Copyright (c) 2005-2013 Olymp.sty Developers Group.
2
- % See https://github.com/GassaFM/olymp.sty/blob/master/AUTHORS
3
- % for the complete list of authors.
4
-
5
- %\ProvidesPackage{olymp}
6
- \usepackage{verbatim}
7
- \usepackage{xstring}
8
-
9
- % \makeatletter
10
- % \newcommand\FirstWord[1]{\@firstword#1 \@nil}%
11
- % \def\@firstword#1 #2\@nil{\@removecomma#1,\@nil}%
12
- % \def\@removecomma#1,#2\@nil{\@removeperiod#1.\@nil}
13
- % \def\@removeperiod#1.#2\@nil{\@removesemicolon#1;\@nil}
14
- % \def\@removesemicolon#1;#2\@nil{#1}
15
- % \makeatother
16
- \newcommand\FirstWord[1]{#1}
17
-
18
- \ProcessOptions\relax
19
-
20
- \setlength{\parindent}{0pt}
21
- \setlength{\parskip}{0.8em}
22
-
23
- % contest keywords definitions
24
- \def\conProblemTutorial{Problem Tutorial}
25
- \def\conProblem{Problem}
26
- \def\conProblemAuthor{Author:}
27
- \def\conProblemDeveloper{Developer:}
28
- \def\conProblemOrigin{Origin:}
29
- \def\conInputFileName{Input file:}
30
- \def\conOutputFileName{Output file:}
31
- \def\conTimeLimit{Time limit:}
32
- \def\conMemoryLimit{Memory limit:}
33
- \def\conFeedback{Feedback:}
34
- \def\constdin{standard input}
35
- \def\constdout{standard output}
36
- \def\conSpecification{Specification}
37
- \def\conInteraction{Interaction Protocol}
38
- \def\conInput{Input}
39
- \def\conOutput{Output}
40
- \def\conExample{Example}
41
- \def\conExamples{Examples}
42
- \def\conExampleNotes{Notes}
43
- \def\conExplanation{Explanation}
44
- \def\conExplanations{Explanations}
45
- \def\conIllustration{Illustration}
46
- \def\conScoring{Scoring}
47
- \def\conNote{Note}
48
- \def\conNotes{Notes}
49
- \def\conConstraints{Constraints}
50
- \def\conversion{version}
51
- \def\conrevision{revision}
52
- \def\conSubtaskOne{Subtask 1}
53
- \def\conSubtaskTwo{Subtask 2}
54
- \def\conSubtaskThree{Subtask 3}
55
- \def\conSubtaskFour{Subtask 4}
56
- \def\conSubtaskFive{Subtask 5}
57
- \def\conSubtaskSix{Subtask 6}
58
- \def\conSubtask{Subtask}
59
- \def\conpoints{points}
60
- \def\conPage{Page}
61
- \def\conof{of}
62
- \def\connotstated{not stated}
63
- \def\conIntentionallyBlankPage{This page is intentionally left blank}
64
- \def\conTimeSuffix{s}
65
- \def\conMemorySufix{mb}
66
-
67
- % fancyhdr
68
-
69
- % font
70
-
71
- \newcommand{\afterfrontpage}{
72
- \vspace*{\fill}
73
- \begin{center}
74
- \problemheadfont\conIntentionallyBlankPage
75
- \end{center}
76
- \vspace*{\fill}
77
- \clearpage
78
- }
79
- \newcommand{\problemheadfont}{\LARGE}
80
- \newcommand{\problemsectionfont}{\Large}
81
- \newcommand{\problemtextfont}{\normalsize}
82
- \newcommand{\beforeproblemsectioncaption}{\smallbreak\smallskip}
83
- \newcommand{\afterproblemsectioncaption}{\smallskip}
84
- \newcommand{\problemend}{
85
- \clearpage
86
- \ifintentionallyblankpages
87
- \ifodd\value{page}
88
- \else
89
- \afterfrontpage
90
- \fi
91
- \fi
92
- }
93
- \def\presectionspacing{\hspace{3mm}}
94
-
95
- % section commands from olymp
96
-
97
- \newcommand{\createsection}{\@newsection}
98
-
99
- \def\@newsection#1#2{\DeclareRobustCommand{#1}{
100
- {\beforeproblemsectioncaption\bf\problemsectionfont\presectionspacing{#2}}
101
- \nopagebreak\par\afterproblemsectioncaption}
102
- }
103
-
104
- \newcommand{\createsectionpar}{\@newsectionpar}
105
-
106
- \def\@newsectionpar#1#2{\DeclareRobustCommand{#1}[1]{
107
- {\beforeproblemsectioncaption\bf\problemsectionfont{#2~##1}}
108
- \nopagebreak\par\afterproblemsectioncaption}
109
- }
110
-
111
- \newcommand{\createsectionpartwo}{\@newsectionpartwo}
112
-
113
- \def\@newsectionpartwo#1#2#3{\DeclareRobustCommand{#1}[2]{
114
- {\beforeproblemsectioncaption\problemsectionfont{\textbf{#2}~\textbf{##1}~(##2~#3)}}
115
- \nopagebreak\par\afterproblemsectioncaption}
116
- }
117
-
118
- \createsection{\Instructions}{\conInstructions}
119
- \createsection{\Specification}{\conSpecification}
120
- \createsection{\Interaction}{\conInteraction}
121
- \createsection{\InputFile}{\conInput}
122
- \createsection{\OutputFile}{\conOutput}
123
- \createsection{\Example}{\conExample}
124
- \createsection{\Examples}{\conExamples}
125
- \createsection{\Explanation}{\conExplanation}
126
- \createsection{\Explanations}{\conExplanations}
127
- \createsection{\Illustration}{\conIllustration}
128
- \createsection{\Scoring}{\conScoring}
129
- \createsection{\Note}{\conNote}
130
- \createsection{\Notes}{\conNotes}
131
- \createsection{\Constraints}{\conConstraints}
132
- \createsection{\SubtaskOne}{\conSubtaskOne}
133
- \createsection{\SubtaskTwo}{\conSubtaskTwo}
134
- \createsection{\SubtaskThree}{\conSubtaskThree}
135
- \createsection{\SubtaskFour}{\conSubtaskFour}
136
- \createsection{\SubtaskFive}{\conSubtaskFive}
137
- \createsection{\SubtaskSix}{\conSubtaskSix}
138
- \createsectionpar{\Subtask}{\conSubtask}
139
- \createsectionpartwo{\SubtaskWithCost}{\conSubtask}{\conpoints}
140
- \createsection{\Editorial}{\conEditorial}
141
-
142
- % frontpage
143
- \newenvironment{frontpage}[3]{
144
- \thispagestyle{empty}
145
- {\centering
146
- \noindent\rule{18cm}{0.4pt}
147
-
148
- \vspace{1cm}
149
- %\includegraphics[width=0.15\textwidth]{example-image-1x1}\par\vspace{1cm}
150
- {\LARGE #1\par}
151
- %\vspace{1cm}
152
- {\Large #2\par}
153
- \vspace{1cm}}
154
- \def\thisFrontPageDate{#3}
155
- \Instructions
156
- }{
157
- \vspace*{\fill}
158
- \centering{\Large \thisFrontPageDate\par}
159
- \centering\noindent\rule{18cm}{0.4pt}
160
- \newpage
161
- }
162
-
163
- % problem
164
- \newcounter{ProblemCounter}
165
-
166
- \newenvironment{problem}[6][]{
167
-
168
- \def\ProblemLetter{#1}
169
- \stepcounter{ProblemCounter}
170
- \begin{center}
171
- \ifx\ProblemLetter\empty
172
- \else
173
- \problemtextfont\textbf{\conProblem\ \ProblemLetter} \\
174
- \fi
175
- \problemheadfont\textsf{#2} \\
176
- \ifx#5\empty
177
- \else
178
- \problemtextfont{\conTimeLimit\ #5} \\
179
- \fi
180
- \ifx#6\empty
181
- \else
182
- \problemtextfont{\conMemoryLimit\ #6} \\
183
- \fi
184
- %\problemtextfont{\conSourceFileName\ \ProblemLetter\ \conSourceExts} \\
185
- \vspace{0.3cm}
186
- \noindent\rule{16cm}{0.4pt}
187
- \end{center}
188
- \problemtextfont
189
- \newcommand{\InputFileName}{#3}
190
- \newcommand{\OutputFileName}{#4}
191
- }{\problemend}
192
-
193
- % examples
194
- % -- Setup sizes --
195
- \newlength{\thelinewidth}
196
- \newlength{\exmpwidinf}
197
- \newlength{\exmpwidouf}
198
- \newlength{\exmpwidewid}
199
- \newlength{\exmpthreewidinf}
200
- \newlength{\exmpthreewidouf}
201
- \newlength{\exmpthreewidnote}
202
-
203
- \thelinewidth=\textwidth
204
- \exmpwidinf=0.43\thelinewidth
205
- \exmpwidouf=0.43\thelinewidth
206
- \exmpwidewid=0.9\thelinewidth
207
- \exmpthreewidinf=0.28\thelinewidth
208
- \exmpthreewidouf=0.28\thelinewidth
209
- \exmpthreewidnote=0.30\thelinewidth
210
-
211
- \def\s@tm@cr@s{
212
- \def\widthin##1{\exmpwidinf=##1\relax}
213
- \def\widthout##1{\exmpwidouf=##1\relax}
214
- \def\stretchin##1{\advance\exmpwidinf by ##1\relax}
215
- \def\stretchout##1{\advance\exmpwidouf by ##1\relax}
216
- \@ifstar{
217
- \error Star must not be used in example environment any more
218
- }
219
- }
220
-
221
- % This is magic, which delete space after verbatiminput
222
- \addto@hook{\every@verbatim}{\topsep=0pt\relax}
223
-
224
- \newenvironment{example}[1][]{
225
- \s@tm@cr@s#1
226
- \ttfamily\obeyspaces\obeylines\frenchspacing
227
- \newcommand{\exmp}[2]{
228
- \begin{minipage}[t]{\exmpwidinf}\rightskip=0pt plus 1fill\relax##1\medskip\end{minipage}&
229
- \begin{minipage}[t]{\exmpwidouf}\rightskip=0pt plus 1fill\relax##2\medskip\end{minipage}\\
230
- \hline
231
- }
232
-
233
- \newcommand{\exmpfile}[2]{
234
- \exmp{
235
- \verbatiminput{##1}
236
- }{
237
- \verbatiminput{##2}
238
- }%
239
- }
240
-
241
- \begin{center}
242
- \begin{tabular}{|l|l|}
243
- \hline
244
- \multicolumn{1}{|c|}{\bf\texttt{\textbf{\InputFileName}}} &
245
- \multicolumn{1}{|c|}{\bf\texttt{\textbf{\OutputFileName}}} \\
246
- \hline
247
- }{
248
- \end{tabular}
249
- \end{center}
250
- }
@@ -1,89 +0,0 @@
1
-
2
- \documentclass[titlepage, oneside, a4paper]{article}
3
-
4
- \usepackage {import}
5
- \usepackage[margin=25mm, left=17mm, right=17mm]{geometry}
6
- \usepackage[utf8]{inputenc}
7
- \usepackage[english]{babel}
8
- \usepackage{amsmath}
9
- \usepackage{amssymb}
10
- \usepackage{fancyhdr}
11
- \usepackage{comment}
12
- \usepackage{olymp}
13
- \usepackage{epigraph}
14
- \usepackage{expdlist}
15
- \usepackage{graphicx}
16
- \usepackage{ulem}
17
- \usepackage{lastpage}
18
-
19
- %- if problem.blocks.preamble is defined
20
- \VAR{problem.blocks.preamble}
21
- %- endif
22
-
23
- \def\showSourceFileName{1}
24
- \newif\ifintentionallyblankpages % comment this out to add blank pages
25
-
26
- \pagestyle{fancy}
27
- \fancyhf{}
28
- \renewcommand{\footrulewidth}{0.4pt}
29
-
30
- \title{}
31
- \author{}
32
- \date{}
33
-
34
- \makeatletter
35
- \let\newtitle\@title
36
- \let\newauthor\@author
37
- \let\newdate\@date
38
- \makeatother
39
-
40
- \rhead{\newtitle}
41
- \lhead{\newauthor}
42
- \lfoot{\newdate}
43
- \rfoot{\thepage}
44
-
45
- \begin{document}
46
-
47
- \begin{problem}
48
- %- if problem.short_name is defined
49
- [\VAR{problem.short_name}]
50
- %- endif
51
- {\VAR{problem.title | escape}}
52
- {stdin}
53
- {stdout}
54
- {\VAR{problem.package.timeLimit / 1000 | round(1, 'floor')} s}
55
- {\VAR{problem.package.memoryLimit} MB}
56
-
57
- \VAR{problem.blocks.legend}
58
-
59
- %- if problem.blocks.input is defined
60
- \InputFile
61
- \VAR{problem.blocks.input}
62
- %- endif
63
-
64
- %- if problem.blocks.output is defined
65
- \OutputFile
66
- \VAR{problem.blocks.output}
67
- %- endif
68
-
69
- \Examples
70
-
71
- %- for sample in problem.samples
72
- \begin{example}
73
- \exmpfile{\VAR{sample.inputPath}}{\VAR{sample.outputPath if sample.outputPath is not none else ''}}%
74
- \end{example}
75
- %- endfor
76
-
77
- %- if problem.blocks.notes is defined
78
- \Notes
79
- \VAR{problem.blocks.notes}
80
- %- endif
81
-
82
- %- if problem.blocks.editorial is defined
83
- \Editorial
84
- \VAR{problem.blocks.editorial}
85
- %- endif
86
-
87
- \end{problem}
88
-
89
- \end{document}
File without changes