Skip to content

Commit

Permalink
update scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
rcannood committed Jul 2, 2024
1 parent 99d68bb commit 6cc02f2
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 42 deletions.
40 changes: 40 additions & 0 deletions scripts/add_a_method.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# How to add a method

## Prerequisites

Make sure you have Viash and Docker installed. If not, follow [these instructions](https://openproblems.bio/documentation/fundamentals/requirements) to get everything set up.

## Steps

### 1. Sync the test data

```bash
scripts/download_resources.sh
```

### 2. Create a new method component

Make sure to replace `foo` with the name of your method. Optionally, you can replace `python` with `r` if you are creating an R method.

```bash
common/create_component/create_component \
--task perturbation_prediction \
--language "python" \
--name "foo" \
--api_file src/api/comp_method.yaml \
--output "src/methods/foo"
```

### 3. Fill in metadata

Edit the metadata file at `src/methods/foo/config.vsh.yaml` to describe your method.

### 4. Implement the method

Implement your method in the file `src/methods/foo/script.py` (or `src/methods/foo/script.R` if you are using R).

### 5. Test the component

```bash
viash test src/methods/foo/config.vsh.yaml
```
42 changes: 0 additions & 42 deletions scripts/add_a_method.sh

This file was deleted.

0 comments on commit 6cc02f2

Please sign in to comment.