Skip to content

WiP: Branch with auto converted linkml model#381

Draft
yarikoptic wants to merge 18 commits intolinkml-conversionfrom
linkml-auto-converted
Draft

WiP: Branch with auto converted linkml model#381
yarikoptic wants to merge 18 commits intolinkml-conversionfrom
linkml-auto-converted

Conversation

@yarikoptic
Copy link
Copy Markdown
Member

@yarikoptic yarikoptic commented Mar 10, 2026

NEVER TO BE MERGED

To preview and test results, actual changes should go to

Copy link
Copy Markdown
Member Author

@yarikoptic yarikoptic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

initial review pointers

name: identifier
range: string
required: true
pattern: ^(?:urn:uuid:)?[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?4[0-9a-fA-F]{3}-?[89abAB][0-9a-fA-F]{3}-?[0-9a-fA-F]{12}$
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

per discussion with @candleindark and claude -- it seems we should be able to use types here. Here is an example excerpt from https://claude.ai/share/66fe0f31-8cf1-40e6-b9fd-47c6719f2006

types:
  ORCID:
    uri: xsd:string
    base: str
    pattern: "^https://orcid\\.org/\\d{4}-\\d{4}-\\d{4}-\\d{3}[0-9X]$"
    description: An ORCID identifier

  ISSN:
    uri: xsd:string
    base: str
    pattern: "^\\d{4}-\\d{3}[0-9X]$"
    description: An ISSN identifier

  UUID:
    uri: xsd:string
    base: str
    pattern: "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
    description: A UUID

slots:
  contributor_id:
    range: ORCID

  publication_id:
    range: ISSN

  asset_id:
    range: UUID

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The definitions in dandischema.models doesn't define those types with patterns information attached. Those types are actually defines as alias of str

Identifier = str
ORCID = str
RORID = str
DANDI = str
RRID = str
.

Because of that, I don't think these type definitions should be part of the result of auto translation but added manually something to add to the result of the auto translation.

notes:
- 'pydantic2linkml: Unable to translate the logic contained in the wrap validation
function, <function _BaseUrl.__get_pydantic_core_schema__.<locals>.wrap_val
at 0x7f8c96c36f80>.'
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is for List[AnyHttpUrl] and @candleindark says that there is custom validator attached. May be we could just provide custom type for validation here.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 10, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.92%. Comparing base (4b89e4f) to head (bd38142).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #381   +/-   ##
=======================================
  Coverage   97.92%   97.92%           
=======================================
  Files          18       18           
  Lines        2405     2405           
=======================================
  Hits         2355     2355           
  Misses         50       50           
Flag Coverage Δ
unittests 97.92% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@candleindark candleindark force-pushed the linkml-auto-converted branch from fa28737 to c78f9d3 Compare March 10, 2026 23:08
=== Do not change lines below ===
{
 "chain": [],
 "cmd": "hatch run linkml-auto-converted:2linkml",
 "exit": 0,
 "extra_inputs": [],
 "inputs": [],
 "outputs": [],
 "pwd": "."
}
^^^ Do not change lines above ^^^
@yarikoptic yarikoptic force-pushed the linkml-auto-converted branch from 28c5b44 to bd38142 Compare March 13, 2026 21:17
@yarikoptic yarikoptic force-pushed the linkml-auto-converted branch from bd38142 to 6bb4b52 Compare March 13, 2026 22:33
candleindark and others added 3 commits March 15, 2026 22:40
…tions

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There is no prefix defined as `dandi_default`.
The intended default prefix is `dandi`
… models.yaml

The previous BRE pattern used `\+` (GNU sed extension) which silently fails
on macOS BSD sed. Switch to `-E` (extended regex) with POSIX character class
`[^[:space:]]` instead of `\S` (also unsupported by BSD sed), making the
normalization work on both macOS and Linux.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@yarikoptic yarikoptic mentioned this pull request Mar 20, 2026
11 tasks
@yarikoptic yarikoptic changed the base branch from master to linkml-conversion March 20, 2026 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants