iev 0.4.6 → 0.4.8
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.
- checksums.yaml +4 -4
- data/.claude/scheduled_tasks.lock +1 -0
- data/.rubocop_todo.yml +5 -47
- data/CLAUDE.md +11 -1
- data/Gemfile +4 -2
- data/TODO.reconcile/01-design.md +57 -0
- data/TODO.reconcile/02-change-models.md +44 -0
- data/TODO.reconcile/02-termbase-loader.md +48 -0
- data/TODO.reconcile/03-live-loader.md +28 -0
- data/TODO.reconcile/03-status-mapper.md +24 -0
- data/TODO.reconcile/04-concept-merger.md +45 -0
- data/TODO.reconcile/04-termbase-loader.md +28 -0
- data/TODO.reconcile/05-content-diff.md +45 -0
- data/TODO.reconcile/05-live-loader.md +20 -0
- data/TODO.reconcile/06-content-differ.md +32 -0
- data/TODO.reconcile/06-v3-serializer.md +42 -0
- data/TODO.reconcile/07-cli-and-run.md +27 -0
- data/TODO.reconcile/07-concept-merger.md +32 -0
- data/TODO.reconcile/08-report.md +53 -0
- data/TODO.reconcile/09-pipeline.md +23 -0
- data/TODO.reconcile/10-script-and-run.md +15 -0
- data/data/locales/glossarist_enums.yml +705 -0
- data/iev.gemspec +4 -2
- data/lib/iev/bibliography_builder.rb +87 -0
- data/lib/iev/cli/command.rb +29 -0
- data/lib/iev/cli/command_helper.rb +1 -6
- data/lib/iev/config.rb +10 -1
- data/lib/iev/exporter.rb +37 -4
- data/lib/iev/figure_builder.rb +186 -0
- data/lib/iev/multi_doc_yaml.rb +60 -0
- data/lib/iev/reconciler/change.rb +29 -0
- data/lib/iev/reconciler/change_set.rb +48 -0
- data/lib/iev/reconciler/concept_merger.rb +130 -0
- data/lib/iev/reconciler/content_differ.rb +157 -0
- data/lib/iev/reconciler/live_loader.rb +163 -0
- data/lib/iev/reconciler/pipeline.rb +104 -0
- data/lib/iev/reconciler/reconciled_concept.rb +14 -0
- data/lib/iev/reconciler/report.rb +118 -0
- data/lib/iev/reconciler/status_mapper.rb +29 -0
- data/lib/iev/reconciler/term_marker_parser.rb +196 -0
- data/lib/iev/reconciler/termbase_loader.rb +141 -0
- data/lib/iev/reconciler.rb +17 -0
- data/lib/iev/scraper/browser.rb +155 -50
- data/lib/iev/scraper/page_parser.rb +116 -24
- data/lib/iev/source_parser.rb +12 -1
- data/lib/iev/subject_area_concepts.rb +4 -2
- data/lib/iev/utilities.rb +7 -5
- data/lib/iev/version.rb +1 -1
- data/lib/iev.rb +4 -0
- data/scripts/find_unparseable.rb +22 -0
- metadata +54 -6
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# 08 — Report
|
|
2
|
+
|
|
3
|
+
## Goal
|
|
4
|
+
|
|
5
|
+
Generate dataset-level change reports from the reconciled concepts.
|
|
6
|
+
This answers "what changed across the entire IEV?"
|
|
7
|
+
|
|
8
|
+
## Output files
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
report/
|
|
12
|
+
summary.yaml # aggregate statistics
|
|
13
|
+
changes.csv # one row per field-level change
|
|
14
|
+
retired.yaml # concepts retired since termbase
|
|
15
|
+
new_concepts.yaml # concepts added since termbase
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## summary.yaml
|
|
19
|
+
|
|
20
|
+
```yaml
|
|
21
|
+
total_concepts: 23058
|
|
22
|
+
sources:
|
|
23
|
+
in_both: 16643
|
|
24
|
+
termbase_only: 5585
|
|
25
|
+
live_only: 830
|
|
26
|
+
changes:
|
|
27
|
+
total: 5499
|
|
28
|
+
by_field:
|
|
29
|
+
definition: 4200
|
|
30
|
+
designation: 350
|
|
31
|
+
notes: 580
|
|
32
|
+
examples: 120
|
|
33
|
+
status: 249
|
|
34
|
+
by_language:
|
|
35
|
+
eng: 5000
|
|
36
|
+
fra: 450
|
|
37
|
+
deu: 49
|
|
38
|
+
by_section:
|
|
39
|
+
"113-01": 45
|
|
40
|
+
"102-01": 12
|
|
41
|
+
...
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## changes.csv
|
|
45
|
+
|
|
46
|
+
Columns: `code, section, field, language, detected_at, old_value, new_value`
|
|
47
|
+
|
|
48
|
+
## Checklist
|
|
49
|
+
|
|
50
|
+
- [x] Implement Report
|
|
51
|
+
- [x] Spec: summary counts correct
|
|
52
|
+
- [x] Spec: CSV format correct
|
|
53
|
+
- [x] Spec: retired/new lists correct
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# 09 — Pipeline
|
|
2
|
+
|
|
3
|
+
## Goal
|
|
4
|
+
|
|
5
|
+
Orchestrate the full reconciliation: load → merge → serialize → report.
|
|
6
|
+
|
|
7
|
+
## Flow
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
Pipeline#run
|
|
11
|
+
├── TermbaseLoader.load(path) → Hash<code, ManagedConcept>
|
|
12
|
+
├── LiveLoader.load(dir) → Hash<code, ManagedConcept>
|
|
13
|
+
├── for each code in union:
|
|
14
|
+
│ ├── ConceptMerger.merge(code, tb, live) → ReconciledConcept
|
|
15
|
+
│ └── collect ReconciledConcept
|
|
16
|
+
├── save concepts to output/concepts/*.yaml
|
|
17
|
+
└── Report.new(reconciled).write_to(output/report/)
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Checklist
|
|
21
|
+
|
|
22
|
+
- [x] Implement Pipeline
|
|
23
|
+
- [x] Spec: pipeline produces expected output with test fixtures
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# 10 — Script wrapper + end-to-end run
|
|
2
|
+
|
|
3
|
+
## Goal
|
|
4
|
+
|
|
5
|
+
Rewrite `scripts/reconcile.rb` as a thin wrapper around the library
|
|
6
|
+
code. Then run the full pipeline and verify output.
|
|
7
|
+
|
|
8
|
+
## Checklist
|
|
9
|
+
|
|
10
|
+
- [x] Rewrite scripts/reconcile.rb as thin wrapper
|
|
11
|
+
- [x] Run end-to-end pipeline
|
|
12
|
+
- [x] Verify concepts/*.yaml output
|
|
13
|
+
- [x] Verify report/*.yaml output
|
|
14
|
+
- [x] Spot-check 5 concepts (in-both, retired, new, with changes)
|
|
15
|
+
- [x] Spot-check report accuracy
|