From 728af999cdc6f9571721981bcc4807568c55dcff Mon Sep 17 00:00:00 2001 From: Mose Mueller Date: Tue, 11 Apr 2023 09:41:23 +0200 Subject: [PATCH] Updating README --- README.md | 36 ++++++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8eccc27..7fd35da 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,34 @@ -# ICON service base -This repository contains the code that is common to all ICON services. It includes both backend (python) and frontend (js, ts) files and can be installed using both `poetry` and `npm`, respectively. \ No newline at end of file +# ICON Service Base + +ICON Service Base is a git repository that contains code shared among all Icon services in a service-oriented architecture. The repository consists of a backend written in Python and a frontend written in TypeScript. + + +## Installation +### Python + +Make sure you have Python 3.10 or later installed on your system. The dependencies of this package are handled with [`poetry`](https://python-poetry.org/docs/#installation). You can install the `icon_service_base` like so: + +```bash +poetry add https://gitlab.phys.ethz.ch/tiqi-projects/qchub/icon-services/icon_service_base +``` + +### TypeScript frontend +Make sure you have Node.js and npm or yarn installed on your system. You can install `@icon-service/icon_service_base` like so: + +```bash +npm install https://gitlab.phys.ethz.ch/tiqi-projects/qchub/icon-services/icon_service_base +``` + +## Usage +### Python +The Python code can be used as a library in other ICON services. Import the relevant modules and classes from the `icon_service_base` package in your Python code, as needed. +### TypeScript Frontend +The frontend code contains the core of the typescript openAPI clients generated by [`openapi-typescript-codegen`](https://github.com/ferdikoomen/openapi-typescript-codegen/tree/master). This needs to be imported in the ICON services like so: + +```ts +import { OpenAPI } from '@icon-service/icon_service_base'; +import { request as __request } from '@icon-service/icon_service_base'; +export { ApiError } from "@icon-service/icon_service_base"; +export { CancelablePromise, CancelError } from '@icon-service/icon_service_base'; +export type { OpenAPIConfig } from '@icon-service/icon_service_base'; +``` \ No newline at end of file