Skip to content

Commit 1508d13

Browse files
authored
Merge pull request #66 from linkml/doc-schem-change
Make README concise and change documentation theme.
2 parents 6b051fe + 75a005a commit 1508d13

File tree

4 files changed

+27
-157
lines changed

4 files changed

+27
-157
lines changed

README.md

Lines changed: 1 addition & 145 deletions
Original file line numberDiff line numberDiff line change
@@ -18,148 +18,4 @@ These can be composed together. For example, run `tsvs2linkml` followed by `anno
1818
The toolkit is still experimental. It is intended as an aid to schema creation rather than act as a formal conversion
1919
tool
2020

21-
## Installation
22-
23-
`schema-automator` and its components require Python 3.9 or greater.
24-
25-
```bash
26-
chmod 755 environment.sh
27-
. environment.sh
28-
pip install -r requirements.txt
29-
pip install -e .
30-
```
31-
32-
## Command Line Usage
33-
34-
### Annotating Enums
35-
36-
This toolkit allows automated annotation of LinkML enums, mapping text strings to ontology terms.
37-
38-
The command line tool `annotate-enums` takes a LinkML schema, with enums and fills in the `meaning` slots.
39-
40-
See the [annotators](schema_automator/annotators/) folder for docs
41-
42-
### Converting TSVs
43-
44-
The `tsv2linkml` command infers a single-class schema from a TSV datafile
45-
46-
```bash
47-
tsv2linkml --help
48-
Usage: tsv2linkml [OPTIONS] TSVFILE
49-
50-
Infer a model from a TSV
51-
52-
Options:
53-
-o, --output TEXT Output file
54-
-c, --class_name TEXT Core class name in schema
55-
-n, --schema_name TEXT Schema name
56-
-s, --sep TEXT separator
57-
-E, --enum-columns TEXT column that is forced to be an enum
58-
--robot / --no-robot set if the TSV is a ROBOT template
59-
--help Show this message and exit.
60-
```
61-
62-
Example:
63-
64-
```bash
65-
tsv2linkml tests/resources/biobank-specimens.tsv
66-
```
67-
68-
The `tsvs2linkml` command infers a multi-class schema from multiple TSV datafiles
69-
70-
```bash
71-
tsvs2linkml --help
72-
Usage: tsvs2linkml [OPTIONS] [TSVFILES]...
73-
74-
Infer a model from multiple TSVs
75-
76-
Options:
77-
-o, --output TEXT Output file
78-
-n, --schema_name TEXT Schema name
79-
-s, --sep TEXT separator
80-
-E, --enum-columns TEXT column(s) that is forced to be an enum
81-
--enum-mask-columns TEXT column(s) that are excluded from being enums
82-
--max-enum-size INTEGER do not create an enum if more than max distinct
83-
members
84-
85-
--enum-threshold FLOAT if the number of distinct values / rows is less
86-
than this, do not make an enum
87-
88-
--robot / --no-robot set if the TSV is a ROBOT template
89-
--help Show this message and exit.
90-
```
91-
92-
### Converting OWL
93-
94-
```bash
95-
owl2linkml --help
96-
Usage: owl2linkml [OPTIONS] OWLFILE
97-
98-
Infer a model from OWL Ontology
99-
100-
Note: input must be in functional syntax
101-
102-
Options:
103-
-n, --name TEXT Schema name
104-
--help Show this message and exit.
105-
```
106-
107-
Example:
108-
109-
```bash
110-
owl2linkml -n prov tests/resources/prov.ofn > prov.yaml
111-
```
112-
113-
Note this works best on schema-style ontologies such as Prov
114-
115-
**NOT** recommended for terminological-style ontologies such as OBO
116-
117-
### Converting RDF instance graphs
118-
119-
```bash
120-
rdf2linkml --help
121-
Usage: rdf2linkml [OPTIONS] RDFFILE
122-
123-
Infer a model from RDF instance data
124-
125-
Options:
126-
-d, --dir TEXT [required]
127-
--help Show this message and exit.
128-
```
129-
130-
### Converting JSON Instance Data
131-
132-
```bash
133-
jsondata2linkml --help
134-
Usage: jsondata2linkml [OPTIONS] INPUT
135-
136-
Infer a model from JSON instance data
137-
138-
139-
140-
Options:
141-
--container-class-name TEXT name of root class
142-
-f, --format TEXT json or yaml (or json.gz or yaml.gz)
143-
--omit-null / --no-omit-null if true, ignore null values
144-
--help Show this message and exit.
145-
```
146-
147-
### Converting JSON-Schema
148-
149-
```bash
150-
jsonschema2linkml --help
151-
Usage: jsonschema2linkml [OPTIONS] INPUT
152-
153-
Infer a model from JSON Schema
154-
155-
Options:
156-
-n, --name TEXT ID of schema [required]
157-
-f, --format TEXT JSON Schema format - yaml or json
158-
-o, --output TEXT output path
159-
--help Show this message and exit.
160-
```
161-
162-
### jsonschema2linkml example
163-
```bash
164-
poetry run jsonschema2linkml -n test-model -f yaml -o vrs-linkml.yaml cp tests/resources/jsonschema/vrs.schema.json
165-
```
21+
[Full Documentation](https://linkml.io/schema-automator/)

docs/conf.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,16 @@
1212
#
1313
import os
1414
import sys
15+
import sphinx_pdj_theme
16+
1517
sys.path.insert(0, os.path.abspath('../..'))
1618

1719

1820
# -- Project information -----------------------------------------------------
1921

2022
project = 'Schema Automator'
2123
copyright = '2022, Chris Mungall'
22-
author = 'Chris Mungall'
24+
author = 'Chris Mungall, Harshad Hegde'
2325

2426
# The full version, including alpha/beta/rc tags
2527
# release = '0.1.4'
@@ -34,7 +36,7 @@
3436
'sphinx.ext.autodoc',
3537
'sphinx.ext.githubpages',
3638
'sphinx.ext.autosectionlabel',
37-
'sphinx_rtd_theme',
39+
'sphinx_pdj_theme',
3840
'sphinx_click',
3941
'sphinx.ext.viewcode',
4042
'sphinx.ext.todo',
@@ -64,7 +66,8 @@
6466
# The theme to use for HTML and HTML Help pages. See the documentation for
6567
# a list of builtin themes.
6668
#
67-
html_theme = 'sphinx_rtd_theme'
69+
html_theme = 'sphinx_pdj_theme'
70+
html_theme_path = [sphinx_pdj_theme.get_html_theme_path()]
6871

6972
# Add any paths that contain custom static files (such as style sheets) here,
7073
# relative to this directory. They are copied after the builtin static files,

poetry.lock

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

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ twine = "^4.0.0"
3838
[tool.poetry.dev-dependencies]
3939
pytest = "^7.1.1"
4040
Sphinx = "^4.4.0"
41-
sphinx-rtd-theme = "^1.0.0"
41+
sphinx-pdj-theme = "^0.2.0"
4242
sphinx-click = "^3.1.0"
4343
sphinxcontrib-mermaid = "^0.7.1"
4444

@@ -59,4 +59,4 @@ jsondata2linkml = "schema_automator.importers.json_instance_import_engine:json2m
5959
jsonschema2linkml = "schema_automator.importers.jsonschema_import_engine:jsonschema2model"
6060

6161
[tool.poetry.extras]
62-
docs = ["Sphinx", "sphinx-rtd-theme", "sphinxcontrib-mermaid"]
62+
docs = ["Sphinx", "sphinx-pdj-theme", "sphinxcontrib-mermaid"]

0 commit comments

Comments
 (0)