From becfe7bccef4a3d115183f5e2df7eed36a0eb74c Mon Sep 17 00:00:00 2001 From: David Liu Date: Sun, 14 Apr 2024 22:30:47 -0400 Subject: [PATCH] Rename package to memory-viz (#25) --- README.md | 8 ++++---- demo/package.json | 10 +++++----- demo/src/MemoryModelsUserInput.tsx | 2 +- demo/src/SvgDisplay.tsx | 2 +- demo/src/html/index.html | 5 ++--- demo/webpack.config.js | 2 +- docs/docs/99-api/index.md | 6 +++--- docs/docs/99-api/modules.md | 4 ++-- docs/docusaurus.config.js | 14 +++++++------- docs/package.json | 2 +- docs/src/pages/index.md | 6 +++--- package-lock.json | 12 ++++++------ package.json | 6 +++--- webpack.config.js | 4 ++-- 14 files changed, 41 insertions(+), 42 deletions(-) diff --git a/README.md b/README.md index 05db0a96..2ac0c15c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Memory model diagrams +# MemoryViz: Creating memory model diagrams This package generates memory model diagrams for Python code in the style of CSC110/111/148 at the University of Toronto. This uses the [Rough.js](https://roughjs.com/) Javascript library to emulate the look of hand-drawn diagrams. @@ -8,10 +8,10 @@ This uses the [Rough.js](https://roughjs.com/) Javascript library to emulate the ## Installation (users) 1. Install [Node.js](https://nodejs.org/en/). -2. Install the `memory-models-rough` package from GitHub (it is currently not on npm): +2. Install the `memory-viz` package from GitHub (it is currently not on npm): ```console - $ npm install git+https://github.com/david-yz-liu/memory-models-rough.git -g + $ npm install git+https://github.com/david-yz-liu/memory-viz.git -g ``` _Note_: omit the `-g` flag if you want to install the package into just the current working directory. @@ -89,7 +89,7 @@ Before showing the full capabilities of the project, here is a simple example to one stack-frame and two objects. ```javascript -const { draw } = require("../../dist/memory_models_rough.js"); +const { draw } = require("../../dist/memory_viz.js"); const objects = [ { diff --git a/demo/package.json b/demo/package.json index 5fb4b4dc..727fa37a 100644 --- a/demo/package.json +++ b/demo/package.json @@ -1,7 +1,7 @@ { - "name": "memory-models-rough-demo", + "name": "memory-viz-demo", "version": "0.1.0", - "description": "Demo website for memory-models-rough", + "description": "Demo website for memory-viz", "scripts": { "test": "jest --no-cache", "test-cov": "jest --no-cache --coverage", @@ -10,15 +10,15 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/david-yz-liu/memory-models-rough.git" + "url": "git+https://github.com/david-yz-liu/memory-viz.git" }, "author": "David Liu", "license": "MIT", "bugs": { - "url": "https://github.com/david-yz-liu/memory-models-rough/issues" + "url": "https://github.com/david-yz-liu/memory-viz/issues" }, "private": true, - "homepage": "https://github.com/david-yz-liu/memory-models-rough#readme", + "homepage": "https://github.com/david-yz-liu/memory-viz#readme", "devDependencies": { "@babel/core": "^7.23.6", "@babel/preset-env": "^7.23.6", diff --git a/demo/src/MemoryModelsUserInput.tsx b/demo/src/MemoryModelsUserInput.tsx index 571ec47e..35c0a03a 100644 --- a/demo/src/MemoryModelsUserInput.tsx +++ b/demo/src/MemoryModelsUserInput.tsx @@ -134,7 +134,7 @@ function MemoryModelsTextInput(props: MemoryModelsTextInputPropTypes) { ); } -//TODO: Retrieve min and max seeds from memory-models-rough +//TODO: Retrieve min and max seeds from memory-viz function MemoryModelsConfigInput(props: MemoryModelsConfigInputPropTypes) { const handleSeedChange = (event) => { event.preventDefault(); diff --git a/demo/src/SvgDisplay.tsx b/demo/src/SvgDisplay.tsx index ce65523c..50de370d 100644 --- a/demo/src/SvgDisplay.tsx +++ b/demo/src/SvgDisplay.tsx @@ -16,7 +16,7 @@ export default function SvgDisplay(props: SvgDisplayPropTypes) { useEffect(() => { if (props.jsonResult !== null) { // deep copy jsonResult as mem.draw mutates input JSON - // https://github.com/david-yz-liu/memory-models-rough/pull/20#discussion_r1513235452 + // https://github.com/david-yz-liu/memory-viz/pull/20#discussion_r1513235452 const jsonResultCopy = structuredClone(props.jsonResult); const m = mem.draw(jsonResultCopy, props.configData.useAutomation, { ...props.configData.overallDrawConfig, diff --git a/demo/src/html/index.html b/demo/src/html/index.html index 038463d6..cfe91ced 100644 --- a/demo/src/html/index.html +++ b/demo/src/html/index.html @@ -10,9 +10,8 @@

<%= htmlWebpackPlugin.options.title %>

Demos of the - memory-models-roughMemoryViz Javascript library for visualizing Python memory.

diff --git a/demo/webpack.config.js b/demo/webpack.config.js index 149ae31c..3f0c71d8 100644 --- a/demo/webpack.config.js +++ b/demo/webpack.config.js @@ -48,7 +48,7 @@ module.exports = [ }, plugins: [ new HtmlWebpackPlugin({ - title: "Memory Models Rough Demo", + title: "MemoryViz Demo", filename: "./index.html", template: "./src/html/index.html", }), diff --git a/docs/docs/99-api/index.md b/docs/docs/99-api/index.md index c5604b94..b9275049 100644 --- a/docs/docs/99-api/index.md +++ b/docs/docs/99-api/index.md @@ -1,6 +1,6 @@ --- id: "index" -title: "memory-models-rough" +title: "MemoryViz" sidebar_label: "Readme" sidebar_position: 0 custom_edit_url: null @@ -16,10 +16,10 @@ This uses the [Rough.js](https://roughjs.com/) Javascript library to emulate the ## Installation (users) 1. Install [Node.js](https://nodejs.org/en/). -2. Install the `memory-models-rough` package from GitHub (it is currently not on npm): +2. Install the `memory-viz` package from GitHub (it is currently not on npm): ```console - $ npm install git+https://github.com/david-yz-liu/memory-models-rough.git -g + $ npm install git+https://github.com/david-yz-liu/memory-viz.git -g ``` _Note_: omit the `-g` flag if you want to install the package into just the current working directory. diff --git a/docs/docs/99-api/modules.md b/docs/docs/99-api/modules.md index 38921d0f..708f5392 100644 --- a/docs/docs/99-api/modules.md +++ b/docs/docs/99-api/modules.md @@ -1,6 +1,6 @@ --- id: "modules" -title: "memory-models-rough" +title: "MemoryViz" sidebar_label: "Exports" sidebar_position: 0.5 custom_edit_url: null @@ -32,4 +32,4 @@ the produced canvas #### Defined in -[user_functions.ts:29](https://github.com/david-yz-liu/memory-models-rough/blob/bc37a9e/src/user_functions.ts#L29) +[user_functions.ts:29](https://github.com/david-yz-liu/memory-viz/blob/bc37a9e/src/user_functions.ts#L29) diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index ffc08060..1a86d6ff 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -8,7 +8,7 @@ import { themes as prismThemes } from "prism-react-renderer"; /** @type {import('@docusaurus/types').Config} */ const config = { - title: "Memory Models Rough", + title: "MemoryViz", tagline: "Generator for Python memory model diagrams", favicon: "img/favicon.ico", @@ -16,7 +16,7 @@ const config = { url: "https://www.cs.toronto.edu/", // Set the // pathname under which your site is served // For GitHub pages deployment, it is often '//' - baseUrl: "/~david/memory-models-rough/", + baseUrl: "/~david/memory-viz/", // GitHub pages deployment config. // If you aren't using GitHub pages, you don't need these. @@ -44,7 +44,7 @@ const config = { // Please change this to your repo. // Remove this to remove the "edit this page" links. editUrl: - "https://github.com/david-yz-liu/memory-models-rough/tree/main/docs", + "https://github.com/david-yz-liu/memory-viz/tree/main/docs", }, blog: false, // blog: { @@ -67,9 +67,9 @@ const config = { // Replace with your project's social card image: "img/docusaurus-social-card.jpg", navbar: { - title: "Memory Models Rough", + title: "MemoryViz", logo: { - alt: "Memory Models Rough Logo", + alt: "MemoryViz Logo", src: "img/logo.svg", }, items: [ @@ -80,7 +80,7 @@ const config = { label: "Docs", }, { - href: "https://github.com/david-yz-liu/memory-models-rough", + href: "https://github.com/david-yz-liu/memory-viz", label: "GitHub", position: "right", }, @@ -124,7 +124,7 @@ const config = { // }, { label: "GitHub", - href: "https://github.com/david-yz-liu/memory-models-rough", + href: "https://github.com/david-yz-liu/memory-viz", }, ], }, diff --git a/docs/package.json b/docs/package.json index acc1cdca..d300513d 100644 --- a/docs/package.json +++ b/docs/package.json @@ -1,5 +1,5 @@ { - "name": "memory-models-rough-docs", + "name": "memory-viz-docs", "version": "0.1.0", "private": true, "scripts": { diff --git a/docs/src/pages/index.md b/docs/src/pages/index.md index 2e37506c..034b931a 100644 --- a/docs/src/pages/index.md +++ b/docs/src/pages/index.md @@ -12,10 +12,10 @@ This uses the [Rough.js](https://roughjs.com/) Javascript library to emulate the ## Installation -You can install the `memory-models-rough` package from GitHub (it is currently not on npm): +You can install the `memory-viz` package from GitHub (it is currently not on npm): ```console -$ npm install git+https://github.com/david-yz-liu/memory-models-rough.git +$ npm install git+https://github.com/david-yz-liu/memory-viz.git ``` ## Example @@ -24,7 +24,7 @@ Here's an example of using this package in a Javascript file executed by NodeJS. ```javascript // simple_demo.js -const { draw } = require("memory_models_rough"); +const { draw } = require("memory_viz"); const objects = [ { diff --git a/package-lock.json b/package-lock.json index 7dde43e0..f3e996a0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { - "name": "memory-models-rough", + "name": "memory-viz", "version": "0.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "memory-models-rough", + "name": "memory-viz", "version": "0.1.0", "license": "MIT", "workspaces": [ @@ -36,7 +36,7 @@ } }, "demo": { - "name": "memory-models-rough-demo", + "name": "memory-viz-demo", "version": "0.1.0", "license": "MIT", "dependencies": { @@ -69,7 +69,7 @@ } }, "docs": { - "name": "memory-models-rough-docs", + "name": "memory-viz-docs", "version": "0.1.0", "dependencies": { "@docusaurus/core": "3.0.1", @@ -14087,11 +14087,11 @@ "node": ">= 4.0.0" } }, - "node_modules/memory-models-rough-demo": { + "node_modules/memory-viz-demo": { "resolved": "demo", "link": true }, - "node_modules/memory-models-rough-docs": { + "node_modules/memory-viz-docs": { "resolved": "docs", "link": true }, diff --git a/package.json b/package.json index 06e645bd..8a01da9e 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "memory-models-rough", + "name": "memory-viz", "version": "0.1.0", - "description": "Library for creating Python memory model diagrams that look hand-drawn.", - "main": "dist/memory_models_rough.js", + "description": "Library for creating beginner-friendly memory model diagrams.", + "main": "dist/memory_viz.js", "scripts": { "test": "jest --no-cache", "test-cov": "jest --no-cache --coverage", diff --git a/webpack.config.js b/webpack.config.js index 3fe7c315..25f4a195 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -6,9 +6,9 @@ module.exports = [ entry: path.resolve(__dirname, "src/index.ts"), output: { path: path.resolve(__dirname, "dist"), - filename: "memory_models_rough.js", + filename: "memory_viz.js", library: { - name: "MemoryModelsRough", + name: "MemoryViz", type: "umd", export: "default", },