Skip to content

Fixes #1069 Added "Testing Your Changes" Section in CONTRIBUTING.md#1070

Open
Shobhini wants to merge 2 commits intoopensource-society:masterfrom
Shobhini:master
Open

Fixes #1069 Added "Testing Your Changes" Section in CONTRIBUTING.md#1070
Shobhini wants to merge 2 commits intoopensource-society:masterfrom
Shobhini:master

Conversation

@Shobhini
Copy link
Copy Markdown
Contributor

@Shobhini Shobhini commented Mar 22, 2026

Provides step-by-step testing guidance for both frontend and backend contributions:

Frontend Testing

  • Development server setup and manual testing in browser
  • ESLint and Prettier checks with auto-fix options
  • Production build verification with preview

Backend Testing

  • Backend server startup instructions
  • API endpoint testing with curl/Postman examples
  • Input validation and error handling verification

Pre-Commit Checklist

  • Console error verification
  • Linting and formatting validation
  • Cross-browser responsiveness testing
  • Clear commit message guidelines

Why This Matters

  • 🎯 Reduces PR review cycles - Contributors catch issues before submitting
  • 📋 Clear expectations - New contributors know exactly what to test
  • 🔍 Consistent quality - Ensures all PRs meet quality standards
  • Better onboarding - Makes contributing more accessible

Summary by CodeRabbit

  • Documentation
    • Improved contribution workflow with a new development setup step and explicit frontend/backend testing steps to validate changes before submission.
    • Updated getting-started prerequisites to require Python 3.8+, added virtual environment setup guidance, verification commands for Node/npm/Python, optional build/preview steps, and common troubleshooting tips for runtime and install issues.

…lines and reordering of contribution steps
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 22, 2026

📝 Walkthrough

Walkthrough

CONTRIBUTING.md and README.md were updated to add explicit development environment setup and testing instructions, clarify backend Python venv usage and commands, update prerequisites and verification steps, and add troubleshooting guidance.

Changes

Cohort / File(s) Summary
Contribution workflow & testing
CONTRIBUTING.md
Inserted "Set up your development environment" step (linking to README), added explicit "Test your changes" step and a new "Testing Your Changes" section with frontend commands (npm run dev, npm run lint, npm run format, npm run build, npm run preview) and backend testing steps (change into backup_existing_project/backend, create/activate Python venv, python3 run.py), plus validation guidance and renumbered steps.
Project setup & troubleshooting
README.md
Tightened prerequisites to Python 3.8+, added Node.js/Python download links and verification commands (node --version, npm --version, python3 --version), replaced backend start with python3 run.py, added Python venv creation/activation steps, and introduced a Troubleshooting section (port 5000, python/pip command differences, npm install issues, module not found guidance).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 New steps to set up and test, neat as can be,
I hopped through README and CONTRIBUTING with glee,
Python venvs and npm runs, all written out right,
Now contributors can code from morning to night,
A tiny rabbit cheers — happy hacking and light!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: adding a 'Testing Your Changes' section to CONTRIBUTING.md, which is the primary objective addressed in the PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

CodeRabbit can generate a title for your PR based on the changes.

Add @coderabbitai placeholder anywhere in the title of your PR and CodeRabbit will replace it with a title based on the changes in the PR. You can change the placeholder by changing the reviews.auto_title_placeholder setting.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
CONTRIBUTING.md (1)

84-88: Consider adding fallback setup commands before backend run.

At Line 84–88, startup assumes an existing virtual environment and installed dependencies. Adding a short fallback (python3 -m venv venv, pip install -r requirements.txt) would make this more robust for first-time contributors.

Suggested doc tweak
 **Make sure the backend is running:**
 ```bash
 cd backup_existing_project/backend
+python3 -m venv venv  # if not already created
 source venv/bin/activate  # or venv\Scripts\activate on Windows
+pip install -r requirements.txt  # if dependencies are not installed yet
 python3 run.py
</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

Verify each finding against the current code and only fix it if needed.

In @CONTRIBUTING.md around lines 84 - 88, The startup instructions assume an
existing virtualenv and installed deps; update the snippet around the venv
activation and run.py steps to include fallback setup commands: if the virtual
environment doesn't exist, create it with python3 -m venv venv, then activate
(source venv/bin/activate or venv\Scripts\activate on Windows) and install
dependencies with pip install -r requirements.txt before running python3 run.py
so first-time contributors can set up and run run.py successfully.


</details>

</blockquote></details>

</blockquote></details>

<details>
<summary>🤖 Prompt for all review comments with AI agents</summary>

Verify each finding against the current code and only fix it if needed.

Inline comments:
In @CONTRIBUTING.md:

  • Line 24: Update the broken anchor in the CONTRIBUTING.md link by replacing the
    incorrect target README.md#-getting-started-development with the correct
    anchor README.md#getting-started-development so the link points to the ## 🛠️ Getting Started (Development) heading in README.md.

Nitpick comments:
In @CONTRIBUTING.md:

  • Around line 84-88: The startup instructions assume an existing virtualenv and
    installed deps; update the snippet around the venv activation and run.py steps
    to include fallback setup commands: if the virtual environment doesn't exist,
    create it with python3 -m venv venv, then activate (source venv/bin/activate or
    venv\Scripts\activate on Windows) and install dependencies with pip install -r
    requirements.txt before running python3 run.py so first-time contributors can
    set up and run run.py successfully.

</details>

---

<details>
<summary>ℹ️ Review info</summary>

<details>
<summary>⚙️ Run configuration</summary>

**Configuration used**: defaults

**Review profile**: CHILL

**Plan**: Pro

**Run ID**: `8a4674b5-7abe-4135-8b5b-05d00bc12e47`

</details>

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 5ea6d3456e598425e1b8e845912dc324929996ca and e5410b6192a74fe6fb8d7863695792658caa19b0.

</details>

<details>
<summary>📒 Files selected for processing (1)</summary>

* `CONTRIBUTING.md`

</details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (1)
README.md (1)

116-117: Split Bash and Windows activation instructions into separate snippets.

Line 116 mixes a Windows command inside a bash block, which is easy to copy incorrectly. Prefer separate bash and powershell/cmd blocks for safer copy-paste usage.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.md` around lines 116 - 117, The README currently places a Windows
activation command inside a bash code fence; split this into two separate code
snippets: one bash block containing only the Unix activation command (source
venv/bin/activate) and a separate Windows block (PowerShell/CMD) showing the
appropriate Windows activation commands (e.g., venv\Scripts\Activate.ps1 for
PowerShell and venv\Scripts\activate.bat for cmd). Replace the single mixed line
"source venv/bin/activate  # On Windows: venv\Scripts\activate" with these two
distinct fenced blocks so copy/paste behavior is correct.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@README.md`:
- Around line 86-90: The fenced code blocks in README containing the commands
"node --version", "npm --version", "python3 --version" (and the other two blocks
flagged) don’t match the repo’s configured fenced-code style and trigger MD046;
update those fenced blocks to the repository’s canonical style (use the
preferred fence marker and language tag, e.g. ```sh or the configured token),
ensure a blank line before and after each fence if required by the linter, and
make the same consistent change for the other flagged blocks so all README code
fences (including the ones showing node/npm/python commands) conform to the repo
rule.
- Around line 145-146: The README shows using `python3 run.py --port 5001` but
run.py currently calls app.run(debug=True) and does not parse CLI args, so the
flag is ignored; either update the README to remove the `--port` example and
document the supported method to change the port (e.g., set an environment
variable or edit the port in the file) or modify run.py to accept a --port
argument and pass it into app.run(port=...) (look for the main entry where
app.run(debug=True) is called and the module name run.py to implement argument
parsing or adjust the docs accordingly).

---

Nitpick comments:
In `@README.md`:
- Around line 116-117: The README currently places a Windows activation command
inside a bash code fence; split this into two separate code snippets: one bash
block containing only the Unix activation command (source venv/bin/activate) and
a separate Windows block (PowerShell/CMD) showing the appropriate Windows
activation commands (e.g., venv\Scripts\Activate.ps1 for PowerShell and
venv\Scripts\activate.bat for cmd). Replace the single mixed line "source
venv/bin/activate  # On Windows: venv\Scripts\activate" with these two distinct
fenced blocks so copy/paste behavior is correct.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 46e3b796-6611-4411-b732-4bdc642fcb16

📥 Commits

Reviewing files that changed from the base of the PR and between e5410b6 and b2b3bed.

📒 Files selected for processing (1)
  • README.md

Comment on lines +86 to +90
```bash
node --version
npm --version
python3 --version
```
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Resolve MD046 warnings on newly added code blocks.

These fenced blocks are currently flagged by markdownlint (MD046) at Line 86, Line 113, Line 120, and Line 137. Please align these blocks with the repo’s configured code-block style so docs lint stays clean.

Also applies to: 113-113, 120-120, 137-137

🧰 Tools
🪛 markdownlint-cli2 (0.21.0)

[warning] 86-86: Code block style
Expected: indented; Actual: fenced

(MD046, code-block-style)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.md` around lines 86 - 90, The fenced code blocks in README containing
the commands "node --version", "npm --version", "python3 --version" (and the
other two blocks flagged) don’t match the repo’s configured fenced-code style
and trigger MD046; update those fenced blocks to the repository’s canonical
style (use the preferred fence marker and language tag, e.g. ```sh or the
configured token), ensure a blank line before and after each fence if required
by the linter, and make the same consistent change for the other flagged blocks
so all README code fences (including the ones showing node/npm/python commands)
conform to the repo rule.

Comment on lines +145 to +146
python3 run.py --port 5001
```
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify whether backend run.py accepts/handles a --port argument.
# Expected:
# - If argparse/click/sys.argv handling exists for port, command is likely valid.
# - Otherwise, docs should be updated to the supported way (e.g., env var or app.run(port=...)).

set -euo pipefail

RUNPY_PATH="$(fd -t f 'run.py' | rg 'backup_existing_project/backend/run.py' || true)"
if [ -z "$RUNPY_PATH" ]; then
  echo "run.py not found at expected location"
  exit 0
fi

echo "Inspecting: $RUNPY_PATH"
nl -ba "$RUNPY_PATH" | sed -n '1,260p'

echo
echo "Searching for explicit CLI parsing related to port..."
rg -n -C2 'argparse|click|sys\.argv|--port|port\s*=|app\.run\(' "$RUNPY_PATH"

Repository: opensource-society/notesvault

Length of output: 184


🏁 Script executed:

# Find and read the run.py file
cat backup_existing_project/backend/run.py

Repository: opensource-society/notesvault

Length of output: 173


🏁 Script executed:

# Also check the README.md context around lines 145-146
sed -n '140,150p' README.md

Repository: opensource-society/notesvault

Length of output: 310


Remove or correct the --port example on lines 145–146 since run.py does not parse CLI arguments.

The run.py file calls app.run(debug=True) with no argument parsing. The command python3 run.py --port 5001 will not work as documented—the --port flag will be ignored. Either update the documentation to show the supported way to change the port (e.g., environment variable if the app supports it, or modify the code directly), or add argument parsing to run.py to actually handle --port.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.md` around lines 145 - 146, The README shows using `python3 run.py
--port 5001` but run.py currently calls app.run(debug=True) and does not parse
CLI args, so the flag is ignored; either update the README to remove the
`--port` example and document the supported method to change the port (e.g., set
an environment variable or edit the port in the file) or modify run.py to accept
a --port argument and pass it into app.run(port=...) (look for the main entry
where app.run(debug=True) is called and the module name run.py to implement
argument parsing or adjust the docs accordingly).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant