Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add hooks to documentation #2131

Merged
merged 17 commits into from
Apr 2, 2024
Merged

Add hooks to documentation #2131

merged 17 commits into from
Apr 2, 2024

Conversation

damianhxy
Copy link
Member

@damianhxy damianhxy commented Mar 25, 2024

Description

Adds a lab hooks section to the documentation

Updates some hooks

  • listOptions: backwards compatible change that lets default options be correctly hidden. Also adds error handling.
  • autogradeInputFiles: additionally pass it assessment and submission as params. A breaking change, but a necessary one and it doesn't seem to be used.

Also makes the following changes to Docs

  • Fix syntax highlighting
  • Make "code copy" button work locally
  • Replace Facebook link with Slack

Adds references to docs in __defaultAssessment.rb and fixes errors.

Motivation and Context

Closes #1926

How Has This Been Tested?

  • View documentation locally, read through lab hooks section and check for any glaring issues.
  • Verify that comments in __defaultAssessment.rb link (would) link to the right pages.
  • Verify new behavior of listOptions by viewing documentation and trying to hide default options and/or defining your own options. Also test the error handling for invalid options.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have run rubocop and erblint for style check. If you haven't, run overcommit --install && overcommit --sign to use pre-commit hook for linting
  • My change requires a change to the documentation, which is located at Autolab Docs
  • I have updated the documentation accordingly, included in this PR

@damianhxy damianhxy marked this pull request as ready for review March 30, 2024 23:25
Copy link
Contributor

coderabbitai bot commented Mar 30, 2024

Walkthrough

Walkthrough

The recent updates focus on refining the documentation and codebase to enhance functionality and clarity around assessment and course hooks. Changes include the documentation of previously undocumented hooks, adjustments in sorting behavior in scoreboards, modifications to autograding input files, and the management of assessment options. These adjustments aim to improve the customization and operational efficiency of assessments and courses within the platform.

Changes

File Path Change Summary
app/controllers/assessments_controller.rb
app/views/assessments/show.html.erb
Added DISALLOWED_LIST_OPTIONS to assessments_controller.rb and adjusted @list initialization. Restructured options display and logic for specific links in show.html.erb.
app/controllers/scoreboards_controller.rb Adjusted sorting behavior in scoreboardOrderSubmissions function.
app/helpers/.../assessment_autograde_core.rb Modified tango_upload to include an extra parameter for autogradeInputFiles.
docs/instructors.md
docs/lab.md
Simplified instructors.md by removing specific customization details. Removed section on score calculation customization from lab.md.
docs/lab-hooks.md Added comprehensive overview of available lab hooks for customization.
lib/__defaultAssessment.rb Updated function parameters and documentation for various assessment methods.

Assessment against linked issues

Objective Addressed Explanation
Document undocumented hooks [#1926]
Add stubs to __defaultAssessment.rb and __defaultCourse.rb for awareness [#1926] Stubs for __defaultCourse.rb are not mentioned, indicating they may not have been added.
Simplify docs/instructors.md by removing specific customization details [#1926]
Comprehensive overview of lab hooks in docs/lab-hooks.md [#1926]
Remove outdated customization details related to Autolab functionality [#1926]

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share

Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

@damianhxy damianhxy requested review from a team and KesterTan and removed request for a team March 30, 2024 23:25
docs/lab.md Show resolved Hide resolved
docs/lab-hooks.md Outdated Show resolved Hide resolved
docs/lab-hooks.md Outdated Show resolved Hide resolved
lib/__defaultAssessment.rb Show resolved Hide resolved
docs/instructors.md Show resolved Hide resolved
docs/lab.md Show resolved Hide resolved
docs/lab-hooks.md Outdated Show resolved Hide resolved
docs/lab-hooks.md Outdated Show resolved Hide resolved
docs/lab-hooks.md Outdated Show resolved Hide resolved
docs/lab-hooks.md Outdated Show resolved Hide resolved
Copy link
Contributor

@KesterTan KesterTan left a comment

Choose a reason for hiding this comment

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

Overall other than nits, LGTM, docs look quite nice.

docs/features/schedulers.md Show resolved Hide resolved
docs/lab-hooks.md Show resolved Hide resolved
docs/lab.md Show resolved Hide resolved
docs/lab.md Outdated Show resolved Hide resolved
docs/lab.md Outdated Show resolved Hide resolved
docs/lab.md Show resolved Hide resolved
@damianhxy damianhxy added this pull request to the merge queue Apr 2, 2024
Merged via the queue into master with commit 10c2fd9 Apr 2, 2024
5 checks passed
@damianhxy damianhxy deleted the update-documentation branch April 2, 2024 00:29
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.

Update documentation for hooks
2 participants