forked from DailyDreaming/linkml-aind-model
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from dandi/enh
Major refactoring to support more thorough conversion of dandischema pydantic models
- Loading branch information
Showing
27 changed files
with
3,804 additions
and
5,052 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Test | ||
|
||
on: | ||
pull_request: | ||
branches: [ main ] | ||
push: | ||
branches: [ main ] | ||
tags: | ||
- '*' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
test: | ||
runs-on: ${{ matrix.runs-on }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
runs-on: | ||
- macos-latest | ||
- windows-latest | ||
- ubuntu-latest | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Hatch | ||
uses: pypa/hatch@install | ||
|
||
- name: Run tests | ||
run: hatch run test:python -m pytest --numprocesses=logical -s -v tests | ||
env: | ||
# Needed for coveralls: | ||
GITHUB_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} | ||
|
||
# vim:set et sts=2: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
.idea/ | ||
|
||
# === Python === | ||
__pycache__/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,12 @@ | ||
# linkml-model-generator | ||
Translate pydantic-based schemas from python modules to LinkML. | ||
# pydantic2linkml | ||
A tool for translating models expressed in Pydantic to LinkML | ||
|
||
### Run | ||
[![Hatch project](https://img.shields.io/badge/%F0%9F%A5%9A-Hatch-4051b5.svg)](https://github.com/pypa/hatch) | ||
|
||
To run the program, use: | ||
----- | ||
|
||
``` | ||
python3 generate_linkml_from_aind.py --root_module_name="aind_data_schema.models" --output_file="aind.yml" | ||
``` | ||
### Sample Run | ||
|
||
### Limitations | ||
|
||
1. Supports only Pydantic models with maximum of one immediate parent that is a Pydantic model. | ||
```console | ||
pydantic2linkml -o o.yml -l INFO dandischema.models | ||
``` |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.