Skip to content

Commit

Permalink
docs: updating README, adding terraform docs (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
holtgrewe authored Nov 1, 2023
1 parent e475d08 commit f6dd1bf
Show file tree
Hide file tree
Showing 5 changed files with 104 additions and 32 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2020-2021, Manuel Holtgrewe
Copyright (c) 2020-2023, Berlin Institute of Health, Manuel Holtgrewe

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
93 changes: 62 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,39 +4,35 @@

# VarFish CLI

Command line interface for [VarFishServer](https://github.com/bihealth/varfish-server).
Command line interface for [bihealth/varfish-server](https://github.com/bihealth/varfish-server).

## Getting Started
> [!NOTE]
> This repository focuses on the command line interface program `varfish-cli`.
> If you are new to VarFish, you may want to start at the repository [bihealth/varfish-server](https://github.com/bihealth/varfish-server).
- [VarFish Homepage](https://www.cubi.bihealth.org/software/varfish/)
- [Manual](https://varfish-server.readthedocs.io/en/latest/)
- [Installation Instructions](https://varfish-server.readthedocs.io/en/latest/admin_install.html)
- [Docker Compose Installer](https://github.com/bihealth/varfish-docker-compose#run-varfish-server-using-docker-compose)
## Installation

## VarFish Repositories
You can install `varfish-cli` from [bioconda](https://bioconda.github.io/):

- [varfish-server](https://github.com/bihealth/varfish-server) --
The VarFish Server is the web frontend used by the end users / data analysts.
- [varfish-annotator](https://github.com/bihealth/varfish-annotator) --
The VarFish Annotator is a command line utility used for annotating VCF files and converting them to files that can be imported into VarFish Server.
- [varfish-cli](https://github.com/bihealth/varfish-cli) --
The VarFish Command Line Interface allows to import data through the VarFish REST API.
- [varfish-db-downloader](https://github.com/bihealth/varfish-db-downloader) --
The VarFish DB Downloader is a command line tool for downloading the background database.
- [varfish-docker-compose](https://github.com/bihealth/varfish-docker-compose) --
Quickly get started running a VarFish server by using Docker Compose.
We provide a prebuilt data set with some already imported data.
To create a new conda environment named `varfish-cli` with the package:

## Installation
```
mamba create -y -n varfish-cli -c bioconda varfish-cli
conda activate varfish-cli
varfish-cli --help
```

### From Source
To get help with individual sub commands:

```
varfish-cli importer
# OR
varfish-cli importer --help
```

```bash
$ git clone [email protected]:bihealth/varfish-cli.git
$ cd varfish-cli
$ conda create -n varfish-cli python=3.7
$ conda activate varfish-cli
$ pip install -e .
You will also need to create a configuration file in your home folder with the server address:

```
$ cat >~/.varfishrc.toml <<EOF
[global]
Expand All @@ -47,14 +43,34 @@ varfish_api_token = "XXX"
EOF
```

### Using pip
## Developer Information

### Development Setup

Preqrequisites:

- Python >=3.10

Clone the repository:

```
git clone [email protected]:bihealth/varfish-cli.git
cd varfish-cli-ng
```

Now, create a virtualenv and install the software and its development requirements:

```
virtualenv venv
source venv/bin/activate
pip install -r requirements/develop.txt
pip install -e .
```

`varfish-cli` is also available as a pip-Package.
Preferably install into a separate venv.
Finally, create the configuration file:

```bash
$ pip install varfish-cli
```
$ cat >~/.varfishrc.toml <<EOF
[global]
Expand All @@ -64,3 +80,18 @@ varfish_server_url = "https://varfish.example.com/"
varfish_api_token = "XXX"
EOF
```

### GitHub Project Management with Terraform

```
export GITHUB_OWNER=bihealth
export GITHUB_TOKEN=ghp_<thetoken>
cd utils/terraform
terraform init
terraform import github_repository.varfish-cli varfish-cli
terraform validate
terraform fmt
terraform plan
terraform apply
```
2 changes: 2 additions & 0 deletions utils/terraform/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.terraform*
terraform.tfstate*
30 changes: 30 additions & 0 deletions utils/terraform/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Mangement of the GitHub project.

resource "github_repository" "varfish-cli" {
name = "varfish-cli"
description = "VarFish REST API client (CLI + Python package)"
homepage_url = "https://github.com/bihealth/varfish-cli"
visibility = "public"
topics = [
"bioinformatics",
"genetics",
"varfish",
"vcf",
]

has_issues = true
has_downloads = true
has_discussions = false
has_projects = false

allow_auto_merge = true
allow_rebase_merge = false
allow_merge_commit = false

delete_branch_on_merge = true

vulnerability_alerts = true

squash_merge_commit_message = "BLANK"
squash_merge_commit_title = "PR_TITLE"
}
9 changes: 9 additions & 0 deletions utils/terraform/provider.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
terraform {
required_providers {
github = {
source = "integrations/github"
}
}
}

provider "github" {}

0 comments on commit f6dd1bf

Please sign in to comment.