microbiomedata / cleanroom-schema

Clean-room reboot of NMDC schema
https://microbiomedata.github.io/cleanroom-schema/
MIT License
0 stars 0 forks source link

include python scripts, schema YAML and jsonschema in PyPI artifact #8

Open turbomam opened 1 year ago

turbomam commented 1 year ago

Schema YAML already included

$ ls -lR cleanroom_schema-0.1.0/src/
cleanroom_schema-0.1.0/src/:
total 4
drwxrwxr-x 4 mark mark 4096 Dec  8 11:11 cleanroom_schema

cleanroom_schema-0.1.0/src/cleanroom_schema:
total 12
drwxrwxr-x 2 mark mark 4096 Dec  8 11:11 datamodel
drwxrwxr-x 2 mark mark 4096 Dec  8 11:11 schema
-rw-r--r-- 1 mark mark  185 Dec  8 11:08 _version.py

cleanroom_schema-0.1.0/src/cleanroom_schema/datamodel:
total 24
-rw-r--r-- 1 mark mark 17394 Dec  8 11:08 cleanroom_schema.py
-rw-r--r-- 1 mark mark    32 Dec  8 11:08 __init__.py

cleanroom_schema-0.1.0/src/cleanroom_schema/schema:
total 8
-rw-r--r-- 1 mark mark 6370 Dec  8 11:08 cleanroom_schema.yaml
turbomam commented 1 year ago

stop gitignoring project

in .gitignore:

may want to add

turbomam commented 1 year ago

@pkalita-lbl and others have been skeptical about pushing derived files

I'm going to do just that for now but am willing to switch to another approach

turbomam commented 1 year ago

Learning how to do the necessary imports

Interactively

import cleanroom_schema
help(cleanroom_schema)
NAME
    cleanroom_schema

PACKAGE CONTENTS
    _version
    datamodel (package)
    test_publishability

Example

from cleanroom_schema.datamodel import Biosample
bs = Biosample(id="bs:1")