Skip to content

Commit 8acc558

Browse files
committed
Adding implementation
1 parent 8f8a233 commit 8acc558

33 files changed

+180737
-0
lines changed

poetry.lock

Lines changed: 2127 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[tool.poetry]
2+
name = "linkml-pydantic-polyfactory"
3+
version = "0.1.0"
4+
description = ""
5+
authors = ["James Bristow <james.bristow@plantandfood.co.nz>"]
6+
readme = "README.md"
7+
8+
[tool.poetry.dependencies]
9+
python = ">=3.10,<4.0"
10+
linkml = "^1.9.2"
11+
pydantic = "^2.11.7"
12+
polyfactory = "^2.22.0"
13+
faker = "^37.4.0"
14+
numpy = "<2.3.1"
15+
16+
17+
[build-system]
18+
requires = ["poetry-core"]
19+
build-backend = "poetry.core.masonry.api"
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
id: ORCID:1234
2+
full_name: Clark Kent
3+
age: "32"
4+
phone: 555-555-5555
5+
made_up_field: hello
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"id": "ORCID:1234",
3+
"full_name": "Clark Kent",
4+
"age": "32",
5+
"phone": "555-555-5555"
6+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
id: ORCID:1234
2+
full_name: Clark Kent
3+
age: "32"
4+
phone: 555-555-5555
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/usr/bin/env bash
2+
3+
gen-json-schema personinfo.yaml
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
id: https://w3id.org/linkml/examples/personinfo
2+
name: personinfo
3+
prefixes:
4+
linkml: https://w3id.org/linkml/
5+
personinfo: https://w3id.org/linkml/examples/personinfo
6+
imports:
7+
- linkml:types
8+
default_range: string
9+
default_prefix: personinfo
10+
11+
classes:
12+
Person:
13+
attributes:
14+
id:
15+
full_name:
16+
aliases:
17+
phone:
18+
age:
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/usr/bin/env bash
2+
3+
linkml-validate -s personinfo.yaml $@
13.5 KB
Loading
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
persons:
2+
- id: ORCID:1234
3+
full_name: Clark Kent
4+
age: "32"
5+
phone: 555-555-5555
6+
- id: ORCID:4567
7+
full_name: Lois Lane
8+
age: "33"

0 commit comments

Comments
 (0)