Skip to content

Commit

Permalink
chore: initialize repository
Browse files Browse the repository at this point in the history
  • Loading branch information
holtgrewe committed Mar 3, 2023
0 parents commit c20ba89
Show file tree
Hide file tree
Showing 10 changed files with 218 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# http://editorconfig.org

root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.{py,rst,ini,rs,toml}]
indent_style = space
indent_size = 4

[*.{html,css,scss,json,yml}]
indent_style = space
indent_size = 2

[*.md]
trim_trailing_whitespace = false

[Makefile]
indent_style = tab

[nginx.conf]
indent_style = space
indent_size = 2
18 changes: 18 additions & 0 deletions .github/workflows/conventional-prs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: PR
on:
pull_request_target:
types:
- opened
- reopened
- edited
- synchronize

jobs:
title-format:
runs-on: ubuntu-latest
steps:
- uses: amannn/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
validateSingleCommit: true
37 changes: 37 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
on:
push:
branches:
- main

name: release-please

jobs:
release-please:
if: github.repository_owner == 'bihealth'
runs-on: ubuntu-latest
steps:
- uses: GoogleCloudPlatform/release-please-action@v3
id: release
with:
release-type: rust
package-name: mehari

- uses: actions/checkout@v2
if: ${{ steps.release.outputs.release_created }}

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
if: ${{ steps.release.outputs.release_created }}
with:
toolchain: stable
override: true

- uses: Swatinem/[email protected]
if: ${{ steps.release.outputs.release_created }}

- name: Publish crate
if: ${{ steps.release.outputs.release_created }}
uses: actions-rs/cargo@v1
with:
command: publish
args: --token ${{ secrets.CRATES_IO_TOKEN }}
95 changes: 95 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
name: CI

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
Formatting:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt

- name: Check format
run: |
cargo fmt -- --check
Linting:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
lfs: true

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: clippy

- name: Lint with clippy
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}

Testing:
needs: Formatting
runs-on: ubuntu-latest

services:
# The tests need a postgres server; the data will be loaded later
# after checkout.
postgres:
image: postgres
env:
POSTGRES_DB: uta
POSTGRES_USER: uta_admin
POSTGRES_PASSWORD: uta_admin
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432

steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
lfs: 'true'

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true

- uses: Swatinem/[email protected]

- name: Run cargo-tarpaulin with fast tests
uses: actions-rs/[email protected]
with:
version: 0.21.0
args: "-- --test-threads 1"

- name: Codecov submission of fast test results
uses: codecov/codecov-action@v3
with:
verbose: true
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/target
#/Cargo.lock

*~
.*.sw?
/.vscode

*.lock


# Added by cargo
#
# already existing elements were commented out

#/target
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Changelog
14 changes: 14 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[package]
name = "mehari"
version = "0.1.0"
edition = "2021"
authors = ["Manuel Holtgrewe <[email protected]>"]
description = "Variant effect prediction all in Rust"
license = "MIT"
homepage = "https://github.com/bihealth/mehari"
readme = "README.md"

[[bin]]
name = "mehari"

[dependencies]
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[![CI](https://github.com/bihealth/mehari/actions/workflows/rust.yml/badge.svg)](https://github.com/bihealth/mehari/actions/workflows/rust.yml)

# Mehari

<img align="right" width="200" height="200" src="misc/camel.jpeg">

Mehari is a software package for annotating VCF files with variant effect.
The program uses [hgvs-rs](https://crates.io/crates/hgvs) for projecting genomic variants to transcripts and proteins and thus has high prediction quality.
Binary file added misc/camel.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fn main() {
println!("Hello, world!");
}

0 comments on commit c20ba89

Please sign in to comment.