datalad / datalad-catalog

Create a user-friendly data catalog from structured metadata
https://datalad-catalog.netlify.app
MIT License
15 stars 12 forks source link

NF: add batch functionality to translation #264

Closed jsheunis closed 1 year ago

jsheunis commented 1 year ago

Translation can be a lengthy process for a file with many json lines. Time can be saved, however, if we know that the same translator will be used on all the lines. Currently, for each line:

  1. the matching translator is found (runs a matching routine for all translators known to the installation)
  2. the translate() function is called.

If we e.g. pass the correct translator as an argument to the call, we can skip step 1 for all the lines and just do a version of it once upfront.

jsheunis commented 1 year ago

Closed by https://github.com/datalad/datalad-catalog/pull/309