diff --git a/README.md b/README.md index c722d65..114a698 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ This is a toolkit that assists with: These can be composed together. For example, run `tsvs2linkml` followed by `annotate-enums` -The toolkit is still experimental. It is intended as an aid to schema creation rather than act as a formal conversion -tool +The toolkit is still experimental. It is intended as an aid to schema creation rather than as a formal conversion +tool. -[Full Documentation](https://linkml.io/schema-automator/) \ No newline at end of file +[Full Documentation](https://linkml.io/schema-automator/) diff --git a/poetry.lock b/poetry.lock index 882728e..77c315c 100644 --- a/poetry.lock +++ b/poetry.lock @@ -646,23 +646,22 @@ version = "1.2.11" description = "Linked Open Data Modeling Language" category = "main" optional = false -python-versions = ">=3.7" +python-versions = ">=3.7.6,<4.0.0" [package.dependencies] -antlr4-python3-runtime = ">=4.9,<4.10" +antlr4-python3-runtime = ">=4.9.0,<4.10" argparse = ">=1.4.0" click = ">=7.0" graphviz = ">=0.10.1" hbreader = "*" isodate = ">=0.6.0" jinja2 = "*" -jsonasobj2 = ">=1.0.3,<2.0" +jsonasobj2 = ">=1.0.3,<2.0.0" jsonschema = ">=3.0.1" linkml-dataops = "*" linkml-runtime = ">=1.2.12,<1.3.0" myst-parser = "*" openpyxl = "*" -pandas = "*" parse = "*" prefixcommons = ">=0.1.7" pydantic = "*" @@ -673,12 +672,13 @@ python-dateutil = "*" pyyaml = "*" rdflib = ">=6.0.0" requests = ">=2.22" -sphinx = "*" sphinx-click = "*" -sphinx-rtd-theme = "*" sqlalchemy = ">=1.4.31" watchdog = ">=0.9.0" +[package.extras] +docs = ["sphinx-rtd-theme", "sphinx"] + [[package]] name = "linkml-dataops" version = "0.1.0" @@ -1594,21 +1594,6 @@ category = "dev" optional = false python-versions = "*" -[[package]] -name = "sphinx-rtd-theme" -version = "1.0.0" -description = "Read the Docs theme for Sphinx" -category = "main" -optional = false -python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*" - -[package.dependencies] -docutils = "<0.18" -sphinx = ">=1.6" - -[package.extras] -dev = ["transifex-client", "sphinxcontrib-httpdomain", "bump2version"] - [[package]] name = "sphinxcontrib-applehelp" version = "1.0.2" @@ -3031,10 +3016,6 @@ sphinx-click = [ sphinx-pdj-theme = [ {file = "sphinx_pdj_theme-0.2.1.tar.gz", hash = "sha256:1db9d09449e9eb846ee1232d0b7ab9f5cbc37901e84a9901e9d55e416f46fee0"}, ] -sphinx-rtd-theme = [ - {file = "sphinx_rtd_theme-1.0.0-py2.py3-none-any.whl", hash = "sha256:4d35a56f4508cfee4c4fb604373ede6feae2a306731d533f409ef5c3496fdbd8"}, - {file = "sphinx_rtd_theme-1.0.0.tar.gz", hash = "sha256:eec6d497e4c2195fa0e8b2016b337532b8a699a68bcb22a512870e16925c6a5c"}, -] sphinxcontrib-applehelp = [ {file = "sphinxcontrib-applehelp-1.0.2.tar.gz", hash = "sha256:a072735ec80e7675e3f432fcae8610ecf509c5f1869d17e2eecff44389cdbc58"}, {file = "sphinxcontrib_applehelp-1.0.2-py2.py3-none-any.whl", hash = "sha256:806111e5e962be97c29ec4c1e7fe277bfd19e9652fb1a4392105b43e01af885a"}, diff --git a/pyproject.toml b/pyproject.toml index 5cc114e..1b9c7df 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,6 +51,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry.scripts] schemauto = "schema_automator.cli:main" tsv2linkml = "schema_automator.importers.csv_import_engine:tsv2model" +tsvs2linkml = "schema_automator.importers.csv_import_engine:tsvs2model" enum_annotator = "schema_automator.annotators.enum_annotator:enum_annotator" enums_to_curateable = "schema_automator.annotators.enums_to_curateable:enums_to_curateable" curated_to_enums = "schema_automator.annotators.curated_to_enums:curated_to_enums" diff --git a/schema_automator/generalizers/csv_data_generalizer.py b/schema_automator/generalizers/csv_data_generalizer.py index ae07471..2855fbc 100644 --- a/schema_automator/generalizers/csv_data_generalizer.py +++ b/schema_automator/generalizers/csv_data_generalizer.py @@ -675,7 +675,7 @@ def tsv2model(tsvfile, output, separator, class_name, schema_name, **kwargs): @click.argument('tsvfiles', nargs=-1) # input TSV (must have column headers @click.option('--output', '-o', help='Output file') @click.option('--schema_name', '-n', default='example', help='Schema name') -@click.option('--sep', '-s', default='\t', help='separator') +@click.option('--file_separator', '-s', default='\t', help='separator') @click.option('--downcase-header/--no-downcase-header', default=False, help='if true make headers lowercase') @click.option('--infer-foreign-keys/--no-infer-foreign-keys', default=False, help='infer ranges/foreign keys') @click.option('--enum-columns', '-E', multiple=True, help='column(s) that is forced to be an enum')