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

Allow coordinate questions to have n dimensions #663

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jsharkey13
Copy link
Member

This moves the validator to use the new list-of-strings representation of coordinates to allow an arbitrary number of dimensions in a coordinate.
There are some subtleties, because "ordering" the coordinates for comparison is complicated - as is the quadratic nature of the checking algorithm.

It also cleans up some log messages and comments for clarity, and adds unit tests.

#662 should be merged first, and deployed before this can safely be merged.

Instead of a hardcoded x and y value, now use a list of Strings to
represent the coordinates. This also requires the placeholders to be a
list of values too.

In order not to break existing questions whilst the changes are
deployed, we leave the existing x, y values in the model. Then the
content can be updated with both, and we can remove the deprecated
values in a later change.
This moves the validator to use the new list-of-strings representation
of coordinates to allow an arbitrary number of dimensions in a
coordinate.
There are some subtleties, because "ordering" the coordinates for
comparison is complicated - as is the quadratic nature of the checking
algorithm.

It also cleans up some log messages and comments for clarity.
@jsharkey13 jsharkey13 force-pushed the feature/n-dimensional-coordinates branch from 61f9112 to f677ade Compare December 11, 2024 17:44
Copy link

codecov bot commented Dec 11, 2024

Codecov Report

Attention: Patch coverage is 45.16129% with 34 lines in your changes missing coverage. Please review.

Project coverage is 34.67%. Comparing base (127dfc9) to head (f677ade).
Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
...am/cl/dtg/isaac/quiz/IsaacCoordinateValidator.java 64.51% 8 Missing and 3 partials ⚠️
...c/cam/cl/dtg/isaac/dos/content/CoordinateItem.java 38.46% 7 Missing and 1 partial ⚠️
...m/cl/dtg/isaac/dto/IsaacCoordinateQuestionDTO.java 0.00% 6 Missing ⚠️
...am/cl/dtg/isaac/dto/content/CoordinateItemDTO.java 0.00% 6 Missing ⚠️
.../cam/cl/dtg/isaac/dos/IsaacCoordinateQuestion.java 50.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #663      +/-   ##
==========================================
+ Coverage   34.41%   34.67%   +0.25%     
==========================================
  Files         521      521              
  Lines       23447    23475      +28     
  Branches     2874     2878       +4     
==========================================
+ Hits         8070     8140      +70     
+ Misses      14565    14506      -59     
- Partials      812      829      +17     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant