NIST-ISODB / isodb-library

Mirror of the NIST ISODB API (https://adsorption.nist.gov/isodb)
12 stars 3 forks source link

disable check on negative pressures #8

Open ltalirz opened 4 years ago

ltalirz commented 4 years ago

turin it into a warning until @dwsideriusNIST fixes the data

dwsideriusNIST commented 4 years ago

What is the best way to provide a warning, but not fail the pre-commit hook? I'm not finding working guidance on how to do this. My other test was to have the validate script output a warning, but still return sys.exit(0) - the pre-commit hook passes, but the warning text is not written to the console.

ltalirz commented 4 years ago

Hi Dan, I checked the code I had in mind and it turned out to be a setting of a specific linter. I.e. simply returning sys.exit(0) (and adding a comment to change this once it's fixed) sounds like the right approach.

dwsideriusNIST commented 4 years ago

I tracked down a solution: cd498c5. it includes the sys.exit(0) modification you pointed out, but also adding "verbose: true" to the pre-commit YML. Now the warnings are output, but the check passes regardless of errors.

I'm going to leave this open so that this change is undone after I audit the erroneous isotherms.