Metadata-Version: 2.4
Name: ghga_transpiler
Version: 2.4.1
Summary: GHGA-Transpiler - excel to JSON converter
Author-email: "German Human Genome Phenome Archive (GHGA)" <contact@ghga.de>
License: Apache 2.0
Project-URL: Repository, https://github.com/ghga-de/ghga-transpiler
Classifier: Development Status :: 1 - Planning
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Topic :: Internet :: WWW/HTTP :: HTTP Servers
Classifier: Topic :: Software Development :: Libraries
Classifier: Intended Audience :: Developers
Requires-Python: >=3.9
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


[![tests](https://github.com/ghga-de/ghga-transpiler/actions/workflows/tests.yaml/badge.svg)](https://github.com/ghga-de/ghga-transpiler/actions/workflows/unit_and_int_tests.yaml)
[![Coverage Status](https://coveralls.io/repos/github/ghga-de/ghga-transpiler/badge.svg?branch=main)](https://coveralls.io/github/ghga-de/ghga-transpiler?branch=main)

# 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-validator/) on the JSON data generated by the GHGA Transpiler.


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

```
pip install ghga-transpiler
```

### Usage:

```
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
For setting up the development environment, we rely on the
[devcontainer feature](https://code.visualstudio.com/docs/remote/containers) of vscode
in combination with Docker Compose.

To use it, you have to have Docker Compose as well as vscode with its "Remote - Containers"
extension (`ms-vscode-remote.remote-containers`) installed.
Then open this repository in vscode and run the command
`Remote-Containers: Reopen in Container` from the vscode "Command Palette".

This will give you a full-fledged, pre-configured development environment including:
- infrastructural dependencies of the service (databases, etc.)
- all relevant vscode extensions pre-installed
- pre-configured linting and auto-formating
- a pre-configured debugger
- automatic license-header insertion

Moreover, inside the devcontainer, a convenience commands `dev_install` is available.
It installs the software with all development dependencies, installs pre-commit.

The installation is performed automatically when you build the devcontainer. However,
if you update dependencies in the [`./setup.cfg`](./setup.cfg) or the
[`./requirements-dev.txt`](./requirements-dev.txt), please run it again.

## License
This repository is free to use and modify according to the
[Apache 2.0 License](./LICENSE).

## Readme Generation
This readme is autogenerate, please see [`readme_generation.md`](./readme_generation.md)
for details.
