nsidc / earthaccess

Python Library for NASA Earthdata APIs
https://earthaccess.readthedocs.io/
MIT License
416 stars 84 forks source link

Style guide proposal: defensively quote _all_ YAML strings #878

Open mfisher87 opened 7 hours ago

mfisher87 commented 7 hours ago

It doesn't matter how long you've been using YAML and how aware of its pitfalls you are. This kind of thing will eventually bite you as it did me today: https://github.com/nsidc/earthaccess/actions/runs/11747889420/job/32730773288?pr=876

This happened because I changed the value of a YAML field from 3.9 -> 3.10. This evaluates to 3.1 because YAML has more pitfalls than one can reasonably memorize. The correct change was 3.9 -> "3.10". IMO, we should be defensively quoting all of our strings.

jhkennedy commented 6 hours ago

Big :shrug: from me -- I think it reads better without quotes and I'm lazy so don't want to type them :rofl: , but that will bite you occasionally. I'm fine with adopting that as the style here though if there's quarum. There's not really a good reason not to.