insta icon indicating copy to clipboard operation
insta copied to clipboard

Feature request: custom headers in a snap file

Open quantori-pokidovea opened this issue 1 year ago • 4 comments

That would be nice to have an extra context inside the snap file. For example

---
source: src/secondary_structure/bulge.rs
expression: bulge
---
sense: TCCCCTAGCTTTTAGCTATGGGGA
anti_sense: AGGGGTATCGATTTTCGATCCCCT
forward_init_x: 6
---
Bulge {
    description: "/bulge(-T)",
    entropy: Entropy(
        -35.510002,
    ),
    enthalpy: Enthalpy(
        -7.8,
    ),
    interim_oligo: Some(
        Sequence(T),
    ),
    wc_stack: Some(
        WCStack(CT/GA),
    ),
}

So, we can see some circumstances which led to the snapshot's body.

quantori-pokidovea avatar Dec 12 '23 16:12 quantori-pokidovea

Possibly description or debug_expr could be serialized using the same serializer — and then we could add fields without an additional field?

(it would be a small breaking change though, unless we did something like attempt both the serialized and unserialized versions)

max-sixty avatar Dec 12 '23 19:12 max-sixty

It could be the same section as for the regular headers. It doesn't matter. The main idea is to be able to populate headers with custom ones.

pokidovea avatar Dec 12 '23 19:12 pokidovea

Would you expect the review tool to show these headers?

mitsuhiko avatar Jan 09 '24 15:01 mitsuhiko

Would love this feature as well. I would like to ignore the headers section, because we use buck internally and cargo externally, and they have different root directories for source and output files, I couldn't get snapshot to stay the same between two build systems.

tyao1 avatar Feb 29 '24 23:02 tyao1