What is the recommended way to get the band gap from a VASP output?

There is a long history of how to fetch the band gap most accurately from VASP output files. My memory is hazy now, and I can’t remember what the de factor recommendation is from the MP team. Am I to use Vasprun("vasprun.xml").eigenvalue_band_properties[0] as my go-to, or something else? I assume parsing the eigenvalues is going to be more robust than the DOS, but Different gaps from Vasprun.eigenvalue_band_properties and Bandstructure.get_band_gap() · Issue #455 · materialsproject/pymatgen · GitHub suggests otherwise (not sure why).

Hi @Andrew_Rosen the current production method is from vasprun.xml as:

vasprun = Vasprun("vasprun.xml")
bandstructure = vasprun.get_band_structure(efermi="smart")
bandgap = bandstructure.get_band_gap()["energy"]