Skip to content

[WIP] Add peer reviews to submission output - #230

Draft
dbosk with Copilot wants to merge 4 commits into
masterfrom
copilot/fix-104
Draft

[WIP] Add peer reviews to submission output#230
dbosk with Copilot wants to merge 4 commits into
masterfrom
copilot/fix-104

Conversation

Copilot AI commented Sep 16, 2025

Copy link
Copy Markdown
Contributor
  • Analyze repository structure and understand literate programming approach
  • Examine current submissions.nw file and generated Python code
  • Research Canvas API peer review functionality
  • Identify peer review methods: Assignment.get_peer_reviews() and Submission.get_submission_peer_reviews()
  • Understand peer review data structure (assessor_id, user_id, comments, etc.)
  • Add peer review data collection functions to submissions module
  • Update format_submission_short functions to include peer review summaries
  • Add peer review sections to format_submission detailed output
  • Update submission command descriptions to mention peer review data
  • Test implementation with mock data to verify logic correctness
  • Add command line options to control peer review display
  • Test the --no-peer-reviews flag functionality
  • Create comprehensive documentation and usage examples
  • Verify backward compatibility and error handling
  • Add comprehensive literate programming documentation explaining rationale and design decisions

✅ DOCUMENTATION ENHANCED

Added extensive literate programming documentation (303 lines) to explain the peer review implementation:

📚 New Documentation Structure:

Main Section: "Peer Review Support"

  • Explains the pedagogical rationale for peer reviews
  • Documents the dual perspective approach (received vs given reviews)
  • Describes use cases and benefits for instructors and students

Canvas API Documentation:

  • Documents the two API methods used: Assignment.get_peer_reviews() and Submission.get_submission_peer_reviews()
  • Lists and explains all peer review object attributes
  • Notes about data availability and API variations

Implementation Details:

  • Subsection on retrieving peer review data with rationale for the filtering approach
  • Explains why we need to fetch all assignment reviews and filter for given reviews
  • Documents error handling strategy and defensive programming

CSV Output Integration:

  • New subsection "Adding Peer Review Columns to CSV Output"
  • Explains the function attribute approach for backward compatibility
  • Documents the conditional column inclusion mechanism

Detailed Output Formatting:

  • Separate subsections for CSV and detailed formatting
  • Explains Markdown vs JSON output differences
  • Documents the "always show section" design decision

Individual Review Formatting:

  • Subsubsections for JSON and Markdown formats
  • Explains defensive attribute access patterns
  • Documents the arrow notation (→) and formatting conventions
  • Explains error recovery strategies

🎯 Key Documentation Principles Applied:

  • Rationale over Implementation: Explains why decisions were made, not just what the code does
  • Context: Provides Canvas LMS and pedagogical context
  • Design Decisions: Documents trade-offs and alternatives considered
  • Error Handling: Explains defensive programming rationale
  • User Benefits: Connects implementation to user value

The documentation now follows proper literate programming style where the LaTeX/TeX sections explain the concepts and rationale, while the code chunks implement the described functionality.

Fixes #104.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copilot AI and others added 2 commits September 16, 2025 21:30
Co-authored-by: dbosk <237222+dbosk@users.noreply.github.com>
Co-authored-by: dbosk <237222+dbosk@users.noreply.github.com>

@dbosk dbosk left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

@copilot add more rationale for the code to the documentation. There are some comments in the code, but this is a literate program.

- Added main section "Peer Review Support" explaining the rationale and design
- Documented Canvas API structure and peer review object attributes
- Explained dual perspective approach (received vs given reviews)
- Added detailed subsections for each function and formatting approach
- Documented CSV integration and backward compatibility mechanism
- Explained error handling strategies and defensive programming
- Added documentation for JSON and Markdown formatting approaches
- Included rationale for design decisions throughout the code

This addresses the feedback to add more documentation to the literate program
rather than just inline code comments.

Co-authored-by: dbosk <237222+dbosk@users.noreply.github.com>

Copilot AI commented Oct 2, 2025

Copy link
Copy Markdown
Contributor Author

@copilot add more rationale for the code to the documentation. There are some comments in the code, but this is a literate program.

I've added comprehensive literate programming documentation to the peer review implementation. The changes include:

New Documentation Structure (303 lines added):

  1. Main Section: "Peer Review Support" explaining the pedagogical rationale and design philosophy
  2. Canvas API Documentation: Detailed explanation of the two API methods and peer review object structure
  3. Implementation Rationale: Why we need to fetch all reviews and filter for given reviews, error handling strategies
  4. CSV Integration: Subsection explaining the backward compatibility mechanism using function attributes
  5. Output Formatting: Separate documentation for CSV, Markdown, and JSON formats with design decisions
  6. Individual Formatting: Subsubsections for JSON and Markdown with defensive programming explanations

The documentation now follows proper literate programming style where LaTeX/TeX sections explain the why (rationale, context, design decisions) rather than just inline comments explaining the what (code mechanics).

Each function is now preceded by explanatory text that describes:

  • The problem being solved
  • Design alternatives considered
  • Trade-offs and decisions made
  • Error handling rationale
  • User benefits

Commit: 2a979bc

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • esm.ubuntu.com
    • Triggering command: /usr/lib/apt/methods/https (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI requested a review from dbosk October 2, 2025 12:38
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.

Add peer reviews to submission output

2 participants