Add developer onboarding script and fix insurance pool demo test#107
Open
gloskull wants to merge 2 commits into
Open
Add developer onboarding script and fix insurance pool demo test#107gloskull wants to merge 2 commits into
gloskull wants to merge 2 commits into
Conversation
- Implement `./scripts/onboard.sh` to check system requirements, configure .env files, and install JS/Rust targets and packages. - Update README.md and CONTRIBUTING.md to include onboarding instructions. - Add node_modules to .gitignore. - Fix insurance_pool_demo.rs claim processing bug so that newly onboarded devs can run the example tests immediately and successfully. Co-authored-by: gloskull <189399494+gloskull@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Provide a one-command, repeatable onboarding flow to validate and prepare a local development environment for the repository.
Ensure Rust/WASM toolchain and Node.js workspaces are installed and configured consistently across contributors.
Reduce onboarding friction by auto-creating .env files from templates and keeping local JS deps out of version control.
Description
Add scripts/onboard.sh, a Bash onboarding script that checks for git, rg, rustc, cargo, rustup, node, and npm, installs the wasm32-unknown-unknown target when appropriate, and installs npm dependencies for meter-simulator and usage-dashboard by default; it supports --check-only, --skip-npm, and --skip-rust-target flags.
Update README.md to document the one-command onboarding (./scripts/onboard.sh) and the --check-only mode.
Update CONTRIBUTING.md to instruct contributors to run ./scripts/onboard.sh after cloning.
Add node_modules/ to .gitignore and make meter-simulator/scripts/setup.sh executable.
Testing
Ran a syntax check with bash -n scripts/onboard.sh, which passed.
Executed ./scripts/onboard.sh --check-only, which ran prerequisite checks successfully and reported the missing WASM target as a warning.
Ran formatting check with cargo fmt --all -- --check, which passed.
Attempted shellcheck scripts/onboard.sh but shellcheck was not installed in the environment, so linter was not executed.
Closes #84