Skip to content

Archive tests: retain large integer counts exactly in JSON and CSV #84

Closed

Description

@HafidIdrissi

Goal and acceptance criteria

Protect exact count serialization with values above 2^53, zeros and multiple days. Verify JSON integers, CSV decimal strings and totals without conversion through floating point. Spreadsheet precision is a separate consumer limitation.

Starting points

  • tests/test_merge.py
  • tests/test_cli.py

Validation

Round-trip synthetic rows with json.loads/csv.reader and compare exact values.

For code changes, add focused regression/behavior coverage and run python -m pytest. Keep runtime dependencies standard-library-only and preserve supported Python versions. Use synthetic data, fake API responses and disposable files; never require real credentials or commit live traffic. Report checks actually performed and distinguish local results from CI.

Contributing

Difficulty: beginner. Read CONTRIBUTING.md. Comment with a short plan and coordinate assignment before substantial work; keep one task per PR. Paths marked proposed are new files. Agree shared interfaces with linked issues rather than duplicating their scope. These feature proposals are not claims that the functionality already exists.

Activity

  1. Bhaumik-99 commented on Oct 20, 2026

    @Bhaumik-99
    Contributor

    Hi! I'd like to work on this issue.

    My plan is to add regression tests using synthetic daily traffic records to verify exact preservation of large integer counts through JSON and CSV serialization, including zero values and totals across multiple days. I'll use the standard library, avoid floating-point conversions, and run the full test suite.

    Please let me know if this scope looks good before I start.

  2. HafidIdrissi commented on Oct 21, 2026

    @HafidIdrissi
    OwnerAuthor

    Thanks @Bhaumik-99 — assigned to you, and your plan matches #84. Your October 20 request preceded the overlapping #127 contribution; I have closed that PR for coordination so this remains your active task.

    Keep this to focused regression coverage in tests/test_merge.py and tests/test_cli.py unless a reproducible runtime defect needs discussion. Use fictional daily rows containing counts and uniques above 253, zeros, and multiple dates. Verify parsed JSON values retain both integer type and exact value, CSV round trips retain exact decimal strings, and multi-day totals remain exact; avoid any floating-point conversion in the archival path. 253 itself is exactly representable as a binary64 float: values such as 2**53 + 1 are useful precision probes. Spreadsheet display/import precision is a separate consumer limitation.

    Use mocked API responses and disposable files only. Run the focused merge/CLI tests and python -m pytest with the same configured interpreter, and record exact OS/Python, commands, counts and skipped checks separately from CI. No new runtime dependencies or live credentials are needed. Open one focused PR with Closes #84.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions