Skip to content

Commit

Permalink
Add docs section
Browse files Browse the repository at this point in the history
Nothing is changed on the level of the virus or toolbox information.
  • Loading branch information
tverbeiren committed Feb 23, 2024
2 parents e39c09a + cfe71ab commit 3d2e482
Show file tree
Hide file tree
Showing 73 changed files with 1,172 additions and 135 deletions.
19 changes: 12 additions & 7 deletions .github/workflows/release-to-virusbank.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
on:
push:
branches: [ main ]
branches: [main]

name: Render and deploy to Netlify and VirusBank

Expand All @@ -15,11 +15,16 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Assemble alpha/toolbox.json
- name: Assemble alpha/toolbox.json
uses: mikefarah/yq@master
with:
cmd: yq -M -o=json src/toolbox.yaml > toolbox/toolbox.json

- name: Create families.json based src/families.yaml
uses: mikefarah/yq@master
with:
cmd: yq -M -o=json src/families.yaml > families.json

- uses: r-lib/actions/setup-r@v2
with:
r-version: "4.2"
Expand All @@ -32,22 +37,22 @@ jobs:
- name: Install Quarto
uses: quarto-dev/quarto-actions/setup@v2
with:
version: 1.4.449
version: 1.4.549
tinytex: true

- name: Render Quarto Project
uses: quarto-dev/quarto-actions/render@v2
with:
to: html

- name: Deploy to Netlify 🚀
uses: data-intuitive/netlify-deploy-site@v1
with:
auth: ${{ secrets.NETLIFY_AUTH_TOKEN }}
site: ${{ env.NETLIFY_SITE_ID }}
dir: '_site'
dir: "_site"
prod: true
message: 'Deploy production ${{ github.ref }}'
message: "Deploy production ${{ github.ref }}"

- name: Deploy preview to VirusBank
id: deploy_virusbank
Expand All @@ -56,6 +61,6 @@ jobs:
server: ftp.virusbankplatformorg.webhosting.be
username: floor@virusbankplatformorg
password: ${{ secrets.FTP_AUTH_SECRET }}
local-dir: './_site/'
local-dir: "./_site/"
log-level: standard
# dangerous-clean-slate: true
19 changes: 12 additions & 7 deletions .github/workflows/release_to_netlify.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
on:
push:
branches-ignore: [ main ]
# push:
# branches-ignore: [ main ]
pull_request:
types:
- opened
Expand All @@ -20,11 +20,16 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Assemble alpha/toolbox.json
- name: Create toolbox.json based on src/toolbox.yaml
uses: mikefarah/yq@master
with:
cmd: yq -M -o=json src/toolbox.yaml > toolbox/toolbox.json

- name: Create families.json based src/families.yaml
uses: mikefarah/yq@master
with:
cmd: yq -M -o=json src/families.yaml > families.json

- uses: r-lib/actions/setup-r@v2
with:
r-version: "4.2"
Expand All @@ -37,24 +42,24 @@ jobs:
- name: Install Quarto
uses: quarto-dev/quarto-actions/setup@v2
with:
version: 1.4.449
version: 1.4.549
tinytex: true

- name: Render Quarto Project
uses: quarto-dev/quarto-actions/render@v2
with:
to: html

- name: Deploy preview 🚀
id: deploy_preview
if: github.event_name == 'pull_request'
uses: data-intuitive/netlify-deploy-site@v1
with:
auth: ${{ secrets.NETLIFY_AUTH_TOKEN }}
site: ${{ env.NETLIFY_SITE_ID }}
dir: '_site'
dir: "_site"
alias: "${{ env.BRANCH_NAME }}"
message: 'Deploy production ${{ github.ref }}'
message: "Deploy production ${{ github.ref }}"

- uses: thollander/actions-comment-pull-request@v2
if: github.event_name == 'pull_request'
Expand Down
13 changes: 11 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
alpha/index.html
alpha/index_files/
.Rhistory
_material

# node
node_modules
package.json
package-lock.json

# quarto
/.quarto/
_site
index_files
_extensions
49 changes: 30 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,46 @@
# VirusBank Phylotree project

## Requirements and setup

In order to *render* this site/app, the following are required:
Update

0. `wget`
## Introduction

1. Quarto
This repository contains the code *and* content for the PhyloViz part of
the \[VirusBank platform\](https://virusbankplatform.be. The idea is
that as much as possible of the site is generated, either during
pre-rendering or page load. Next to that, all functionality that is
generic is handled as such and can be found under `_js/`.

2. `yq`:
We use [Quarto](https://quarto.org) for rendering the site from source
code and content to what you see on the internet. Quarto files have the
`.qmd` extension and typically contain a YAML header (the part between
the `---` lines). By using Quarto, it’s possible for instance to include
files from `_js/` into another file using a `` statement.

``` sh
sudo wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64
sudo chmod a+x /usr/local/bin/yq
```
This can be illustrated using three situations that the site/app is
created for:

## Rendering
### A new tool is available for a virus

## Setup
Adding a new tool for a virus should be easy, especially if we keep in
mind that developing tools is the core business of the VirusBank.

### Toolbox page
### Adding a virus to an existing family

The toolbox page is based on a YAML file.
If tools are developed or made available for a virus that was not yet
listed, we should be able to quickly add this information and let this
be reflected where relevant.

### Virus family pages
### Updating information about a virus

Every virus family is contained in a *folder* of its own. Inside this
folder, everything related to this specific family can be found.
Next to structure information about a virus, we also store and show
semi-structured data: transmission and symptoms, for instance. This
information should be easy to add or update.

### Virus pages
These scenarios (and others) have been taken into account for the design
of the site/app.

## Various remarks
## Documentation

- `d3` is loaded by Quarto already, there is not need to load it again
Documentation has been integrated in the app itself and [is stored onder
`docs/`](https://steady-beijinho-13360d.netlify.app//docs).
35 changes: 11 additions & 24 deletions README.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -3,39 +3,26 @@ title: VirusBank Phylotree project
format: gfm
---

## Requirements and setup
## Introduction

In order to _render_ this site/app, the following are required:
This repository contains the code _and_ content for the PhyloViz part of the [VirusBank platform](https://virusbankplatform.be. The idea is that as much as possible of the site is generated, either during pre-rendering or page load. Next to that, all functionality that is generic is handled as such and can be found under `_js/`.

0. `wget`
We use [Quarto] for rendering the site from source code and content to what you see on the internet. Quarto files have the `.qmd` extension and typically contain a YAML header (the part between the `---` lines). By using Quarto, it's possible for instance to include files from `_js/` into another file using a `{{< include ... >}}` statement.

1. Quarto
[Quarto]: https://quarto.org

2. `yq`:
This can be illustrated using three situations that the site/app is created for:

```sh
sudo wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64
sudo chmod a+x /usr/local/bin/yq
```

## Rendering
- __A new tool is available for a virus__: Adding a new tool for a virus should be easy, especially if we keep in mind that developing tools is the core business of the VirusBank.

## Setup
- __Adding a virus to an existing family__: If tools are developed or made available for a virus that was not yet listed, we should be able to quickly add this information and let this be reflected where relevant.

### Toolbox page
- __Updating information about a virus__: Next to structure information about a virus, we also store and show semi-structured data: transmission and symptoms, for instance. This information should be easy to add or update.

The toolbox page is based on a YAML file.
These scenarios (and others) have been taken into account for the design of the site/app.

### Virus family pages

Every virus family is contained in a _folder_ of its own. Inside this folder, everything related to this specific family can be found.

### Virus pages



## Various remarks

- `d3` is loaded by Quarto already, there is not need to load it again
## Documentation

Documentation has been integrated in the app itself and [is stored onder `docs/`](https://steady-beijinho-13360d.netlify.app//docs).

7 changes: 5 additions & 2 deletions _quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ project:
website:
title: "VirusBank"
repo-url: https://github.com/data-intuitive/VirusBank
sidebar:
contents: docs/*
format:
html:
title-block-banner: virus.jpg
Expand Down Expand Up @@ -72,7 +74,7 @@ format:
})
}
window.addEventListener("load", cleanUpDOM);
</script>
sidebar: false
Expand All @@ -81,8 +83,9 @@ format:
mainfont: "Mukta"
font-size: 16em
css: styles.css
scss: pimp.scss
toc: false
resources:
resources:
- families.json
- tree.newick
- family.xlsx
Expand Down
3 changes: 3 additions & 0 deletions bin/find_empty_toolbox_qmd.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

find . -type f -empty | grep "\-toolbox"
6 changes: 6 additions & 0 deletions bin/install_nodejs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

sudo apt-get update
sudo apt-get install nodejs

npm install xlsx liquidjs exceljs
11 changes: 11 additions & 0 deletions bin/install_quarto.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

wget https://github.com/quarto-dev/quarto-cli/releases/download/v1.4.550/quarto-1.4.550-linux-amd64.deb -O /tmp/quarto.deb
sudo dpkg -i /tmp/quarto.deb

sudo apt-get install r-base r-base-dev -y
quarto install tinytex

Rscript -e 'dir.create(Sys.getenv("R_LIBS_USER"), recursive = TRUE)'
Rscript -e '.libPaths(Sys.getenv("R_LIBS_USER"))'
Rscript -e 'install.packages("rmarkdown)'
Binary file added docs/excel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/family-page.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/add_virus_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/add_virus_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/failure_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/failure_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/failure_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/gh-actions.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/gh-branch_create.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/gh-branch_created.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/gh-branch_new.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/gh-codespaces_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/gh-codespaces_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/gh-codespaces_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/gh-codespaces_created.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/gh-codespaces_created_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/gh-cs_commit_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/gh-cs_commit_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/gh-cs_commit_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/gh-cs_commit_4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/gh-cs_commit_5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/gh-cs_commit_6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/gh-cs_commit_7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/gh-cs_extension_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/gh-cs_extension_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/gh-cs_extension_2.png
Binary file added docs/img/gh-cs_pr.png
Binary file added docs/img/gh-main.png
Binary file added docs/img/gh-main_branches.png
Binary file added docs/img/gh-pr.png
Binary file added docs/img/gh-pr_conflict.png
Binary file added docs/img/gh-pr_created.png
Binary file added docs/img/gh-pr_cs-again.png
Binary file added docs/img/gh-pr_merge_1.png
Binary file added docs/img/gh-pr_new.png
Binary file added docs/img/gh-pr_new_branches.png
Binary file added docs/img/offline_1.png
Binary file added docs/img/offline_2.png
Binary file added docs/img/offline_3.png
Binary file added docs/img/offline_4.png
Binary file added docs/img/offline_5.png
Binary file added docs/img/offline_6.png
Binary file added docs/img/offline_7.png
Binary file added docs/img/xlsx_1.png
Binary file added docs/img/xlsx_2.png
Binary file added docs/img/xlsx_3.png
Binary file added docs/img/xlsx_4.png
21 changes: 21 additions & 0 deletions docs/index.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
title: VirusBank documentation
format:
html:
toc: true
sidebar: true
page-layout: article
---

Table of contents:

1. [Introduction](/docs/introduction.qmd)
2. [Information on how it ties together](/docs/internals.qmd)
3. [What one needs to know concerning the UI/UX](docs/ui-ux.qmd)
3. [Some information on specific components and styling](/docs/ui-ux.qmd)
4. [Some common scenarios in detail](/docs/scenarios.qmd)
5. [General information on how to use Github for the scenarios](docs/use-github.qmd)


A rendered version of the repository [`README` file](/docs/readme.qmd).

Loading

0 comments on commit 3d2e482

Please sign in to comment.