-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add initial structure
- Loading branch information
Showing
10 changed files
with
244 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# This pipeline builds the documentation. | ||
name: docs | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
cache: "pip" | ||
- name: Install Poetry | ||
uses: snok/install-poetry@v1 | ||
with: | ||
virtualenvs-create: true | ||
virtualenvs-in-project: true | ||
version: "1.5.1" | ||
- name: Cache dependencies | ||
id: cache-deps | ||
uses: actions/cache@v2 | ||
with: | ||
path: .venv | ||
key: pydeps-${{ hashFiles('**/poetry.lock') }} | ||
- name: Install the dependencies | ||
run: poetry install --no-interaction --no-root --with dev | ||
if: steps.cache-deps.outputs.cache-hit != 'true' | ||
- name: Install the module | ||
run: poetry install --with dev --no-interaction | ||
- name: Generate the documentation | ||
run: poetry run mkdocs gh-deploy --force |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# This pipeline checks whether the package | ||
# installs properly, passes unit tests and whether | ||
# the code formatting is right. | ||
name: build | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
python-version: ["3.10"] | ||
poetry-version: ["1.3.2"] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Run black formatting check | ||
uses: psf/black@stable | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: "pip" | ||
- name: Install Poetry | ||
uses: snok/install-poetry@v1 | ||
with: | ||
virtualenvs-create: true | ||
virtualenvs-in-project: true | ||
version: ${{ matrix.poetry-version }} | ||
- name: Cache dependencies | ||
id: cache-deps | ||
uses: actions/cache@v2 | ||
with: | ||
path: .venv | ||
key: pydeps-${{ hashFiles('**/poetry.lock') }} | ||
- name: Install the dependencies | ||
run: poetry install --no-interaction --no-root --with dev | ||
if: steps.cache-deps.outputs.cache-hit != 'true' | ||
- name: Install the module | ||
run: poetry install --with dev --no-interaction | ||
- name: Run unit tests | ||
run: poetry run pytest | ||
- name: Run Ruff | ||
run: poetry run ruff check . | ||
- name: Run Pyright (type checking) | ||
run: poetry run pyright | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
repos: | ||
- repo: https://github.com/psf/black | ||
rev: 23.1.0 | ||
hooks: | ||
- id: black | ||
- repo: https://github.com/charliermarsh/ruff-pre-commit | ||
rev: 'v0.0.245' | ||
hooks: | ||
- id: ruff | ||
args: [--fix, --exit-non-zero-on-fix] | ||
- repo: local | ||
hooks: | ||
- id: pyright | ||
name: pyright | ||
entry: poetry run pyright | ||
language: node | ||
pass_filenames: true | ||
types: [python] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,37 @@ | ||
# covvfit- | ||
fitness estimates of SARS-CoV-2 variants | ||
[![Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public.](https://www.repostatus.org/badges/latest/wip.svg)](https://www.repostatus.org/#wip) | ||
[![build](https://github.com/cbg-ethz/covvfit/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/cbg-ethz/covvfit/actions/workflows/test.yml) | ||
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json)](https://github.com/charliermarsh/ruff) | ||
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) | ||
|
||
|
||
# covvfit | ||
Fitness estimates of SARS-CoV-2 variants. | ||
|
||
- **Documentation:** [https://cbg-ethz.github.io/covvfit](https://cbg-ethz.github.io/covvfit) | ||
- **Source code:** [https://github.com/cbg-ethz/covvfit](https://github.com/cbg-ethz/covvfit) | ||
- **Bug reports:** [https://github.com/cbg-ethz/covvfit/issues](https://github.com/cbg-ethz/covvfit/issues) | ||
|
||
|
||
## Installation | ||
|
||
### Developers | ||
Create a new environment, e.g., using [Micromamba](https://mamba.readthedocs.io/en/latest/user_guide/micromamba.html): | ||
```bash | ||
$ micromamba create -n covvfit -c conda-forge python=3.10 | ||
``` | ||
|
||
Then, install the package. | ||
|
||
For a machine where development happens it comes with developer utilities: | ||
|
||
```bash | ||
$ pip install poetry | ||
$ poetry install --with dev | ||
$ pre-commit install | ||
``` | ||
|
||
## See Also | ||
|
||
- [V-pipe](https://cbg-ethz.github.io/V-pipe/): a bioinformatics pipeline for viral sequencing data. | ||
- [cojac](https://github.com/cbg-ethz/cojac): command-line tools for the analysis of co-occurrence of mutations on amplicons. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../README.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
site_name: Inference of SARS-Cov-2 variant fitness | ||
|
||
theme: | ||
name: "material" | ||
features: | ||
- navigation.tabs | ||
- navigation.sections | ||
- toc.integrate | ||
- search.suggest | ||
- search.highlight | ||
- content.tabs.link | ||
- content.code.annotation | ||
- content.code.copy | ||
language: en | ||
palette: | ||
- scheme: default | ||
toggle: | ||
icon: material/toggle-switch-off-outline | ||
name: Switch to dark mode | ||
primary: teal | ||
accent: purple | ||
- scheme: slate | ||
toggle: | ||
icon: material/toggle-switch | ||
name: Switch to light mode | ||
primary: teal | ||
accent: lime | ||
|
||
plugins: | ||
- search | ||
- mkdocstrings: | ||
default_handler: python | ||
handlers: | ||
python: | ||
options: | ||
show_source: false | ||
show_root_heading: true | ||
|
||
nav: | ||
- Documentation: index.md | ||
- API Reference: api.md | ||
|
||
repo_name: covvfit | ||
repo_url: https://github.com/cbg-ethz/covvfit | ||
|
||
watch: | ||
- src/covvfit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
[tool.poetry] | ||
name = "covvfit" | ||
version = "0.1.0" | ||
description = "" | ||
authors = ["David Dreifuss <[email protected]>", "Paweł Czyż <[email protected]>"] | ||
readme = "README.md" | ||
packages = [{include = "covvfit", from = "src"}] | ||
|
||
[tool.poetry.dependencies] | ||
python = ">=3.10,<3.12" | ||
numpy = "^1.25" | ||
matplotlib = "^3.8.0" | ||
pymc = "^5.9.1" | ||
scipy = "^1.11.3" | ||
|
||
|
||
[tool.poetry.group.dev.dependencies] | ||
pytest = "^7.4.3" | ||
ruff = "^0.1.3" | ||
black = "^23.10.1" | ||
pre-commit = "^3.5.0" | ||
pyright = "^1.1.333" | ||
|
||
[build-system] | ||
requires = ["poetry-core"] | ||
build-backend = "poetry.core.masonry.api" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
VERSION = "0.1.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import covvfit | ||
|
||
|
||
def test_imports() -> None: | ||
assert isinstance(covvfit.VERSION, str) |