-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Conversation
Adding instructions for installing on Mac.
✅ Deploy Preview for esphome ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
WalkthroughThe 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
Possibly related PRs
Suggested reviewers
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? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this 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 numbersTo 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
📒 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
.. code-block:: console | ||
|
||
$ brew install esphome |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
.. 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
$ echo >> /Users/ymulgaonkar/.zprofile | ||
$ echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/[username]/.zprofile | ||
$ eval "$(/opt/homebrew/bin/brew shellenv)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
$ 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)" |
$ esphome version | ||
Version: 2021.12.3 | ||
Version: 2024.10.1 |
There was a problem hiding this comment.
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
Tested on a Macbook air m3 2024.
% esphome version |
I do not agree that installing homebrew is necessary or even desired to install esphome on a mac. 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? |
How do you install python3 for Mac? I used homebrew to install python3. |
The instructions that already exist say:
Why would you choose an installation method that is completely different? Is there some advantage to installing an additional package manager? |
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. |
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. |
Adding instructions for installing on Mac.