Skip to content

Commit

Permalink
Merge pull request #105 from monarch-initiative/develop
Browse files Browse the repository at this point in the history
QoL updates
  • Loading branch information
glass-ships authored Apr 3, 2023
2 parents 0d1368e + e6c314c commit b45fc1b
Show file tree
Hide file tree
Showing 51 changed files with 1,945 additions and 1,425 deletions.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ build:
test: install
poetry run python -m pytest

.PHONY: docs
docs: install
poetry run typer src/koza/main.py utils docs --name koza --output docs/Usage/CLI.md

.PHONY: clean
clean:
rm -rf `find . -name __pycache__`
Expand Down
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
# Koza - a data transformation framework [![Pyversions](https://img.shields.io/pypi/pyversions/koza.svg)](https://pypi.python.org/pypi/koza) ![](https://github.com/monarch-initiative/koza/actions/workflows/build.yml/badge.svg) [![PyPi](https://img.shields.io/pypi/v/koza.svg)](https://pypi.python.org/pypi/koza)
# Koza - a data transformation framework

[![Pyversions](https://img.shields.io/pypi/pyversions/koza.svg)](https://pypi.python.org/pypi/koza)
[![PyPi](https://img.shields.io/pypi/v/koza.svg)](https://pypi.python.org/pypi/koza)
![Github Action](https://github.com/monarch-initiative/koza/actions/workflows/build.yml/badge.svg)

![pupa](docs/img/pupa.png)

**Documentation**: https://koza.monarchinitiative.org/
[**Documentation**](https://koza.monarchinitiative.org/ )

_Disclaimer_: Koza is in beta; we are looking for beta testers

Expand All @@ -14,9 +19,9 @@ _Disclaimer_: Koza is in beta; we are looking for beta testers
- Create and use translation tables to map between source and target vocabularies

### Installation
Koza is available on PyPi and can be installed via pip:
Koza is available on PyPi and can be installed via pip/pipx:
```
pip install koza
[pip|pipx] install koza
```

### Usage
Expand Down
63 changes: 63 additions & 0 deletions docs/Usage/CLI.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# `koza`

**Usage**:

```console
$ koza [OPTIONS] COMMAND [ARGS]...
```

**Options**:

* `--install-completion`: Install completion for the current shell.
* `--show-completion`: Show completion for the current shell, to copy it or customize the installation.
* `--help`: Show this message and exit.

**Commands**:

* `transform`: Transform a source file
* `validate`: Validate a source file

## `koza transform`

Transform a source file

**Usage**:

```console
$ koza transform [OPTIONS]
```

**Options**:

* `--source TEXT`: Source metadata file [required]
* `--output-dir TEXT`: Path to output directory [default: ./output]
* `--output-format [tsv|jsonl|kgx]`: Output format [default: tsv]
* `--global-table TEXT`: Path to global translation table
* `--local-table TEXT`: Path to local translation table
* `--schema TEXT`: Path to schema YAML for validation in writer
* `--row-limit INTEGER`: Number of rows to process (if skipped, processes entire source file)
* `--debug / --quiet`
* `--log / --no-log`: Optional log mode - set true to save output to ./logs [default: no-log]
* `--help`: Show this message and exit.

## `koza validate`

Validate a source file

Given a file and configuration checks that the file is valid, ie
format is as expected (tsv, json), required columns/fields are there

**Usage**:

```console
$ koza validate [OPTIONS]
```

**Options**:

* `--file TEXT`: Path or url to the source file [required]
* `--format [csv|jsonl|json|yaml|xml]`: [default: FormatType.csv]
* `--delimiter TEXT`: [default: ,]
* `--header-delimiter TEXT`
* `--skip-blank-lines / --no-skip-blank-lines`: [default: skip-blank-lines]
* `--help`: Show this message and exit.
235 changes: 0 additions & 235 deletions docs/Usage/configuring_ingests.md

This file was deleted.

Loading

0 comments on commit b45fc1b

Please sign in to comment.