Skip to content

Fix BCF field-name mismatches between R and Python JSON schemas #321

@andrewherren

Description

@andrewherren

Part of #315 (cross-version deserialization, RFC 0002). Prerequisite for future cross-platform (R↔Python) serialization.

Three BCF field names differ between R and Python. Standardize R to match Python, and add legacy-name aliases on read (with a deprecation warning) so that JSONs serialized before this fix can still be loaded.

Field Python (canonical) R (current) Action
BCF initial variance sigma2_init initial_sigma2 Rename in R write; accept old name on read
BCF adaptive coding b0 b0_samples b_0_samples Rename in R write; accept old name on read
BCF adaptive coding b1 b1_samples b_1_samples Rename in R write; accept old name on read

Note: the R in-memory object names ($b_0_samples, $b_1_samples) are unchanged — this is a JSON field name change only.

Affects: R/bcf.R

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions