Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: updating README, adding terraform docs #68

Merged
merged 2 commits into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
```
27 changes: 27 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# For more configuration details:
# https://docs.codecov.io/docs/codecov-yaml

# Check if this file is valid by running in bash:
# curl -X POST --data-binary @.codecov.yml https://codecov.io/validate

# Coverage configuration
# ----------------------
coverage:
status:
patch: false

range: 70..80 # First number represents red, and second represents green
# (default is 70..100)
round: down # up, down, or nearest
precision: 2 # Number of decimal places, between 0 and 5

# Ignoring Paths
# --------------
# which folders/files to ignore

# Pull request comments:
# ----------------------
# Diff is the Coverage Diff of the pull request.
# Files are the files impacted by the pull request
comment:
layout: diff, files # accepted in any order: reach, diff, flags, and/or files
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" {}
Loading