clkhash icon indicating copy to clipboard operation
clkhash copied to clipboard

Duplicated defaults

Open hardbyte opened this issue 5 years ago • 0 comments

We should rethink defaults as currently:

  • clkhash ignores the values in the spec
  • the defaults are spread throughout the code base. Either hard-coded (e.g. schema.py line 184), default argument values (e.g. field_formats.py line 92, 93), or some hidden configurable variables (e.g. field_formats.py line 85,86).
  • there is no guarantee that the default in the schema correlates to the default in the code
  • if defaults are used the user doesn't actually know the exact details of the schema used to create the CLKs. This makes it unnecessarily hard to reproduce results between tools and even versions of clkhash.

If we have defaults in the schema, we should consider extracting them like this. This way, it would not just be more elegant, but also, it would create a json structure with all values set, which we could then feed back to the user -> the effective schema.

See source at https://github.com/data61/clkhash/pull/255#discussion_r292739287

hardbyte avatar Jun 13 '19 12:06 hardbyte