Skip to content

Changed naming convention so algos can be ID'd by parameters#345

Draft
cetung-gif wants to merge 1 commit into
mainfrom
name-fix
Draft

Changed naming convention so algos can be ID'd by parameters#345
cetung-gif wants to merge 1 commit into
mainfrom
name-fix

Conversation

@cetung-gif

@cetung-gif cetung-gif commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Basically two methods:
_param_codifier(value), which converts a parameter value into a standardized string

  • Convert NumPy scalar types to native Python types.
  • Format values consistently (e.g., floats with up to 12 significant digits, booleans and None in lowercase)
  • Convert all other values to strings
  • Replace non-alphanumeric characters (except ., _, and -) with hyphens
  • Remove leading/trailing hyphens
  • Return "empty" if the resulting string is blank

_algorithm_identifier(index, params)

  • Return the zero-padded algorithm index if no parameters are provided
  • Sort the parameter dictionary by key to ensure a consistent ordering
  • Encode each parameter as - using _param_codifier()
  • Join the encoded parameters with "__"
  • Prefix the result with the zero-padded algorithm index

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant