Skip to content

Duplicated defaults #258

@hardbyte

Description

@hardbyte

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 #255 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions