Metadata-Version: 2.4
Name: ghga_transpiler
Version: 2.6.0
Summary: GHGA-Transpiler - excel to JSON converter
Author-email: "German Human Genome Phenome Archive (GHGA)" <contact@ghga.de>
License-Expression: Apache-2.0
Project-URL: Repository, https://github.com/ghga-de/ghga
Project-URL: Release Notes, https://github.com/ghga-de/ghga/releases
Project-URL: Issue Tracker, https://github.com/ghga-de/ghga/issues
Classifier: Development Status :: 5 - Production/Stable
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3.15
Classifier: Environment :: Console
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Classifier: Topic :: Software Development :: Libraries
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: typer>=0.12
Requires-Dist: openpyxl==3.*,>=3.1.2
Requires-Dist: defusedxml==0.*,>=0.7
Requires-Dist: pydantic<3,>=2.6
Requires-Dist: PyYAML~=6.0
Requires-Dist: semver==3.*
Requires-Dist: click~=8.1.0
Dynamic: license-file

<!-- rumdl-disable MD013 -->
[![PyPI version shields.io](https://img.shields.io/pypi/v/ghga-transpiler.svg)](https://pypi.org/project/ghga-transpiler/)
[![PyPI pyversions](https://img.shields.io/pypi/pyversions/ghga-transpiler.svg)](https://pypi.org/project/ghga-transpiler/)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
[![Checked with mypy](https://www.mypy-lang.org/static/mypy_badge.svg)](https://mypy-lang.org/)
<!-- rumdl-enable MD013 -->

# Ghga Transpiler

GHGA-Transpiler - excel to JSON converter

## Description

The GHGA Transpiler is a Python library and command line utility to transpile the official GHGA metadata XLSX workbooks to JSON.
Please note that the GHGA Transpiler does not validate that the provided metadata is compliant with the [GHGA Metadata Schema](https://github.com/ghga-de/ghga-metadata-schema).
This can be achieved by running the [GHGA Validator](https://github.com/ghga-de/ghga/tree/main/tools/ghga-validator) on the JSON data generated by the GHGA Transpiler.

## Installation

We recommend installing the latest version of the GHGA transpiler using pip

```text
pip install ghga-transpiler
```

### Usage

```text
Usage: ghga-transpiler [OPTIONS] SPREAD_SHEET [OUTPUT_FILE]

  ghga-transpiler is a command line utility to transpile the official GHGA
  metadata XLSX workbooks to JSON. Please note that ghga-transpiler does not
  validate that the provided metadata is compliant with the GHGA Metadata
  Schema. This can be achieved by running ghga-validator on the JSON data
  generated by the ghga-transpiler.

Arguments:
  SPREAD_SHEET   The path to input file (XLSX)  [required]
  [OUTPUT_FILE]  The path to output file (JSON).

Options:
  -f, --force                     Override output file if it exists.
  --install-completion [bash|zsh|fish|powershell|pwsh]
                                  Install completion for the specified shell.
  --show-completion [bash|zsh|fish|powershell|pwsh]
                                  Show completion for the specified shell, to
                                  copy it or customize the installation.
  --help                          Show this message and exit.
```

## Development

This package is a member of the [GHGA monorepo](https://github.com/ghga-de/ghga) and is developed from the repository root rather than on its own.
The repository ships a devcontainer with the whole toolchain: open it in VS Code and run `Remote-Containers: Reopen in Container`, or set the environment up directly with `just sync`.

The usual tasks, run from the repository root (see [ADR-0034](https://github.com/ghga-de/ghga/blob/main/docs/adrs/adr-0034-task-runner.md) for the full recipe list):

```bash
just sync                         # install every member plus the shared dev toolchain
just test tools/ghga-transpiler   # this member's test suite
just lint                         # ruff check + format check across the workspace
```

## License

This repository is free to use and modify according to the [Apache 2.0 License](https://github.com/ghga-de/ghga/blob/main/tools/ghga-transpiler/LICENSE).
