Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ga4gh-beacon/beacon-verifier
Tool to verify that a Beacon implementation follows the specification
https://github.com/ga4gh-beacon/beacon-verifier
Last synced: about 1 month ago
JSON representation
Tool to verify that a Beacon implementation follows the specification
- Host: GitHub
- URL: https://github.com/ga4gh-beacon/beacon-verifier
- Owner: ga4gh-beacon
- Created: 2021-06-23T08:34:42.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-12-21T18:47:57.000Z (about 2 years ago)
- Last Synced: 2024-10-13T17:21:34.849Z (2 months ago)
- Language: Rust
- Size: 4.03 MB
- Stars: 2
- Watchers: 9
- Forks: 3
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Beacon verifier
![beacon-verifier.001.png](assets/diagram.jpeg)
## Installation
> Requirements: [Rust](https://www.rust-lang.org/tools/install)
> **Minimum Rust version**: `1.56````sh
cargo install beacon-verifier
```## Usage
You can specify one or multiple urls:
```sh
beacon-verifier https://beacon-url.com/
```> By default, the [Beacon v2 model](https://github.com/ga4gh-beacon/beacon-v2-Models/tree/main/BEACON-V2-Model) is being used. But you can provide your own model with the `--model` option. The model should follow the [Beacon Framework](https://github.com/ga4gh-beacon/beacon-framework-v2).
```sh
beacon-verifier --model https://beacon-model.com/ https://beacon-url.com/
```Alternatively, you can specify a local path for the model:
```sh
beacon-verifier --model file://$PWD/tests/BEACON-V2-Model https://beacon-url.com/
```## Output
The output is a JSON file written to stdout. You can redirect it to save it into a file.
```sh
beacon-verifier https://beacon-url.com/ > /path/to/output
```### Output example
```json
[
{
"name": "Beacon Name",
"url": "https://...",
"entities": {
"individuals": {
"name": "Individuals",
"url": "https://.../individuals",
"valid": true,
"error": null,
},
"variants": {
"name": "Variants",
"url": "https://.../variants",
"valid": false,
"error": "Bad schema"
},
"biosamples": {
"name": "Biosamples",
"url": "https://.../biosamples",
"valid": null,
"error": "Unresponsive endpoint"
}
}
}
]
```### Output format
The output is a `Vec` with the following format:
```rust
struct Beacon {
name: String,
url: String,
entities: Vec
}struct Entity {
name: String,
url: String,
valid: Option,
error: Option
}
```