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 installing_esphome.rst #4380

Closed
wants to merge 1 commit into from

Conversation

yashmulgaonkar
Copy link

Adding instructions for installing on Mac.

Adding instructions for installing on Mac.
Copy link

netlify bot commented Oct 23, 2024

Deploy Preview for esphome ready!

Name Link
🔨 Latest commit fa64d67
🔍 Latest deploy log https://app.netlify.com/sites/esphome/deploys/6719599c7ecc8900081d6431
😎 Deploy Preview https://deploy-preview-4380--esphome.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

coderabbitai bot commented Oct 23, 2024

Walkthrough

The pull request updates the installation documentation for ESPHome, specifically for macOS users. A new section titled "Mac" has been added, detailing the installation of Homebrew, which is necessary for installing ESPHome. The installation command has been changed to utilize Homebrew instead of pip, and the version check commands for both macOS and Linux have been updated to reflect newer versions of ESPHome.

Changes

File Change Summary
guides/installing_esphome.rst Added a "Mac" section with Homebrew installation instructions; updated ESPHome installation and version check commands for both macOS and Linux.

Possibly related PRs

Suggested reviewers

  • jesserockz

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

🧹 Outside diff range and nitpick comments (2)
guides/installing_esphome.rst (2)

51-51: Fix typo in the word "following"

-Install Homebrew using the followng command. If you have it installed already, skip the next two steps.
+Install Homebrew using the following command. If you have it installed already, skip the next two steps.

51-83: Consider using RST substitutions for version numbers

To make documentation maintenance easier, consider using RST substitutions for version numbers. This would allow you to update versions in a single place rather than throughout the document.

Example implementation:

.. |esphome_version| replace:: 2024.10.1
.. |homebrew_version| replace:: 4.4.2

Version: |esphome_version|
🧰 Tools
🪛 GitHub Check: build

[failure] 74-74:
Directive 'code-block' is not followed by an empty line. Please insert an empty line after guides/installing_esphome.rst:74

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 28bac19 and fa64d67.

📒 Files selected for processing (1)
  • guides/installing_esphome.rst (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
guides/installing_esphome.rst (1)

Pattern **: - Do not generate or add any sequence diagrams

🪛 GitHub Check: build
guides/installing_esphome.rst

[failure] 74-74:
Directive 'code-block' is not followed by an empty line. Please insert an empty line after guides/installing_esphome.rst:74

Comment on lines +74 to +76
.. code-block:: console

$ brew install esphome
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

Fix RST formatting: Add empty line after code-block directive

The code-block directive must be followed by an empty line for proper RST rendering.

 .. code-block:: console
+
     $ brew install esphome  
📝 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
.. code-block:: console
$ brew install esphome
.. code-block:: console
$ brew install esphome
🧰 Tools
🪛 GitHub Check: build

[failure] 74-74:
Directive 'code-block' is not followed by an empty line. Please insert an empty line after guides/installing_esphome.rst:74

Comment on lines +61 to +63
$ echo >> /Users/ymulgaonkar/.zprofile
$ echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/[username]/.zprofile
$ eval "$(/opt/homebrew/bin/brew shellenv)"
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

Remove hardcoded username and improve PATH setup instructions

The current instructions contain a hardcoded username and might confuse users. Let's make it more generic and clear.

-    $ echo >> /Users/ymulgaonkar/.zprofile
-    $ echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/[username]/.zprofile
-    $ eval "$(/opt/homebrew/bin/brew shellenv)"
+    $ echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
+    $ eval "$(/opt/homebrew/bin/brew shellenv)"
📝 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
$ echo >> /Users/ymulgaonkar/.zprofile
$ echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/[username]/.zprofile
$ eval "$(/opt/homebrew/bin/brew shellenv)"
$ echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
$ eval "$(/opt/homebrew/bin/brew shellenv)"

Comment on lines 82 to +83
$ esphome version
Version: 2021.12.3
Version: 2024.10.1
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Codebase verification

Let me analyze the version numbers in the documentation to verify the consistency concern.

From the search results, I can see the following ESPHome version numbers in the installing_esphome.rst file:

  • Line 47: Version: 2021.12.3
  • Line 83: Version: 2024.10.1
  • Line 129: Version: 2022.11.4

The review comment correctly identified an inconsistency in the version numbers shown across different platform examples in the installation guide. This could indeed be confusing for users.

Version numbers should be consistent across platform examples

The installation guide shows different ESPHome versions for different platforms:

  • Mac: 2024.10.1
  • Linux: 2022.11.4
  • Windows (earlier example): 2021.12.3

This inconsistency should be updated to show the latest version (2024.10.1) across all platform examples to avoid confusion.

🔗 Analysis chain

Verify version consistency across platforms

The documentation shows different ESPHome versions for different platforms:

  • Mac: 2024.10.1
  • Linux: 2022.11.4

This inconsistency might confuse users. Consider using the same version number across all platform examples to avoid confusion.

Also applies to: 83-83

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if there are other version numbers in the documentation
rg -n "[0-9]+\.[0-9]+\.[0-9]+" --type rst

Length of output: 152744

@hippo5329
Copy link

Tested on a Macbook air m3 2024.

  1. Install homebrew. It might be better to use an external link to brew.sh site, instead of describing homebrew installation instructions here.

  2. brew install esphome

% esphome version
Version: 2024.10.2

@ChadMatsalla
Copy link
Contributor

I do not agree that installing homebrew is necessary or even desired to install esphome on a mac. pip3 install esphome is simple, unlikely to fail, does not require installing another package manager, and mirrors the install method in windows and Linux.

If anything, the sections for Mac and Linux can be merged because they are effectively identical.

Why do you think that homebrew is a better way?

@hippo5329
Copy link

How do you install python3 for Mac? I used homebrew to install python3.

@ChadMatsalla
Copy link
Contributor

The instructions that already exist say:

The process will likely be similar to Windows. You can install Python from the official site, and then install ESPHome with pip3 install esphome. You can then test that things are properly installed with the following:

Why would you choose an installation method that is completely different? Is there some advantage to installing an additional package manager?

@hippo5329
Copy link

At first, I followed the instructions for Linux. I used homebrew to install python3. Then I used the venv and pip3 to install esphome.

Then I tried using homebrew to install esphome.

Both work.

I think both ways can be described in the guide and let users choose.

The point is we use homebrew to install python3 either directly or by dependency. If you haven't installed python3, "brew install esphome" will install python3 automatically.

MacOS was based on BSD. Its Unix core is more similar to Linux than Windows. Not quite makes sense to follow Windows way.

Copy link

There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. Thank you for your contributions.

@github-actions github-actions bot added the stale label Dec 26, 2024
@github-actions github-actions bot closed this Jan 3, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Jan 5, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants