• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

open-contracting / data-registry / 16084075787

05 Jul 2025 03:25AM UTC coverage: 58.298% (-0.3%) from 58.574%
16084075787

push

github

jpmckinney
fix: Summarize OCDS Merge warnings, as they are too large to store

Used this script to manually migrate the notes:

import re
from collections import Counter
from data_registry.models import Job
OCDS_MERGE_WARNING_PATTERN = re.compile(
    r"^Multiple objects have the `id` value '.+' in the `(.+)` array$", re.MULTILINE
)
for job in Job.objects.exclude(process_notes={}).defer("process_notes"):
    counts = Counter()
    others = []
    for note, data in job.process_notes['WARNING']:
        # OCDS Merge has one warning type, which can be issued millions of times.
        if note.startswith("Multiple objects have the `id` value "):
            counts.update(OCDS_MERGE_WARNING_PATTERN.findall(note))
        else:
            others.append([note, data])
    if not counts:
        continue
    for path, count in counts.items():
        others.append(["OCDS Merge", {"count": count, "path": path}])
    job.process_notes['WARNING'] = others
    job.save(update_fields=["modified", "process_notes"])
    print(job)

5 of 24 new or added lines in 2 files covered. (20.83%)

42 existing lines in 2 files now uncovered.

959 of 1645 relevant lines covered (58.3%)

0.58 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

32.31
/data_registry/process_manager/task/process.py


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc