microbiomedata / submission-schema

https://microbiomedata.github.io/submission-schema/
MIT License
1 stars 1 forks source link

analysis_type is both required and recommended for class WaterInterface #171

Closed aclum closed 2 months ago

aclum commented 6 months ago

See https://microbiomedata.github.io/submission-schema/WaterInterface/ If I look at the linkml source for slot analysis_type for this class has both required and recommended are both set to true. analysis_type: name: analysis_type description: Select all the data types associated or available for this biosample title: analysis/data type examples:

bmeluch commented 5 months ago

analysis_type is "recommended" in the NMDC schema definition

Then, in the submission schema, modifications_long.tsv updates it to "required" for all interface classes that use DhMultiviewCommonColumnsMixin (which is all the interfaces)

Except instead of replacing "recommended" with "required", both stick around.

As another example, the same thing is happening with dna_concentration in JgiMgInterface. dna_concentration is "recommended" in the NMDC schema definition, and then updated to be "required" in modifications_long.tsv. The result in the submission schema LinkML source is this:

  dna_concentration:
    name: dna_concentration
    title: DNA concentration in ng/ul
    comments:
    - Units must be in ng/uL. Enter the numerical part only. Must be calculated using
      a fluorometric method. Acceptable values are 0-2000.
    examples:
    - value: '100'
    from_schema: https://w3id.org/nmdc/nmdc
    see_also:
    - nmdc:nucleic_acid_concentration
    rank: 5
    owner: Biosample
    domain_of:
    - Biosample
    - ProcessedSample
    - JgiMgInterface
    slot_group: jgi_metagenomics_section
    range: float
    required: true
    recommended: true
    minimum_value: 0
    maximum_value: 2000

tl;dr I don't know how to fix this but it's happening in a bunch of places in addition to WaterInterface

turbomam commented 5 months ago

Thanks for looking. Should we Zoom and look at it together?

mslarae13 commented 2 months ago

@sierra-moxon @turbomam @bmeluch Will you have time to work on this this sprint? Do you think it'll take a couple sprints to identify the issue & resolve it?

bmeluch commented 2 months ago

I looked some more at modifications_long.tsv.

As far as I can tell, the modification action "replace_attribute" should really be named "replace_value". It's updating the value of an attribute but the modifications_and_validation function in sheets-and-friends doesn't actually change the attribute that's there.

People who know about sheets-and-friends, does that sound right? Could we add another possible value for "action" that makes modifications_and_validation work with two attribute names, rather than an attribute name and a value?

bmeluch commented 2 months ago

From the metadata meeting today, 24 Apr 2024, we decided that the most straightforward fix for this is to update modifications_long.tsv so that wherever it adds "required = true" to a slot with "recommended = true" in nmdc-schema, it also updates "recommended = false". Both attributes will still show up in the submission-schema documentation page for slots with this modification, but they will no longer be redundantly both true.

mslarae13 commented 1 week ago

I don't think this is fixed... recommended:true is still appearing

@bmeluch @turbomam @sujaypatil96

https://microbiomedata.github.io/nmdc-schema/analysis_type/ https://microbiomedata.github.io/submission-schema/analysis_type/

bmeluch commented 1 week ago

oh no! It looks like the Github Pages documentation site hasn't been updated in a year, if I'm reading this right? Maybe it just hasn't captured recent fixes? image

aclum commented 5 days ago

This looks right on the water interface which is I think all we can hope for. This was changed in modifications_long.tsv not in nmdc-schema itself. analysis_type: name: analysis_type description: Select all the data types associated or available for this biosample title: analysis/data type examples:

bmeluch commented 5 days ago

Nvm, @aclum is right. This is a correction at the interface level, not the slot level, and the interface pages now read correctly. @mslarae13 we're good!

mslarae13 commented 4 days ago

Reviewed with Bea. I was looking at https://microbiomedata.github.io/submission-schema/analysis_type/ & needed to look at the individual (type)Interface pages like https://microbiomedata.github.io/submission-schema/BiofilmInterface/

Separately, we could start a discussion around why analysis_type is only recommended in nmdc-schema. Not required for this issue