@jutge.org/toolkit 4.4.20 → 4.4.22

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.
@@ -121,16 +121,35 @@ Before using the toolkit, you should configure it with your preferences:
121
121
  jtk generate problem
122
122
  ```
123
123
 
124
- The toolkit will ask you for:
124
+ The flag `--kind` can be used to specify the type of problem to generate:
125
+ - `io`: The problem consists of reading input from standard input and writing output to standard output (use it for most problems and to be used by many programming languages).
126
+
127
+ - `funcs`: The problem consists of implementing one or more functions (use it for problems that require the user to implement specific functions that are tested directly with special compilers such as RunPython, RunHaskell or RunClojure).
128
+
129
+ ```bash
130
+ jtk generate problem --kind io
131
+ jtk generate problem --kind funcs
132
+ ```
133
+
134
+ In the `io` case, the toolkit will ask you for:
125
135
  - Problem title
126
136
  - Problem description
127
137
  - Original language
128
138
  - Programming language for the solution
139
+ - Other languages for the statement
129
140
 
130
141
  Be specific about the problem description. Here is a possible example:
131
142
 
132
143
  > The task is to read all numbers in the input and print how much of them are prime numbers. Add a cute, short story around it. The input will only contain natural numbers less than 2^32-1.
133
144
 
145
+ In the `funcs` case, the toolkit will ask you for:
146
+ - Problem title
147
+ - Problem description (do not describe the functions yet)
148
+ - Specification of the functions to implement (this is the place to describe the functions, their headers uses to be enough)
149
+ - Original language
150
+ - Programming language for the solution
151
+ - Other languages for the statement
152
+
134
153
  2. **Review the generated content** in the `my-problem.pbm` directory.
135
154
 
136
155
  ### Building Your Problem
@@ -188,12 +188,19 @@ updated_at: 2026-01-13T12:47:12.884Z
188
188
 
189
189
  Statement metadata is stored using YAML syntax in files named `problem.lang.yml`, where `lang` denotes the language code for which the metadata is given (`en`, `es`, `ca`, ...).
190
190
 
191
+ A problem should have one unique original language and may have several translations. All translations should refer to the same original language. The system will find the original author through it.
192
+
191
193
  In the case that `lang` denotes the original language of the problem, `problem.lang.yml` should contain the following fields:
192
194
 
193
195
  - `title`: Title of the problem in the original language.
194
196
  - `author`: Full name of the problem setter.
195
197
  - `email`: Email of the problem setter.
196
198
 
199
+ It can also contain the following fields:
200
+
201
+ - `event`: Name of the event for which the problem was created.
202
+ - `date`: Date of the event for which the problem was created.
203
+
197
204
  If `lang` denotes a translation, `problem.lang.yml` should contain the following fields:
198
205
 
199
206
  - `title`: Title of the problem in the translated language.
@@ -201,7 +208,12 @@ If `lang` denotes a translation, `problem.lang.yml` should contain the following
201
208
  - `translator_email`: Email of the problem translator.
202
209
  - `original_language`: Code for the original language of the problem.
203
210
 
204
- A problem should have one unique original language and may have several translations. All translations should refer to the same original language [CHECK]. The system will find the original author through it.
211
+ It can also contain the following fields:
212
+
213
+ - `event`: Name of the event for which the problem was created.
214
+ - `date`: Date of the event for which the problem was created.
215
+
216
+ If the `event` and `date` fields are not given for a translation, the system will use the values of the original language.
205
217
 
206
218
  All the values for the metadata fields should be given as Unicode-based plain text. Remember to enclose them in quotes if they contain special characters such as `:` or `'`.
207
219
 
@@ -246,6 +258,8 @@ There are also optional arguments that may be used:
246
258
 
247
259
  - `presentation_error`: If set to `1` (by default), the PE (Presentation Error) verdict will be enabled. Otherwise, the verdict will be WA (Wrong Answer) if the files are not identical.
248
260
 
261
+ - `tolerance`: Tolerance for the graphic checker. It is a number between 0 and 1.
262
+
249
263
  - `solution`: Programming language of the golden solution. By default, it is C++. Currently supported programming languages are C, C++, Java, Python3, Haskell, Clojure, Rust, RunPython, RunHaskell, and RunClojure.
250
264
 
251
265
  - `pylibs`: Problems in Python can allow the usage of certain non-standard Python libraries. `pylibs` is a list of libraries that may be used to solve the current problem. For instance, `pylibs: [numpy, networkx]`. By default, this list is empty. Available libraries are at https://jutge.org/documentation/pylibs.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@jutge.org/toolkit",
3
3
  "description": "Toolkit to prepare problems for Jutge.org",
4
- "version": "4.4.20",
4
+ "version": "4.4.22",
5
5
  "homepage": "https://jutge.org",
6
6
  "author": {
7
7
  "name": "Jutge.org",