ReproNim / nimh-minimal

https://repronim.org/nimh-minimal/
MIT License
0 stars 4 forks source link

_shema in filenames #7

Open yibeichan opened 3 weeks ago

yibeichan commented 3 weeks ago

@ibevers hi, I think we should put _schema at the end of the file name, can you change the filename in the following places? for example, instead of using _schema_first_19, we should use _first_19_schema. You'll need to change it in the library too.

https://github.com/ReproNim/nimh-minimal/blob/26aa5910937d5e37e5d332bd2a7b7d6820226340/nimh_minimal/nimh_minimal_schema#L62-L70

and https://github.com/ReproNim/nimh-minimal/blob/26aa5910937d5e37e5d332bd2a7b7d6820226340/nimh_minimal/nimh_minimal_schema#L115-L116

@satra quick question for variableName, do we always keep _schema in the end to be consistent with the filename in isAbout or can we get rid of _schema but only have "DSM5_crosscutting_adult"? I have some vague memory that if we remove _schema from variableName we'll probably fail the validation.

https://github.com/ReproNim/nimh-minimal/blob/26aa5910937d5e37e5d332bd2a7b7d6820226340/nimh_minimal/nimh_minimal_schema#L30-L31

satra commented 3 weeks ago

variable names can be anything. so it doesn't need to have the _schema at the end. also, i can't remember any longer why every addproperties has a variablename, especially if the response from that schema is not used anywhere.

yibeichan commented 3 weeks ago

ah, that's a good point, @djarecka you can remove _schema if it makes things easier. Also, I couldn't find how variableName was used in UI, I mean I searched it in UI but don't think I understand how it's used.

satra commented 3 weeks ago

Also, I couldn't find how variableName was used in UI, I mean I searched it in UI but don't think I understand how it's used.

you can see how the variable name for demo_schema is being used in isVis - that's all controlled by the UI (and the PR i merged to add scoped variables for calculation).

yibeichan commented 3 weeks ago

i see, it's used in isVis. i am not sure about the relationship between variableName and isAbout, like whether variableName has to be the same as the second part of isAbout (split by "/" or ":")

satra commented 3 weeks ago

isAbout expands to a url if you load it in jsonld viewer, it's not a string. it's the actual pointer to the schema for activity/item. variablename is an alphanumericstring. one points to content, the other is simply a string that gets evaluated to represent a scope or an actual value.

yibeichan commented 3 weeks ago

okay, got it, so variableName is a representation of the value in isAbout, then they don't have to be the same

djarecka commented 3 weeks ago

Ok, I understand that variableName doesn't have to be a name of the file.

But also want to point that variableName is important for the compute items. Since in compute there is no isAbout, e.g., here, variableName in addProperties is the only place where I can match variableName from compute to get path

yibeichan commented 3 weeks ago

yes, phq9_total_score is in addProperties, where isAbout exists, so as long as we keep the same variable name consistent, should it be okay to identify which is which?

djarecka commented 3 weeks ago

yes, phq9_total_score is in addProperties, where isAbout exists, so as long as we keep the same variable name consistent, should it be okay to identify which is which?

yes