Skip to content

Add content error for unset sig figs bounds - #822

Merged
sjd210 merged 4 commits into
mainfrom
hotfix/sig-figs-content-error
Aug 20, 2026
Merged

Add content error for unset sig figs bounds#822
sjd210 merged 4 commits into
mainfrom
hotfix/sig-figs-content-error

Conversation

@axlewin

@axlewin axlewin commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@codecov

codecov Bot commented Aug 18, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 25.00000% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 41.00%. Comparing base (d9c5d5a) to head (3f20f91).

Files with missing lines Patch % Lines
...ava/uk/ac/cam/cl/dtg/segue/etl/ContentIndexer.java 25.00% 9 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #822   +/-   ##
=======================================
  Coverage   41.00%   41.00%           
=======================================
  Files         550      550           
  Lines       23602    23606    +4     
  Branches     2848     2851    +3     
=======================================
+ Hits         9678     9680    +2     
- Misses      13052    13054    +2     
  Partials      872      872           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

if (null == q.getSignificantFiguresMin() && null == q.getSignificantFiguresMax()) {
this.registerContentProblem(content, "Numeric Question: " + q.getId() + " has no "
+ "significant figure bounds set. If this question does not use significant figures then "
+ "'exact answers only' should be set.", indexProblemCache);

@sjd210 sjd210 Aug 19, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any reason why this isn't also being applied to coordinate questions? As far as I can tell, they have the same behaviour on a significant figure not being set, so they ought to have the same error! (If it's just because it wasn't requested, then I request it instead).

Similarly, the 'one significant figure' bound message is different for the two question types, but I'm not sure why.

  • and may be unanswerable as a result. Please add both upper and lower significant figure bounds, or set 'exact answers only'.
  • Sig figs will be ignored for this question; add both min and max to fix this.

I prefer the former one - I think it's more accurate.

If there IS a reason for these differences, then this is fine. The content error works.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No reason as far as I know; bizarrely the "...has broken significant figures rules" error message has been copy & pasted between the two question types, it's just the first error message that is different 🤷 I'll copy the numeric q feedback over to coord qs; given we're only using it twice, I don't think it's worth introducing a constant for consistency.

We're also not currently checking for disregardSignificantFIgures before performing sig fig bounds checks for coord qs. That might as well be made consistent with numeric qs, too.

@sjd210
sjd210 merged commit b0d54fb into main Aug 20, 2026
5 checks passed
@sjd210
sjd210 deleted the hotfix/sig-figs-content-error branch August 20, 2026 09:06
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.

2 participants