No description
  • Go 98.5%
  • Go Template 1.5%
Find a file
dependabot[bot] bbf50b45c9
Bump github.com/pelletier/go-toml/v2 from 2.2.4 to 2.3.0 (#19)
Bumps
[github.com/pelletier/go-toml/v2](https://github.com/pelletier/go-toml)
from 2.2.4 to 2.3.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/pelletier/go-toml/releases">github.com/pelletier/go-toml/v2's
releases</a>.</em></p>
<blockquote>
<h2>v2.3.0</h2>
<p>This is the first release built largely with the help of AI coding
agents. Highlights include the complete removal of the unsafe package.
go-toml is now fully safe Go code, with a geomean overhead of only ~1.4%
vs v2.2.4 and zero additional allocations on benchmarks. This release
also adds omitzero struct tag support, improves
UnmarshalText/Unmarshaler handling for tables and array tables, and
fixes several bugs including nil pointer marshaling, leap second
handling, and datetime unmarshaling panics.</p>
<!-- raw HTML omitted -->
<h2>What's Changed</h2>
<h3>What's new</h3>
<ul>
<li>marshal: don't escape quotes unnecessarily by <a
href="https://github.com/virtuald"><code>@​virtuald</code></a> in <a
href="https://redirect.github.com/pelletier/go-toml/pull/991">pelletier/go-toml#991</a></li>
<li>Add <code>omitzero</code> tag support by <a
href="https://github.com/NathanBaulch"><code>@​NathanBaulch</code></a>
in <a
href="https://redirect.github.com/pelletier/go-toml/pull/998">pelletier/go-toml#998</a></li>
<li>Support custom IsZero() methods with omitzero tag by <a
href="https://github.com/pelletier"><code>@​pelletier</code></a> in <a
href="https://redirect.github.com/pelletier/go-toml/pull/1020">pelletier/go-toml#1020</a></li>
<li>UnmarshalText fallbacks to struct unmarshaling for tables and arrays
by <a href="https://github.com/pelletier"><code>@​pelletier</code></a>
in <a
href="https://redirect.github.com/pelletier/go-toml/pull/1026">pelletier/go-toml#1026</a></li>
<li>[unstable] Support Unmarshaler interface for tables and array tables
by <a href="https://github.com/pelletier"><code>@​pelletier</code></a>
in <a
href="https://redirect.github.com/pelletier/go-toml/pull/1027">pelletier/go-toml#1027</a></li>
</ul>
<h3>Fixed bugs</h3>
<ul>
<li>Add missing UnmarshalTOML call by <a
href="https://github.com/pelletier"><code>@​pelletier</code></a> in <a
href="https://redirect.github.com/pelletier/go-toml/pull/996">pelletier/go-toml#996</a></li>
<li>Handle array table into an empty slice by <a
href="https://github.com/pelletier"><code>@​pelletier</code></a> in <a
href="https://redirect.github.com/pelletier/go-toml/pull/997">pelletier/go-toml#997</a></li>
<li>Unwrap strict errors by <a
href="https://github.com/bersace"><code>@​bersace</code></a> in <a
href="https://redirect.github.com/pelletier/go-toml/pull/1012">pelletier/go-toml#1012</a></li>
<li>Fix leap second handling found by fuzz by <a
href="https://github.com/pelletier"><code>@​pelletier</code></a> in <a
href="https://redirect.github.com/pelletier/go-toml/pull/1019">pelletier/go-toml#1019</a></li>
<li>Fix nil pointer map values not being marshaled by <a
href="https://github.com/pelletier"><code>@​pelletier</code></a> in <a
href="https://redirect.github.com/pelletier/go-toml/pull/1025">pelletier/go-toml#1025</a></li>
<li>Fix panic when unmarshaling datetime values to incompatible types
(<a
href="https://redirect.github.com/pelletier/go-toml/issues/1028">#1028</a>)
by <a href="https://github.com/pelletier"><code>@​pelletier</code></a>
in <a
href="https://redirect.github.com/pelletier/go-toml/pull/1029">pelletier/go-toml#1029</a></li>
<li>Fix parser error pointing to wrong line at EOF without trailing
newline by <a
href="https://github.com/pelletier"><code>@​pelletier</code></a> in <a
href="https://redirect.github.com/pelletier/go-toml/pull/1041">pelletier/go-toml#1041</a></li>
</ul>
<h3>Documentation</h3>
<ul>
<li>Improve Unmarshaling README by <a
href="https://github.com/heckelson"><code>@​heckelson</code></a> in <a
href="https://redirect.github.com/pelletier/go-toml/pull/1016">pelletier/go-toml#1016</a></li>
<li>Create AGENTS.md guidelines file by <a
href="https://github.com/pelletier"><code>@​pelletier</code></a> in <a
href="https://redirect.github.com/pelletier/go-toml/pull/1017">pelletier/go-toml#1017</a></li>
</ul>
<h3>Other changes</h3>
<ul>
<li>Unsafe package removal by <a
href="https://github.com/pelletier"><code>@​pelletier</code></a> in <a
href="https://redirect.github.com/pelletier/go-toml/pull/1021">pelletier/go-toml#1021</a></li>
<li>Bump CI and test scripts to Go 1.26 by <a
href="https://github.com/pelletier"><code>@​pelletier</code></a> in <a
href="https://redirect.github.com/pelletier/go-toml/pull/1030">pelletier/go-toml#1030</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/virtuald"><code>@​virtuald</code></a>
made their first contribution in <a
href="https://redirect.github.com/pelletier/go-toml/pull/991">pelletier/go-toml#991</a></li>
<li><a
href="https://github.com/NathanBaulch"><code>@​NathanBaulch</code></a>
made their first contribution in <a
href="https://redirect.github.com/pelletier/go-toml/pull/999">pelletier/go-toml#999</a></li>
<li><a href="https://github.com/bersace"><code>@​bersace</code></a> made
their first contribution in <a
href="https://redirect.github.com/pelletier/go-toml/pull/1012">pelletier/go-toml#1012</a></li>
<li><a href="https://github.com/flyn-org"><code>@​flyn-org</code></a>
made their first contribution in <a
href="https://redirect.github.com/pelletier/go-toml/pull/1013">pelletier/go-toml#1013</a></li>
<li><a href="https://github.com/heckelson"><code>@​heckelson</code></a>
made their first contribution in <a
href="https://redirect.github.com/pelletier/go-toml/pull/1016">pelletier/go-toml#1016</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/pelletier/go-toml/compare/v2.2.4...v2.3.0">https://github.com/pelletier/go-toml/compare/v2.2.4...v2.3.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="f36a3ece9e"><code>f36a3ec</code></a>
Reduce marshal and unmarshal overhead (<a
href="https://redirect.github.com/pelletier/go-toml/issues/1044">#1044</a>)</li>
<li><a
href="77f3862df4"><code>77f3862</code></a>
Fix benchmark script replacing internal package imports (<a
href="https://redirect.github.com/pelletier/go-toml/issues/1042">#1042</a>)</li>
<li><a
href="16b1ef5508"><code>16b1ef5</code></a>
Fix parser error pointing to wrong line when last line has no trailing
newlin...</li>
<li><a
href="e14bde7c1d"><code>e14bde7</code></a>
build(deps): bump docker/login-action from 3 to 4 (<a
href="https://redirect.github.com/pelletier/go-toml/issues/1039">#1039</a>)</li>
<li><a
href="4b1ff01eb3"><code>4b1ff01</code></a>
build(deps): bump docker/setup-buildx-action from 3 to 4 (<a
href="https://redirect.github.com/pelletier/go-toml/issues/1040">#1040</a>)</li>
<li><a
href="048a25f0f2"><code>048a25f</code></a>
Go 1.26 (<a
href="https://redirect.github.com/pelletier/go-toml/issues/1030">#1030</a>)</li>
<li><a
href="b3575580f9"><code>b357558</code></a>
build(deps): bump goreleaser/goreleaser-action from 6 to 7 (<a
href="https://redirect.github.com/pelletier/go-toml/issues/1035">#1035</a>)</li>
<li><a
href="a0be52f4c1"><code>a0be52f</code></a>
build(deps): bump actions/upload-artifact from 6 to 7 (<a
href="https://redirect.github.com/pelletier/go-toml/issues/1036">#1036</a>)</li>
<li><a
href="316bfc66a4"><code>316bfc6</code></a>
Support Unmarshaler interface for tables and array tables (<a
href="https://redirect.github.com/pelletier/go-toml/issues/1027">#1027</a>)</li>
<li><a
href="2edc61f171"><code>2edc61f</code></a>
Fix panic when unmarshaling datetime values to incompatible types (<a
href="https://redirect.github.com/pelletier/go-toml/issues/1028">#1028</a>)
(<a
href="https://redirect.github.com/pelletier/go-toml/issues/1">#1</a>...</li>
<li>Additional commits viewable in <a
href="https://github.com/pelletier/go-toml/compare/v2.2.4...v2.3.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/pelletier/go-toml/v2&package-manager=go_modules&previous-version=2.2.4&new-version=2.3.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-23 21:33:13 -05:00
.claude Add Claude Code's memory file 2026-02-22 19:34:05 -06:00
.github Add per-student exam sheets with color coding (#7) 2026-03-03 15:51:19 -06:00
cmd Allow --solutions in render command (#14) 2026-03-13 14:35:33 -05:00
docs Escape \ref for groups in documentation (#15) 2026-03-16 19:43:25 -05:00
exam Prevent questions from splitting across pages (#16) 2026-03-17 09:21:02 -05:00
qti Add section and group headings to Canvas QTI export (#10) 2026-03-05 14:56:57 -06:00
question Add validate command for question banks (#12) 2026-03-10 15:04:30 -05:00
scantron Add per-student exam sheets with color coding (#7) 2026-03-03 15:51:19 -06:00
testdata Add section and group headings to Canvas QTI export (#10) 2026-03-05 14:56:57 -06:00
AGENTS.md Prevent questions from splitting across pages (#16) 2026-03-17 09:21:02 -05:00
go.mod Bump github.com/pelletier/go-toml/v2 from 2.2.4 to 2.3.0 (#19) 2026-04-23 21:33:13 -05:00
go.sum Bump github.com/pelletier/go-toml/v2 from 2.2.4 to 2.3.0 (#19) 2026-04-23 21:33:13 -05:00
main.go Add qb CLI with list and new commands 2026-02-22 09:46:48 -06:00
README.md Readme fixes (#13) 2026-03-10 15:53:05 -05:00

question bank

CI

Write exam and quiz questions in a structured "question bank" format, then convert them to an exam or solutions sheet.

Each question is a TOML file, a bank is a collection of TOML files, and each exam is a TOML file that references the questions in a bank. Exams are rendered to PDF by inserting the questions into a LaTeX template and compiling it.

Quick demo (with example questions):

go run . --bank testdata/bank render-bank
go run . --bank testdata/bank render testdata/exams/exam.toml

Getting started with a coding agent

This tool is designed to be easy to use with LLMs, which can quickly convert your existing questions to question-bank's toml files.

First install the binary:

go install github.com/tchajed/question-bank@latest

If you have a Google Doc, you can download it as markdown, which works quite reliably. There are various tools to convert a Word docx to markdown. You can also import a PDF, but it will take more time and tokens. Then, just use a version of this prompt in a coding agent (like Claude Code or Codex - you need it to be able to call the tool):

Run `question-bank docs --prompt` for instructions. Then import @midterm1.md to `./bank`.

You can then render the exam and double-check everything (the coding agent can figure out how to do this for you from the CLI --help output).

Questions

Here's a quick example of what a question TOML file looks like:

stem = """
Which of these is **not** an application benefit of an operating system?
"""
choices = [
  {text = 'A set of simpler abstractions against which to program'},
  {text = 'Independence from specific hardware and devices'},
  {text = 'More control over how hardware is used', correct = true},
]
explanation = """
An operating system gives less direct control over the hardware to applications.
"""

topic = 'os'
difficulty = 'easy'
tags = []

Read the question format reference for a complete guide.

Exams (and quizzes and homeworks)

An exam (or other assessment) has some metadata and questions, listed by IDs in the question bank. Defaults can be factored out to a separate file, for several exams in the same course (this is particularly useful for the LaTeX cover page, not shown in the example below).

course_code = "CS 537"
title = "Midterm 1"
semester = "Spring 2026"

[[sections]]
name = "Operating Systems"
questions = ["os-001", "processes-group-001/1", "processes-group-001/2"]

[[sections]]
name = "Virtual Memory"
questions = ["vm-001", "vm-002"]

Exams can be exported to a QTI zip file that can be imported into Canvas (using Settings > Import Course Content):

go run . --bank testdata/bank canvas testdata/exams/exam.toml