DataHarmonizer icon indicating copy to clipboard operation
DataHarmonizer copied to clipboard

Template creation

Open mmongy opened this issue 1 year ago • 2 comments

Hi everyone,

I have just a question: is there a way to easily create your own templates and load them in DataHarmonizer? Or at least some documentation to explain what is the purpose of each file in a template directory?

Thanks by advance, Marc.

Edit: My bad, the bulk of the doc is here: https://github.com/cidgoh/DataHarmonizer/wiki/DataHarmonizer-Templates

Edit 2: However, is there a way to generate easily a basic schema.json template file?

mmongy avatar Oct 25 '24 14:10 mmongy

Hi, The web/templates/new/ is a barebones template, and if you are in that folder at the command prompt you can run:

python3 ../../../script/tabular_to_schema.py -m

and this will compile the given schema_core.yaml and schema_slots.tsv and schema_enums.tsv into schema.yaml and schema.json , the last of which DataHarmonizer actually users. The "-m" parameter then also adds the given schema to the DataHarmonizer menu system (via /web/templates/menu.js

Lastly, run yarn in root of DataHarmonizer github, and yarn dev to get local browser view, or yarn build:web to generate DH with schema/templates menu in the /web/dist/ folder.

Hope that helps!

ddooley avatar Oct 26 '24 06:10 ddooley

Any followup needed? BTW, in the spring we will be launching the ability of DataHarmonizer to edit and save its own template / schema files. This will vastly simplify this process!

ddooley avatar Nov 15 '24 19:11 ddooley

I will close this, with a note that our upcoming release, after user review & bug fixing of dh2-rc1-rework will enable loading editing and saving of LinkML schemas / templates.

ddooley avatar Oct 17 '25 22:10 ddooley