-
Notifications
You must be signed in to change notification settings - Fork 375
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
Make 'create_problem' command work and add options #2256
base: master
Are you sure you want to change the base?
Conversation
properly assign 'types' to match Django's new rules initialize fields of 'time_limit', 'memory_limit', and 'points' to be able to save the model add options '--partial-points' and '--all-languages' to make added problems immediately usable in automation
problem.time_limit = options["time_limit"] | ||
problem.memory_limit = options["memory_limit"] | ||
problem.points = options["points"] | ||
if options['pr_pts']: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this if
necessary? It seems we can just do
problem.partial = options['pr_pts']
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wrote this for not assuming the default value of this field, i.e., if Allows partial points
is enabled by default at some points, the code should still work, though I don't have strong opinions about this.
Co-authored-by: Evan Zhang <[email protected]>
Correction for the build #5492
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed for the build #5492
Codecov ReportPatch coverage has no change and project coverage change:
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. Additional details and impacted files@@ Coverage Diff @@
## master #2256 +/- ##
==========================================
- Coverage 47.05% 47.00% -0.05%
==========================================
Files 249 249
Lines 13209 13222 +13
==========================================
Hits 6215 6215
- Misses 6994 7007 +13
☔ View full report in Codecov by Sentry. |
Corresponding to the issue #2255
Commit details:
types
to match Django's new rulestime_limit
,memory_limit
, andpoints
to be able to save the model--partial-points
and--all-languages
to make added problems immediately usable in automation