airr-community / airr-standards

AIRR Community Data Standards
https://docs.airr-community.org
Creative Commons Attribution 4.0 International
35 stars 23 forks source link

exclude deprecated fields from template #636

Closed schristley closed 2 years ago

schristley commented 2 years ago
import airr
r = airr.schema.RepertoireSchema.template()
print(json.dumps(r, indent=2))

[snip]
    "age_event": null,
    "age": null,
    "ancestry_population": null,
[snip]

age is deprecated. This should be easy fix.

javh commented 2 years ago

I hit the wrong button and accidentally pushed this fix to master in 9f572ef instead of making a PR. Can you test in master, please?

I now see:

import json
import airr
r = airr.schema.RepertoireSchema.template()
print(json.dumps(r, indent=2))

[snip]
    "age_min": null,
    "age_max": null,
    "age_unit": {
      "id": null,
      "label": null
    },
    "age_event": null,
[snip]
schristley commented 2 years ago

looks good! Generating a template for DataFile is interesting, I like it

javh commented 2 years ago

Oh, I didn't think about trying it on DataFile. That works pretty well!