{"id":16598330,"url":"https://github.com/robinl/splink_vis_utils","last_synced_at":"2025-07-13T23:07:15.734Z","repository":{"id":42978099,"uuid":"412482534","full_name":"RobinL/splink_vis_utils","owner":"RobinL","description":null,"archived":false,"fork":false,"pushed_at":"2023-10-16T09:33:33.000Z","size":662,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-13T23:04:02.196Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RobinL.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-01T13:43:54.000Z","updated_at":"2021-10-15T13:46:34.000Z","dependencies_parsed_at":"2023-10-16T19:40:39.252Z","dependency_job_id":null,"html_url":"https://github.com/RobinL/splink_vis_utils","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/RobinL/splink_vis_utils","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobinL%2Fsplink_vis_utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobinL%2Fsplink_vis_utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobinL%2Fsplink_vis_utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobinL%2Fsplink_vis_utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RobinL","download_url":"https://codeload.github.com/RobinL/splink_vis_utils/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobinL%2Fsplink_vis_utils/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265218738,"owners_count":23729527,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-12T00:08:23.509Z","updated_at":"2025-07-13T23:07:15.710Z","avatar_url":"https://github.com/RobinL.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Development notes\n\n### Aim\n\nThe goal is to produce a standalone [JavaScript file](dist/splink_vis_utils.js) that contains all the code needed for splink comparison\nviewer and splink cluster studio to runn completely offline.\n\nThe `splink_vis_utils` library includes three separate things when it's rolled up:\n\n- The `splink_vis_utils` library of utility functions\n- The code in two Observable notebooks containing the reactive code for the Cluster Studio and Comparison Viewer\n- All their dependencies\n\nNote that observable notebooks are themselves javascript libraries so can be `npm add`ed as dependencies to the `splink_vis_utils` library.\n\nThis enables Splink version 3 to output a single HTML file that can work offline, containing all the JavaScript code needed for these dashboards.\n\n### Development Process\n\n#### Serving the Rolled-up Code\n\nRun the following commands in the `splink_vis_utils` directory:\n\n```\nnpx http-server --cors\n```\n\nand in s separate terminal\n\n```\n./node_modules/.bin/rollup -c -w\n```\n\n#### Developing the Observable Notebooks\n\nEdit the Observable notebooks via their respective GUIs:\n\n- [Splink Comparison Viewer](https://observablehq.com/d/c43e4e0aeb54d263)\n- [Splink Cluster Studio](https://observablehq.com/d/5496e67e6ca05c7b)\n\nFor development, the live rolled-up code is passed in at `localUrl = \"http://127.0.0.1:8080/dist/splink_vis_utils.js\"` at the bottom of these notebooks.\n\n#### Symlinking for Easier Splink Development\n\nIf you're working on Splink. create a symlink to the rolled-up JS file in your Splink directory to avoid manual copying of changes. Navigate to your Splink directory and run:\n\n```\ncd splink/files/splink_vis_utils/\nln -s /path/to/dist/splink_vis_utils.js splink_vis_utils.js\n```\n\n#### Refreshing Changes in Observable\n\nTo see the changes you've made in Observable, manually refresh the library by clicking the `viewof refresh = Inputs.button(\"refresh splink_vis_utils javascript lib\")` button in the notebook.\n\n#### Persisting Edits\n\nAfter editing the notebooks, you need this code to make its way back into the rolled up library\n\nupdate the version number in [update pkg](update_pkg.sh) based on the number obtained from Observable's export -\u003e download code -\u003e view the download URL, or just npm install what's on the clipboard\n\nIf you encounter issues, you can reset everything with:\n\n```\nrm -rf node_modules/\nnpm install\n```\n\n### Running Code\n\nTests using Test Explorer should be operational, including breakpoints. If they are not, run tests with the debugger:\n\n```\nnode --experimental-vm-modules node_modules/jest/bin/jest.js\n```\n\n### Clarification on how notebook code gets rolled up\n\nOne thing that’s a bit confusing is the 'chicken-and-egg' nature of\nthe `splink_vis_utils`.\n\nit's rolled up and then `require`ed in the observable notebooks, but the notebooks themselves have to be present in `splink_vis_utils` (as a dependency)\n\nThis isn't actually as confusing as it looks: the notebooks only use the `splink_vis_utils` library functinos, they don't import the notebooks, so there's no circular import problem\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobinl%2Fsplink_vis_utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobinl%2Fsplink_vis_utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobinl%2Fsplink_vis_utils/lists"}