dandi / dandi/dandi-schema

Handle LinkML migration issue of `'pydantic2linkml: Unable to translate the logic contained in the wrap validation function, <function _BaseUrl.__get_pydantic_core_schema__.<locals>.wrap_val `

Open
#390 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
7
Forks
15
PR merge metrics
No merged PRs in 30d

Description

pydantic2linkml has the complains starting with

```py
"pydantic2linkml: Unable to translate the logic contained in the wrap validation function, .wrap_val"
```

in generating `slot` and `slot_usage` entires.

## Cause

All of these arise from the translation of the `pydantic.AnyHttpUrl` type.

## Stats
Total number of such complains: 17

They can be located with regex `(?s)Unable to translate the logic contained in the.+wrap.+validation.+function.+function _BaseUrl.__get_pydantic_core_schema__` in Pycharm with filter set to "In String Literals".

## Possible solution
The involved slots seem to be already translated to one with `range` or `uri`. One can possibly just do without the additional restriction wrapped in the `_BaseUrl.__get_pydantic_core_schema__` validator which is packed inside the `pydantic.AnyHttpUrl` type. In this solution, we can just remove the notes.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.