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

Update configuration.md #179

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Update configuration.md #179

wants to merge 3 commits into from

Conversation

ChrWieg
Copy link

@ChrWieg ChrWieg commented Dec 17, 2024

Changed examples according to the example config file.
Added a link to the example config file

The examples in the configuration documentation file differ from the sample configuration file. The syntax of the example file works perfectly, the syntax of the documentation does not.

Summary by CodeRabbit

  • New Features

    • Added a new section for "Example Configuration" to enhance user guidance.
    • Introduced a new room definition for "Livingroom" with specific shape points.
    • Updated node definition to include a new entry for "Master" with defined coordinates.
  • Documentation

    • Enhanced clarity in the "Floor Configuration" and "Rooms" sections for better user understanding, including updates to the format of the bounds attribute.

Changed examples according to the example config.
Added link to the example config file
Copy link
Contributor

coderabbitai bot commented Dec 17, 2024

Walkthrough

The pull request updates the companion/configuration.md documentation file, focusing on improving the configuration guidelines. The changes include restructuring the bounds attribute for floor configuration, introducing a new example configuration section, and updating room and node definitions. The modifications enhance clarity and provide more structured examples for users configuring their systems, emphasizing the precise representation of spatial coordinates and room shapes.

Changes

File Change Summary
companion/configuration.md - Added new "Example Configuration" section
- Updated bounds format in Floor Configuration
- Replaced room definition with new "Livingroom" example
- Updated node definition with "Master" entry

Poem

🐰 Configuration Rabbit's Delight

Bounds and rooms, now crystal clear,
Points aligned with spatial cheer,
Coordinates dance in nested grace,
A config map with rabbit's trace!
Documentation shines so bright! 🌟


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>, please review it.
    • 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 gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @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 using 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 generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration 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
Contributor

@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 (4)
companion/configuration.md (4)

10-11: Format the URL as a proper Markdown link

The bare URL should be formatted as a Markdown link for better readability and to follow Markdown best practices.

-You can find a working configuration file here: https://github.com/ESPresense/ESPresense-companion/blob/main/src/config.example.yaml
+You can find a working configuration file [here](https://github.com/ESPresense/ESPresense-companion/blob/main/src/config.example.yaml).
🧰 Tools
🪛 Markdownlint (0.37.0)

11-11: null
Bare URL used

(MD034, no-bare-urls)


81-81: Consider specifying measurement units in the comment

The bounds configuration looks good, but it would be helpful to specify the expected measurement units in the comment.

-    bounds: [[0, 0, 0], [17.2, 18.5, 2.6]]  # Centers your diagram. [[left, bottom, z], [right, top, z]]
+    bounds: [[0, 0, 0], [17.2, 18.5, 2.6]]  # Centers your diagram. [[left, bottom, z], [right, top, z]] (in meters)

87-96: Consider adding a shape description comment

While the coordinates are correct and form a closed polygon, it would be helpful to add a comment describing the shape (e.g., L-shaped room, rectangular) to help users understand the example better.

 # Rooms are members of one floor, so they go aligned to the bounds of their floor
 - name: Livingroom
+ # This example shows an L-shaped room
  points:
   - [6, 12]
   - [8.6, 12]
   - [8.6, 10]
   - [8, 9]
   - [6, 9]
   - [6, 12]

133-133: Remove trailing punctuation from heading

According to Markdown best practices, headings should not end with punctuation.

-## Help write this documentation!
+## Help write this documentation
🧰 Tools
🪛 Markdownlint (0.37.0)

133-133: Punctuation: '.'
Trailing punctuation in heading

(MD026, no-trailing-punctuation)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b3cbe18 and 25c6f8f.

📒 Files selected for processing (1)
  • companion/configuration.md (3 hunks)
🧰 Additional context used
🪛 Markdownlint (0.37.0)
companion/configuration.md

11-11: null
Bare URL used

(MD034, no-bare-urls)


133-133: Punctuation: '.'
Trailing punctuation in heading

(MD026, no-trailing-punctuation)

Comment on lines 104 to 106
- name: Master
point: [3.25, 11, 3.2]
floors: ["first"]
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Ensure floor ID consistency in examples

The node example references a floor ID "first", but the earlier floor configuration example uses "ground". This might confuse users.

   - name: Master
     point: [3.25, 11, 3.2]
-    floors: ["first"]
+    floors: ["ground"]
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: Master
point: [3.25, 11, 3.2]
floors: ["first"]
- name: Master
point: [3.25, 11, 3.2]
floors: ["ground"]

Link formated as Markup-Link
Units meters added to yaml examples
Copy link
Contributor

@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

♻️ Duplicate comments (1)
companion/configuration.md (1)

107-109: ⚠️ Potential issue

Ensure floor ID consistency in examples

The node example references a floor ID "first", but the earlier floor configuration example uses "ground". This might confuse users.

  - name: Master
    point: [3.25, 11, 3.2]
-    floors: ["first"]
+    floors: ["ground"]
🧹 Nitpick comments (3)
companion/configuration.md (3)

10-11: Consider using a relative link for better maintainability

The link to the example configuration file should use a relative path to ensure it remains valid if the repository is renamed or forked.

-You can find a working configuration file [here](https://github.com/ESPresense/ESPresense-companion/blob/main/src/config.example.yaml)
+You can find a working configuration file [here](../../../ESPresense-companion/blob/main/src/config.example.yaml)

88-98: Consider adding a note about closed polygons

The example correctly shows that the first and last points should match to form a closed polygon. This could be explicitly mentioned in the documentation.

# Rooms are members of one floor, so they go aligned to the bounds of their floor
# Units are always meters
+# Note: The first and last points should be identical to form a closed polygon

136-136: Remove trailing period from heading

According to markdown style guidelines, headings should not end with punctuation.

-## Help write this documentation!.
+## Help write this documentation!
🧰 Tools
🪛 Markdownlint (0.37.0)

136-136: Punctuation: '.'
Trailing punctuation in heading

(MD026, no-trailing-punctuation)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 25c6f8f and c9c138b.

📒 Files selected for processing (1)
  • companion/configuration.md (3 hunks)
🧰 Additional context used
🪛 Markdownlint (0.37.0)
companion/configuration.md

136-136: Punctuation: '.'
Trailing punctuation in heading

(MD026, no-trailing-punctuation)

🔇 Additional comments (1)
companion/configuration.md (1)

78-82: LGTM! Clear and well-documented bounds format

The new nested array format for bounds is more explicit and the comment clearly explains the structure.

Ground floor instead of first floor to keep the examples constant
Copy link
Contributor

@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

🧹 Nitpick comments (3)
companion/configuration.md (3)

10-11: Consider using a more stable reference format

While adding a reference to the example configuration is helpful, raw GitHub branch links can break if the repository structure changes. Consider:

  1. Using a tagged release or commit hash instead of branch reference
  2. Adding a brief note about potential differences between documentation and latest example
-You can find a working configuration file [here](https://github.com/ESPresense/ESPresense-companion/blob/main/src/config.example.yaml)
+You can find a working configuration file [here](https://github.com/ESPresense/ESPresense-companion/blob/v1.0.0/src/config.example.yaml) (based on version 1.0.0)

88-98: Clarify the dimensionality of room points

While floor bounds use 3D coordinates, room points are defined in 2D. This should be explicitly mentioned to avoid confusion.

# Rooms are members of one floor, so they go aligned to the bounds of their floor
# Units are always meters
+# Points are defined in 2D space [x,y] as rooms are mapped to their floor's z-coordinate
- name: Livingroom

136-136: Remove trailing punctuation from heading

According to markdown best practices, headings should not end with punctuation.

-## Help write this documentation!
+## Help write this documentation
🧰 Tools
🪛 Markdownlint (0.37.0)

136-136: Punctuation: '.'
Trailing punctuation in heading

(MD026, no-trailing-punctuation)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c9c138b and 6f9089d.

📒 Files selected for processing (1)
  • companion/configuration.md (3 hunks)
🧰 Additional context used
🪛 Markdownlint (0.37.0)
companion/configuration.md

136-136: Punctuation: '.'
Trailing punctuation in heading

(MD026, no-trailing-punctuation)

🔇 Additional comments (2)
companion/configuration.md (2)

78-82: LGTM! Clear improvement in coordinate representation

The updated bounds format with nested arrays and explicit coordinate naming makes the 3D space configuration more intuitive.


104-109: LGTM! Floor ID consistency maintained

The node configuration now correctly references the "ground" floor ID, maintaining consistency with the floor configuration example.

ThatDeltaGuy added a commit to ThatDeltaGuy/ESPresense.github.io that referenced this pull request Dec 30, 2024
Pulled in changes from ESPresense#179 and made a few formatting fixes
DTTerastar pushed a commit that referenced this pull request Jan 15, 2025
* Update configuration.md

Pulled in missing info from example config and updated explanations

* Update configuration.md

coderabbitai fixes

* Update configuration.md

Pulled in changes from #179 and made a few formatting fixes
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.

2 participants