From 74257dfff4eb56f6746a1f3567a9a22bda1bf522 Mon Sep 17 00:00:00 2001 From: Trevor Manz Date: Wed, 23 Oct 2024 09:58:03 -0400 Subject: [PATCH 1/2] chore: Apply Nezar nits --- paper/paper.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/paper/paper.md b/paper/paper.md index a4cd8c60..554d1ceb 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -43,10 +43,10 @@ reusable web-based widgets in interactive computing environments (\autoref{fig:overview}). First, it defines a standard for widget front-end code based on the web browser's native module system. Second, it provides tools to author, distribute, and execute these modules across web-based computing -platforms. Since its release a year and a half ago, anywidget has steadily -gained adoption. Nearly 100 new widgets have been created or ported to -anywidget and published to the Python Package Index (PyPI), along with many -standalone scripts and notebooks. These tools cover general-purpose +platforms. Since its release in February 2023, anywidget has steadily gained +adoption. As of October 2024, nearly 100 new widgets have been created or +ported to anywidget and published to the Python Package Index (PyPI), along +with many standalone scripts and notebooks. These tools cover general-purpose visualization libraries [@jscatter; @Heer2024] as well as notebook integrations for applications in biology [@gos; @vitessce; @viv; @cev], mapping [@lonboard], astronomy [@ipyaladin], and education [@drawdata]. Anywidget has also been @@ -54,7 +54,7 @@ integrated into popular visualization libraries like Altair [@altair], enhancing interactivity in notebooks and deepening user engagement with visualizations and code. -![The anywidget project. The Anywidget Front-End Module (AFM) is a specification for widget front-end code based on ECMAScript (ES) modules [@ecma]. AFM can be written in web-standard ES or with _authoring tools_ that support popular front-end frameworks. The `anywidget` Python package adapts Jupyter-compatible platforms (JCPs) into AFM-compatible _host platforms_, enabling Jupyter Widgets to be authored and distributed with AFM. Other _host platforms_ support AFM directly. The _project CLI_ can be used to bootstrap new anywidget projects that are ready to publish to PyPI. \label{fig:overview}](overview.png) +![The anywidget project. Components highlighted in magenta. The Anywidget Front-End Module (AFM) is a specification for widget front-end code based on ECMAScript (ES) modules [@ecma]. AFM can be written in web-standard ES or with _authoring tools_ that support popular front-end frameworks. The `anywidget` Python package adapts Jupyter-compatible platforms (JCPs) into AFM-compatible _host platforms_, enabling Jupyter Widgets to be authored and distributed with AFM. Other _host platforms_ support AFM directly. The _project CLI_ can be used to bootstrap new anywidget projects that are ready to publish to PyPI. \label{fig:overview}](overview.png) # Statement of need @@ -78,13 +78,13 @@ interactive components, hindering the development of a composable solutions. The Jupyter Widgets system shows potential for aligning interactive visualization systems with the broader notebook ecosystem. However, the complexity and error-prone nature of authoring custom widgets has limited their -adoption by the visualization community. Widget development is hindered by the -need to integrate front-end code across diverse environments, fragmented -distribution models, and a cumbersome development experience [@scipy]. -Moreover, Jupyter Widgets are Jupyter-specific, with the widest support limited -to Python kernels, leaving gaps in addressing new and alternative interactive -computing environments. A universal protocol is needed to simplify authorship -and support an ecosystem of pluggable interactive widgets. +adoption by the visualization community. Widget development is hindered by +fragmented distribution and cumbersome development experience due to complex +integration requirements from diverse environments [@scipy]. Moreover, Jupyter +Widgets are Jupyter-specific, with the widest support limited to Python +kernels, leaving gaps in addressing new and alternative interactive computing +environments. A universal protocol is needed to simplify authorship and support +an ecosystem of pluggable interactive widgets. # Overview @@ -120,7 +120,7 @@ communicate with the host and modify the output user interface (UI). Importantly, AFM does not impose specific implementations for widget state or UI management. By making host requirements explicit, it decouples widget front-end code from host implementations, thereby improving widget portability -[@scipy]. With AFM, developers can author a widget writing a web-standard ES +[@scipy]. With AFM, developers can author a widget by writing a web-standard ES module, either inline or in a separate file, without a build process (\autoref{fig:afm-and-anywidget}a, top). For better ergonomics when creating UIs, developers can introduce a build step targeting AFM to utilize advanced From b01035bc9419c3fce328c9ae80a0e32a79c1ad38 Mon Sep 17 00:00:00 2001 From: Trevor Manz Date: Wed, 23 Oct 2024 09:58:14 -0400 Subject: [PATCH 2/2] Remove myst config --- paper/export-pdf.ts | 79 --------------------------------------------- paper/myst.yml | 38 ---------------------- 2 files changed, 117 deletions(-) delete mode 100644 paper/export-pdf.ts delete mode 100644 paper/myst.yml diff --git a/paper/export-pdf.ts b/paper/export-pdf.ts deleted file mode 100644 index 79942962..00000000 --- a/paper/export-pdf.ts +++ /dev/null @@ -1,79 +0,0 @@ -// deno run -A export-pdf.ts [output.pdf] - -// @ts-expect-error -import { parse, stringify } from "jsr:@std/yaml"; - -let [frontMatter, raw] = Deno.readTextFileSync("paper.md") - .replace("---", "") - .split("---"); - -let output = Deno.args[0] || "dist/paper.pdf"; - -let data = parse(frontMatter); -// biome-ignore lint/performance/noDelete: -delete data["affiliations"]; -// biome-ignore lint/performance/noDelete: -delete data["authors"]; -// biome-ignore lint/performance/noDelete: -delete data["tags"]; -// biome-ignore lint/performance/noDelete: -delete data["date"]; - -data["exports"] = { - format: "typst", - template: "lapreprint-typst", - output: output, -}; - -data["margin"] = [ - { - title: "Correspondence to", - content: "Correspondence: [author-email]", - }, -]; -data["abstract"] = `\ -The anywidget project provides a specification and toolset for creating -portable web-based widgets for computational notebooks. It defines a standard -for front-end widget code using ECMAScript modules and offers tools for -authoring, distributing, and executing these modules across Jupyter-compatible -platforms (e.g., JupyterLab, Google Colab, VS Code). The project has spurred -the creation of many interactive visualization libraries and has been -integrated into existing ones. The standard has been embraced by other -notebook platforms and web frameworks, extending the reach of interactive -widgets beyond the Jupyter ecosystem.`.trim(); - -let markdown = raw - // Replace markdown images with myst images - .replace(/!\[(.*?)\]\((.*?)\)/g, (_, alt: string, filepath: string) => { - let [content, labelPart] = alt.split("\\label{"); - let label = labelPart.split("}")[0]; - return `\n -:::{figure} ${filepath} -:label: ${label} -${content} -::: -`; - }) - .replace(/\\autoref{(.*?)}/g, "[@$1]") - .replace(/(\[@.*?\])(\w)/g, "$1 $2") - .replace("# Summary", "# General Summary") - .replace("# Overview", "# Project Overview"); - -Deno.writeTextFileSync( - "tmp.md", - `\ ---- -${stringify(data)} ---- -${markdown}`, -); - -new Deno.Command("myst", { args: ["build", "--pdf", "tmp.md"] }) - .output() - .then((data) => { - console.log(`PDF saved to ${output}`); - }) - .catch(console.error) - .finally(async () => { - await Deno.remove("tmp.md"); - }); diff --git a/paper/myst.yml b/paper/myst.yml deleted file mode 100644 index 8a9f9de2..00000000 --- a/paper/myst.yml +++ /dev/null @@ -1,38 +0,0 @@ -version: 1 -project: - authors: - - name: Trevor Manz - email: "trevor\_manz@g.harvard.edu" - orcid: 0000-0001-7694-5164 - affiliations: - - Department of Biomedical Informatics, Harvard Medical School - corresponding: "trevor\_manz@g.harvard.edu" - - name: Nezar Abdennur - email: "nezar.abdennur@umassmed.edu" - orcid: 0000-0001-5814-0864 - affiliations: - - Department of Genomics and Computational Biology, UMass Chan Medical School - - Department of Systems Biology, UMass Chan Medical School - - name: Nils Gehlenborg - email: "nils@hms.harvard.edu" - orcid: 0000-0003-0327-8297 - affiliations: - - Department of Biomedical Informatics, Harvard Medical School - keywords: - - Computational notebooks - - Jupyter - - Widgets - - Python - - R - - JavaScript - - Data visualization - - Interactive computing - abbreviations: - JCP: Jupyter Compatible Platform - AFM: Anywidget Front-End Module - ESM: ECMAScript Modules - # The rest of the information shouldn't be modified - subject: Research Article - open_access: true - license: CC-BY-4.0 - date: 2024-06-07