kreshuklab / bioimg_rs Goto Github PK
View Code? Open in Web Editor NEWA rust implementation of bioimage spec parser
A rust implementation of bioimage spec parser
Eg:
let bad_rdf = Rdf {
format_version: Version {
major: 1,
minor: 2,
patch: 3,
},
description: "".try_into().unwrap(),
name: "".try_into().unwrap(),
attachments: None,
...
As in your test, modified with bad string values... But this passes the compiler fine as it's the unwrap
that will fail at runtime.
Eg a test program using this gives:
warning: `bioimg_spec` (lib) generated 2 warnings (run `cargo fix --lib -p bioimg_spec` to apply 1 suggestion)
Compiling third_party v0.1.0 (/home/jeremy/documents/kth/bioimg_rs/third_party)
Finished dev [unoptimized + debuginfo] target(s) in 1.54s
Running `target/debug/third_party`
I'm a Rust coder hard coding an RDF...
thread 'main' panicked at third_party/src/main.rs:13:36:
called `Result::unwrap()` on an `Err` value: BadLength { value: "", allowed: 1..=1024 }
Seems unlikely that there should be workspace-level dependencies - see https://github.com/kreshuklab/bioimg_rs/blob/master/Cargo.toml#L7
When looking into the feasibility of this recently, I came across eg
validator
- https://crates.io/crates/validatorgarde
- https://crates.io/crates/gardeserde_valid
- https://crates.io/crates/serde_validPerhaps it would make more sense to use one of these for the "easy" fields and only worry about the more complicated validation logic ourselves - or is there a reason not to?
to save incomplete work
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.