hubmapconsortium / ingest-api

MIT License
0 stars 0 forks source link

Validates the uuids of given records fix #503

Closed ChuckKollar closed 4 months ago

ChuckKollar commented 4 months ago

Jes: In the API rightabouts here, https://github.com/hubmapconsortium/ingest-api/blob/3f6430ef75a57251e2b603bd9f760d7be0afb35d/src/routes/validation/__init__.py#L273 we're checking against the sub type specifically defined on the entity itself, not just the value getting passed through the POST call. It's case sensitive, and all our sub_types on Hubmap are lower when its expecting to find title Its title casing in the response, but not the value being checked.

Lisa-Ann: To explain, I modified the ported over code that’s on HM since I have noticed that within the HM’s neo4j docs the sub types are in lowercase. On SenNet, the sub type casing matches with the ubkg’s; it’s Title Case in all places on SN. So the original case sensitive check on line 274 matches. On HM the sub types are currently hardcoded as Title Casing which will not match the lowercase in the neo4j docs. This change may not be ideal as it is now doing case insensitive checks. May want to make what’s in the neo4j match with the values in method supported_metadata_sub_types or vice verse according to what’s on UBKG.

Bill: I’m guessing the equivalent values aren’t available in the HuBMAP ontology/ubkg, so for now just lower case the hard coded values that it is comparing them too. The entity-api POST/PUT requires all lower case anyway, so no need to check case insensitive and we’ll require all lower case in the input files.

ChuckKollar commented 4 months ago

PR: https://github.com/hubmapconsortium/ingest-api/pull/504