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

docs: move reference into its own chapter #382

Merged
merged 4 commits into from
Jul 6, 2024

Conversation

creativeprojects
Copy link
Owner

Move the reference documentation into its own chapter (with sub-sections)

Fixes #380

Copy link

coderabbitai bot commented Jul 5, 2024

Walkthrough

This update introduces numerous changes, including .gitignore adjustments, restructuring of core logic around command generation, new and modified functions for outputs generation, and added documentation templates. The reference section in the documentation is moved, and there are updates to workflows and the Makefile to align paths and configurations with the new structure.

Changes

Files / Groups Change Summary
.gitignore Added exclusion pattern for Markdown files in reference directory.
commands.go Removed command generation and template handling functions.
commands_display.go Added sortedProfileKeys function for map sorting.
commands_generate.go Added functionality to generate outputs based on arguments, including new types and templates.
contrib/templates/**/*.gomd Added various Markdown templates for different configuration sections and JSON schema.
docs/content/** Updated content and links, removed headers, and changed references.
.github/workflows/*.yml Corrected configuration file names and updated sed commands.
Makefile Updated paths and meta title in generate-config-reference target.
commands_test.go Modified tests to reflect changes in TestGenerateCommand.

Assessment against linked issues

Objective Addressed Explanation
Move "Reference" to the end of section 2 (#380)

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.
    • @coderabbitai help me debug CodeRabbit configuration file.

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 an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @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.
  • Please see the configuration documentation for more information.
  • 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/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@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: 3

Outside diff range and nitpick comments (1)
docs/content/configuration/variables.md (1)

523-523: Fix typographical issue.

Consider using the Oxford spelling "parametrization".

- parametrisation
+ parametrization
Tools
LanguageTool

[style] ~523-~523: Would you like to use the Oxford spelling “parametrization”? The spelling ‘parametrisation’ is also correct.
Context: ...}}) where $variable style is used for parametrisation and the profile [config flag]({{% relre...

(OXFORD_SPELLING_Z_NOT_S)

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between ffffabf and a2e5870.

Files selected for processing (20)
  • .gitignore (1 hunks)
  • commands.go (2 hunks)
  • commands_display.go (1 hunks)
  • commands_generate.go (1 hunks)
  • contrib/templates/_config-reference.gomd (1 hunks)
  • contrib/templates/global.gomd (1 hunks)
  • contrib/templates/groups.gomd (1 hunks)
  • contrib/templates/json-schema.gomd (1 hunks)
  • contrib/templates/nested.gomd (1 hunks)
  • contrib/templates/profile.gomd (1 hunks)
  • contrib/templates/profile.nested-section.gomd (1 hunks)
  • contrib/templates/profile.sub-section.gomd (1 hunks)
  • contrib/templates/reference.gomd (1 hunks)
  • contrib/templates/value-types.gomd (1 hunks)
  • docs/content/_index.md (1 hunks)
  • docs/content/configuration/jsonschema/index.md (1 hunks)
  • docs/content/configuration/variables.md (1 hunks)
  • docs/content/contributions/_index.md (1 hunks)
  • docs/content/schedules/_index.md (1 hunks)
  • docs/themes/hugo-theme-relearn (1 hunks)
Files skipped from review due to trivial changes (9)
  • .gitignore
  • contrib/templates/global.gomd
  • contrib/templates/nested.gomd
  • contrib/templates/reference.gomd
  • contrib/templates/value-types.gomd
  • docs/content/_index.md
  • docs/content/contributions/_index.md
  • docs/content/schedules/_index.md
  • docs/themes/hugo-theme-relearn
Additional context used
LanguageTool
docs/content/configuration/jsonschema/index.md

[grammar] ~19-~19: Did you mean “setting”? Or maybe you should add a pronoun? In active voice, ‘allow’ + ‘to’ takes an object, usually a pronoun.
Context: ... known restic versions and may allow to set flags that are not supported by a parti...

(ALLOW_TO)

docs/content/configuration/variables.md

[style] ~523-~523: Would you like to use the Oxford spelling “parametrization”? The spelling ‘parametrisation’ is also correct.
Context: ...}}) where $variable style is used for parametrisation and the profile [config flag]({{% relre...

(OXFORD_SPELLING_Z_NOT_S)

Additional comments not posted (30)
contrib/templates/profile.nested-section.gomd (1)

1-38: LGTM!

The template is well-structured and follows good practices for maintainability and readability.

contrib/templates/groups.gomd (1)

1-38: LGTM!

The template is well-structured and follows good practices for maintainability and readability.

contrib/templates/json-schema.gomd (1)

1-48: LGTM!

The template is well-structured and follows good practices for maintainability and readability.

contrib/templates/profile.sub-section.gomd (3)

27-39: LGTM!

The section profile and description logic are correctly implemented.


43-56: LGTM!

The flags and properties logic are correctly implemented.


60-63: LGTM!

The layout hint for overriding flags is correctly implemented.

contrib/templates/profile.gomd (3)

29-39: LGTM!

The profile section and description logic are correctly implemented.


43-56: LGTM!

The flags and properties logic are correctly implemented.


58-61: LGTM!

The layout notice for restic command flags is correctly implemented.

contrib/templates/_config-reference.gomd (5)

1-25: LGTM!

The template header and partial templates declaration are correctly implemented.


26-35: LGTM!

The cell and range printing templates are correctly implemented.


37-79: LGTM!

The property type printing template is correctly implemented.


81-100: LGTM!

The property table and row printing templates are correctly implemented.


102-138: LGTM!

The property description printing template is correctly implemented.

commands_generate.go (5)

27-53: LGTM!

The generateCommand function is correctly implemented with the new parameter ctx.


58-135: LGTM!

The generateConfigReference function is correctly implemented.


138-155: LGTM!

The generatePage function is correctly implemented.


157-173: LGTM!

The generateJsonSchema function is correctly implemented.


175-180: LGTM!

The SectionInfoData type is correctly implemented.

commands_display.go (1)

325-332: LGTM!

The sortedProfileKeys function is implemented correctly and follows best practices.

commands.go (10)

12-18: LGTM!

The init function correctly registers own commands and excludes profile sections.


Line range hint 20-232:
LGTM!

The getOwnCommands function correctly defines and returns a list of own commands.


Line range hint 234-236:
LGTM!

The panicCommand function is implemented correctly.


Line range hint 238-261:
LGTM!

The completeCommand function is implemented correctly and handles different requesters.


Line range hint 263-312:
LGTM!

The showProfile function correctly displays the profile information and schedules.


Line range hint 314-324:
LGTM!

The showSchedules function correctly displays the schedules.


Line range hint 370-389:
LGTM!

The randomKey function correctly generates and displays a random key.


Line range hint 391-409:
LGTM!

The selectProfiles function correctly selects profiles based on flags and arguments.


Line range hint 411-415:
LGTM!

The flagsForProfile function correctly returns a copy of flags with the profile name set.


Line range hint 417-471:
LGTM!

The createSchedule function correctly creates and schedules jobs based on the configuration and flags.

docs/content/configuration/jsonschema/index.md Outdated Show resolved Hide resolved
contrib/templates/profile.sub-section.gomd Show resolved Hide resolved
contrib/templates/profile.gomd Show resolved Hide resolved
Copy link

@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: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between a2e5870 and 5320cbd.

Files selected for processing (3)
  • Makefile (3 hunks)
  • commands_generate.go (1 hunks)
  • docs/content/configuration/jsonschema/index.md (1 hunks)
Files skipped from review due to trivial changes (1)
  • Makefile
Files skipped from review as they are similar to previous changes (2)
  • commands_generate.go
  • docs/content/configuration/jsonschema/index.md

Copy link

codecov bot commented Jul 5, 2024

Codecov Report

Attention: Patch coverage is 69.02655% with 35 lines in your changes missing coverage. Please review.

Project coverage is 71.52%. Comparing base (ffffabf) to head (9fd5375).

Files Patch % Lines
commands_generate.go 72.90% 17 Missing and 12 partials ⚠️
commands_display.go 0.00% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #382      +/-   ##
==========================================
- Coverage   72.33%   71.52%   -0.81%     
==========================================
  Files         113      122       +9     
  Lines       10555    12801    +2246     
==========================================
+ Hits         7634     9155    +1521     
- Misses       2518     3230     +712     
- Partials      403      416      +13     
Flag Coverage Δ
unittests 71.52% <69.03%> (-0.81%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

@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: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 5320cbd and 9fd5375.

Files selected for processing (6)
  • .github/workflows/doc.yml (1 hunks)
  • .github/workflows/release-doc.yml (2 hunks)
  • Makefile (2 hunks)
  • commands_test.go (1 hunks)
  • docs/content/contributions/_index.md (2 hunks)
  • docs/hugo.toml (1 hunks)
Files skipped from review due to trivial changes (4)
  • .github/workflows/doc.yml
  • .github/workflows/release-doc.yml
  • Makefile
  • commands_test.go
Files skipped from review as they are similar to previous changes (1)
  • docs/content/contributions/_index.md
Additional comments not posted (1)
docs/hugo.toml (1)

17-17: LGTM! The addition of ordersectionsby is appropriate.

The ordersectionsby parameter will help in organising the sections by weight, which aligns with the objective of improving the structure of the documentation.

@creativeprojects creativeprojects merged commit ed12184 into master Jul 6, 2024
9 checks passed
@creativeprojects creativeprojects deleted the docs-move-reference branch July 6, 2024 09:00
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.

Move "Reference" to the end of section 2 [Docs]
1 participant