diff --git a/CITATION.cff b/CITATION.cff index 59ea357..2489945 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -6,6 +6,14 @@ authors: - given-names: "Dmitrii O." family-names: "Chechetkin" repository-code: "https://github.com/chedim/cliffvm" +doi: "10.5281/zenodo.24351422" +identifiers: + - type: doi + value: "10.5281/zenodo.24351422" + description: "Concept DOI: all versions, resolves to the newest" + - type: doi + value: "10.5281/zenodo.24351423" + description: "Version DOI of 0.2.1" license: MIT abstract: >- cliffvm is the cliffhanger VM: a reactive graph of entities with getters and diff --git a/README.md b/README.md index 2d27e9a..e19b81c 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # cliffvm +[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.24351422.svg)](https://doi.org/10.5281/zenodo.24351422) + The **cliffhanger VM**: a reactive graph of entities with getters and setters, written in Rust, with a SQLite store, an HTTP door and drivers for files, commands, HTTP, SQL and cron. Its packs and its pages are written in **c1f**, the field's own language ([chedim/cliffhanger](https://github.com/chedim/cliffhanger)). It is the engine of [babyseat](https://github.com/chedim/babyseat), the AI seat whose memory is a graph the model programs; it also builds for the browser (wasm) and talks to other programs over [GraphLink](https://github.com/chedim/graphlink). **Status: the engine lives here.** This repository was cut from the `native/` folder of babyseat with its history, so `git log` shows the engine's life so far. Engine changes are made here and released here (a tag-triggered release builds the six platform binaries); babyseat takes the release named by its `CLIFFVM_VERSION`, and `native/` is gone from it. The tests that start the real seat on babyseat's own packs and apps live in babyseat (`seat-tests/`), where they run on the release (the library and the program). diff --git a/tests/citation.rs b/tests/citation.rs index da50efd..7cb60b4 100644 --- a/tests/citation.rs +++ b/tests/citation.rs @@ -36,3 +36,16 @@ fn a_version_in_the_citation_file_is_the_crates_version() { assert_eq!(v, crate_v); assert!(field(&c, "date-released").is_some(), "a version comes with its date"); } + +/// The DOI Zenodo gave the project: the citation file names it (`doi`, and the concept and version DOIs under `identifiers`), and the README shows it as a badge +/// near the top, linking to it. +#[test] +fn a_doi_in_the_citation_file_is_the_readmes_badge_and_is_listed_as_an_identifier() { + let c = read(&root().join("CITATION.cff")); + let Some(doi) = field(&c, "doi") else { return }; + assert!(c.contains(&format!("value: \"{doi}\"")), "the concept DOI is also an identifier"); + assert!(c.contains("description: \"Concept DOI"), "and says it is the concept DOI"); + let readme = read(&root().join("README.md")); + let top: String = readme.lines().take(6).collect::>().join("\n"); + assert!(top.contains(&format!("[![DOI](https://zenodo.org/badge/DOI/{doi}.svg)](https://doi.org/{doi})")), "the badge is in the first lines of the README: {top}"); +}