setuptools_scm icon indicating copy to clipboard operation
setuptools_scm copied to clipboard

Be nicer about possible misconfigurations

Open thejcannon opened this issue 1 year ago • 2 comments
trafficstars

Fixes https://github.com/pypa/setuptools_scm/issues/1003 by turning situations where the user might get an AssertionError and turn them into descriptive ValueErrors.

Additionally, tests have been added to test the behavior.

The situations fixed are (with the real-world facepalm situations I ended up in):

  • The entrypoint for version_scheme and local_scheme don't exist
    • :facepalm: I accidentally used the function name once, instead of the entrypoint name
  • The entrypoint(s) for version_scheme and local_scheme don't return anything
    • :facepalm: I forgot to add a return to my custom scheme
  • The tag_regex is bad, and was loaded from the config
    • :facepalm: This one should be self-explanatory
  • The tag_regex matched, but the version was blank
    • :facepalm: My regex was borked

thejcannon avatar Jan 18 '24 17:01 thejcannon

i intend to merge this after hte next minor release as its a "breaking change" that should go in nonetheless

RonnyPfannschmidt avatar Mar 05 '24 10:03 RonnyPfannschmidt