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 installation docs 1.4.1 #1810

Merged
merged 19 commits into from
Sep 6, 2024
Merged

Conversation

roomrys
Copy link
Collaborator

@roomrys roomrys commented Jun 15, 2024

Description

This PR attempts to update and simplify the installation instructions and:

  • removes the installation instructions for other package managers and instead links out the package manager installation page
  • changes the mambaforge installation recommendation back to miniconda (which now sets the solver to libmamba by default for newer installations)
  • replaces all mamba commands with conda
  • adds a note about mamba and conda command interchangeability
  • uses tabs for installation methods (conda from package, conda from source, pip), operating system (Windows and Linux, Mac OS), and also (NVIDIA GPU, CPU or other GPU)

This PR also attempts to handle the following tasks from

  • Update documentation / guides #1778
  • Simplify and modernize installation page
    • mambaforge is now miniforge -> Recommend miniconda instead
    • have 1-line unattended installs -> Link to miniconda installation page
    • update Mac setup to use curl so you don't have to install Xcode (GBs!!) -> Link to miniconda installation page
    • conda create 1-liners in the heading before the TOC!!
    • Backwards compatibility: add guide for installing <1.4.0 after the conda package label switchover (@eberrigan)

Types of changes

  • Bugfix
  • New feature
  • Refactor / Code style update (no logical changes)
  • Build / CI changes
  • Documentation Update
  • Other (explain)

Does this address any currently open issues?

Outside contributors checklist

  • Review the guidelines for contributing to this repository
  • Read and sign the CLA and add yourself to the authors list
  • Make sure you are making a pull request against the develop branch (not main). Also you should start your branch off develop
  • Add tests that prove your fix is effective or that your feature works
  • Add necessary documentation (if appropriate)

Thank you for contributing to SLEAP!

❤️

Summary by CodeRabbit

  • Documentation

    • Updated installation commands in documentation to use conda instead of mamba.
    • Enhanced installation instructions with a structured tabbed format for Windows, Linux, and Mac OS.
    • Added styles for a tabbed interface in documentation, improving visual presentation and usability.
    • Included sphinx_tabs extension and associated settings to enhance tab functionality in documentation.
  • Workflow

    • Updated GitHub workflow to trigger on a specific branch.

Copy link

coderabbitai bot commented Jun 15, 2024

Walkthrough

This update primarily focuses on changing package management commands from mamba to conda within the .conda/README.md file. It also modifies the GitHub Actions workflow trigger, introduces the sphinx-tabs extension for documentation, adds styling for tabbed interfaces in the docs, and refines version constraints in dev_requirements.txt. Additionally, the installation instructions in docs/installation.md have been streamlined and clarified.

Changes

Files/Paths Change Summaries
.conda/README.md Updated commands from mamba to conda for environment creation/installation.
.github/workflows/website.yml Modified branch trigger and removed comments related to myst_nb and lxml.
dev_requirements.txt Updated version constraints for dependencies and added new packages.
docs/_static/css/tabs.css Introduced styling for tabs, defining appearance and behavior.
docs/conf.py Added sphinx_tabs.tabs, updated CSS files, and settings for tabbed content.
docs/installation.md Streamlined installation instructions, emphasizing conda over mamba.

Poem

🌟 In code's quiet dance, a change so grand,
mamba steps back, conda takes the stand.
Tabs now gleam with a stylish twist,
Clearer paths in docs, not to be missed!
🐰 With code so sleek, the future we kissed.


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 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.

@roomrys roomrys marked this pull request as ready for review June 24, 2024 19:04
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 36cdba2 and 7503896.

Files selected for processing (5)
  • .conda/README.md (2 hunks)
  • .github/workflows/website.yml (2 hunks)
  • docs/_static/css/tabs.css (1 hunks)
  • docs/conf.py (3 hunks)
  • docs/installation.md (6 hunks)
Files skipped from review due to trivial changes (2)
  • .conda/README.md
  • docs/_static/css/tabs.css
Additional context used
Ruff
docs/conf.py

1-1: UTF-8 encoding declaration is unnecessary (UP009)

Remove unnecessary coding comment

LanguageTool
docs/installation.md

[grammar] ~3-~3: The operating system from Apple is written “macOS” (MAC_OS)
Context: ...a Python package on Windows, Linux, and Mac OS. For quick install using conda, see bel...


[grammar] ~3-~3: The word ‘install’ is not a noun. (A_INSTALL)
Context: ...n Windows, Linux, and Mac OS. For quick install using conda, see below: ````{tabs} ...


[style] ~334-~334: As a shorter alternative for ‘able to’, consider using “can”. (BE_ABLE_TO)
Context: ...nning the diagnostics to see what SLEAP is able to detect on your system: ```bash sleap-d...


[style] ~340-~340: Consider using “unable” to avoid wordiness. (NOT_ABLE_PREMIUM)
Context: ...`bash sleap-diagnostic ``` If you were not able to get SLEAP installed, activate the co...

Markdownlint
docs/installation.md

64-64: Expected: 1; Actual: 0; Above (MD022, blanks-around-headings)
Headings should be surrounded by blank lines


219-219: Expected: fenced; Actual: indented (MD046, code-block-style)
Code block style


238-238: Expected: fenced; Actual: indented (MD046, code-block-style)
Code block style


257-257: Expected: fenced; Actual: indented (MD046, code-block-style)
Code block style

Additional comments not posted (10)
.github/workflows/website.yml (2)

11-11: Update to workflow triggers

The addition of the branch liezl/update-intallation-docs-1.4.1 to the trigger list ensures that any changes pushed to this branch will initiate the build process for the website. This is important for testing changes in a live environment before merging them into the main development or production branches.


45-45: Addition of sphinx-tabs package installation

Installing the sphinx-tabs package as part of the documentation build process is a good practice. This ensures that the necessary dependencies for rendering tabbed content in the documentation are met, aligning with the changes in documentation structure to include tabs.

docs/conf.py (3)

62-62: Addition of sphinx_tabs.tabs extension

The inclusion of the sphinx_tabs.tabs extension is essential for supporting tabbed content in the documentation. This aligns with the PR's objective to introduce tabs in the installation guide, enhancing the organization and readability of the documentation.


177-182: Configuration of CSS for tabs

Specifying css/tabs.css in the html_css_files ensures that the custom styles for the tabbed interfaces are correctly applied to the HTML output. This customization is important for maintaining a consistent and professional appearance in the documentation.


230-232: Disabling default CSS loading for sphinx_tabs

Setting sphinx_tabs_disable_css_loading to True is a thoughtful decision to avoid conflicts and redundancy in CSS loading. This ensures that only the theme's CSS is used, which can help in maintaining a cleaner and more streamlined styling in the documentation.
[APROVED]

docs/installation.md (5)

3-3: Grammar correction for 'Mac OS'

Consider changing "Mac OS" to "macOS" to adhere to Apple's branding guidelines. This is a minor but important detail for maintaining professionalism in documentation.

- SLEAP can be installed as a Python package on Windows, Linux, and Mac OS.
+ SLEAP can be installed as a Python package on Windows, Linux, and macOS.
Tools
LanguageTool

[grammar] ~3-~3: The operating system from Apple is written “macOS” (MAC_OS)
Context: ...a Python package on Windows, Linux, and Mac OS. For quick install using conda, see bel...


[grammar] ~3-~3: The word ‘install’ is not a noun. (A_INSTALL)
Context: ...n Windows, Linux, and Mac OS. For quick install using conda, see below: ````{tabs} ...


5-16: Introduction of tabbed interface for installation commands

The use of tabs to separate installation commands for different operating systems is a great way to organize content, making it easier for users to find the information that's relevant to them. This aligns with the PR's objectives to improve the clarity and usability of the installation instructions.


26-42: Enhanced user guidance for terminal usage

Providing detailed instructions on how to open a terminal on different systems enhances user accessibility and support, especially for those who may be less familiar with these operations. The inclusion of personal preferences and alternatives like Cmder and Windows Terminal is a nice touch that offers additional value to the user.


Line range hint 46-58: Recommendation for package manager usage

The strong recommendation to use Miniconda and guidance on managing multiple conda-based package managers are crucial for preventing installation conflicts and ensuring a smooth setup process. This advice is particularly valuable given the complex dependencies of SLEAP.

Tools
LanguageTool

[grammar] ~3-~3: The operating system from Apple is written “macOS” (MAC_OS)
Context: ...a Python package on Windows, Linux, and Mac OS. For quick install using conda, see bel...


[grammar] ~3-~3: The word ‘install’ is not a noun. (A_INSTALL)
Context: ...n Windows, Linux, and Mac OS. For quick install using conda, see below: ````{tabs} ...


63-182: Comprehensive installation methods and precautions

The detailed explanation of different installation methods, along with specific commands and conditions for each scenario, provides a thorough guide for users. This section effectively addresses various user needs and scenarios, ensuring that users have all the information they need to successfully install SLEAP.

Tools
Markdownlint

64-64: Expected: 1; Actual: 0; Above (MD022, blanks-around-headings)
Headings should be surrounded by blank lines

@roomrys roomrys mentioned this pull request Jun 24, 2024
17 tasks
@roomrys roomrys requested review from talmo and eberrigan July 1, 2024 17:18
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 7503896 and 2b60231.

Files selected for processing (2)
  • docs/conf.py (3 hunks)
  • docs/installation.md (6 hunks)
Additional context used
LanguageTool
docs/installation.md

[grammar] ~3-~3: The operating system from Apple is written “macOS”
Context: ...a Python package on Windows, Linux, and Mac OS. For quick install using conda, see bel...

(MAC_OS)


[grammar] ~3-~3: The word ‘install’ is not a noun.
Context: ...n Windows, Linux, and Mac OS. For quick install using conda, see below: ````{tabs} ...

(A_INSTALL)


[uncategorized] ~187-~187: “you” seems less likely than “you’re” (you are).
Context: ... ## Testing that things are working If you installed using conda, first activate...

(AI_HYDRA_LEO_CP_YOU_YOUARE)


[uncategorized] ~229-~229: “you” seems less likely than “you’re” (you are).
Context: ....0.19041-SP0 ### GPU support Assuming you installed using either of the conda-b...

(AI_HYDRA_LEO_CP_YOU_YOUARE)


[style] ~341-~341: Consider using “unable” to avoid wordiness.
Context: ...`bash sleap-diagnostic ``` If you were not able to get SLEAP installed, activate the co...

(NOT_ABLE_PREMIUM)

Additional comments not posted (4)
docs/conf.py (2)

62-62: Approved: Addition of sphinx_tabs.tabs extension.

The addition of the sphinx_tabs.tabs extension is correctly implemented and aligns with the PR objectives to enhance documentation modularity.


178-182: Approved: Custom CSS configuration and disabling default CSS loading.

The configuration for the custom CSS file (css/tabs.css) is correctly specified, and disabling the default CSS loading (sphinx_tabs_disable_css_loading = True) allows for greater customization. These settings enhance the visual consistency of the documentation and align with the PR objectives.

Also applies to: 233-233

docs/installation.md (2)

5-16: Approved: Use of tabs for installation instructions.

The use of tabs to organize installation instructions for different operating systems and methods significantly improves readability and accessibility. This change aligns with the PR objectives to enhance the documentation's structure and usability.

Also applies to: 68-90


8-9: Approved: Replacement of mamba commands with conda.

The replacement of mamba commands with conda throughout the installation instructions is correctly implemented and aligns with the PR objectives. This change simplifies the installation process and ensures consistency in the use of package managers, reducing potential confusion for users.

Also applies to: 13-14, 74-75, 84-85, 110-110, 115-115, 149-149, 154-154, 167-167

@roomrys roomrys marked this pull request as draft September 5, 2024 19:32
@roomrys roomrys marked this pull request as ready for review September 5, 2024 21:52
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: 2

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 2b60231 and 8958473.

Files selected for processing (3)
  • .github/workflows/website.yml (3 hunks)
  • dev_requirements.txt (1 hunks)
  • docs/_static/css/tabs.css (1 hunks)
Additional comments not posted (5)
dev_requirements.txt (3)

8-8: Approved version constraint for Sphinx.

The updated version constraint for sphinx ensures compatibility with the sphinxcontrib.applehelp extension, aligning with the project's requirements.


12-12: Approved addition of sphinx-tabs.

The addition of sphinx-tabs supports the PR's objective to enhance documentation usability with tabbed interfaces.


14-14: Approved version constraint for myst-nb.

The updated version constraint for myst-nb ensures compatibility with sphinx version 5.0, which is necessary for the project's documentation requirements.

.github/workflows/website.yml (2)

11-11: Approved branch trigger update.

The update to the branch trigger aligns with the specific documentation updates being made in this PR.


61-61: Approved deployment directory update.

Setting the destination_dir to develop for non-main branches is a sensible approach to manage different versions of the documentation.

dev_requirements.txt Show resolved Hide resolved
docs/_static/css/tabs.css Outdated 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 8958473 and 930d94e.

Files selected for processing (1)
  • docs/_static/css/tabs.css (1 hunks)
Files skipped from review due to trivial changes (1)
  • docs/_static/css/tabs.css

Copy link

codecov bot commented Sep 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.33%. Comparing base (7ed1229) to head (87d05b4).
Report is 47 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1810      +/-   ##
===========================================
+ Coverage    73.30%   75.33%   +2.02%     
===========================================
  Files          134      133       -1     
  Lines        24087    24476     +389     
===========================================
+ Hits         17658    18440     +782     
+ Misses        6429     6036     -393     

☔ 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: 2

Outside diff range, codebase verification and nitpick comments (1)
docs/installation.md (1)

Line range hint 46-58: Suggest simplification for package manager recommendations.

The section on using a package manager like Miniforge or Miniconda is informative. However, the note about updating the solver to libmamba in older installations of Anaconda could be simplified to improve clarity.

Consider simplifying the instructions on updating the solver to make them more accessible to users who may not be familiar with conda's configuration options.

Tools
LanguageTool

[grammar] ~3-~3: The operating system from Apple is written “macOS”
Context: ...a Python package on Windows, Linux, and Mac OS. For quick install using conda, see bel...

(MAC_OS)


[grammar] ~3-~3: The word ‘install’ is not a noun.
Context: ...n Windows, Linux, and Mac OS. For quick install using conda, see below: ````{tabs} ...

(A_INSTALL)

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 930d94e and 87d05b4.

Files selected for processing (1)
  • docs/installation.md (6 hunks)
Additional context used
LanguageTool
docs/installation.md

[grammar] ~3-~3: The operating system from Apple is written “macOS”
Context: ...a Python package on Windows, Linux, and Mac OS. For quick install using conda, see bel...

(MAC_OS)


[grammar] ~3-~3: The word ‘install’ is not a noun.
Context: ...n Windows, Linux, and Mac OS. For quick install using conda, see below: ````{tabs} ...

(A_INSTALL)


[grammar] ~63-~63: The word ‘install’ is not a noun.
Context: ...nager installation, here are some quick install options: ### Miniforge (recommended) ...

(A_INSTALL)


[style] ~417-~417: Consider using “unable” to avoid wordiness.
Context: ...`bash sleap-diagnostic ``` If you were not able to get SLEAP installed, activate the co...

(NOT_ABLE_PREMIUM)

Additional comments not posted (5)
docs/installation.md (5)

8-16: Review the conda installation commands.

The conda installation commands are well-structured and use the correct channels and package versions. The use of tabs to separate instructions for Windows, Linux, and macOS enhances readability and user experience.


26-42: Validate the terminal opening instructions.

The instructions for opening a terminal on different operating systems are clear and include helpful alternatives like Cmder and Windows Terminal for Windows. The use of tabs here is consistent and improves the document's structure.


63-132: Review the Miniforge and Miniconda installation commands.

The installation commands for Miniforge and Miniconda are detailed and cover different operating systems, including specific steps for Apple Silicon and Intel Macs. The commands are correctly formatted and provide a comprehensive guide for users.

Tools
LanguageTool

[grammar] ~63-~63: The word ‘install’ is not a noun.
Context: ...nager installation, here are some quick install options: ### Miniforge (recommended) ...

(A_INSTALL)


139-259: Assess the structured installation methods.

The structured approach to presenting installation methods using tabs is effective and aligns with the PR's objective to enhance readability and usability. The detailed steps for each method, including conda packages, source installations, and pip installations, are well-documented.


Line range hint 263-401: Check the testing and uninstalling instructions.

The instructions for testing the installation and uninstalling environments are clear and provide useful commands for users to verify their setups and manage their environments. The use of hints and warnings adds valuable context and guidance.

Tools
LanguageTool

[grammar] ~63-~63: The word ‘install’ is not a noun.
Context: ...nager installation, here are some quick install options: ### Miniforge (recommended) ...

(A_INSTALL)

@@ -1,77 +1,52 @@
# Installation

SLEAP can be installed as a Python package on Windows, Linux, Mac OS X, and Mac OS Apple Silicon.
SLEAP can be installed as a Python package on Windows, Linux, and Mac OS. For quick install using conda, see below:
Copy link

Choose a reason for hiding this comment

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

Correct the operating system name and grammar.

The operating system from Apple should be written as "macOS" instead of "Mac OS". Additionally, the phrase "For quick install using conda" should be corrected to "For a quick installation using conda" to use "install" appropriately as a noun.

Apply this diff to correct the issues:

- SLEAP can be installed as a Python package on Windows, Linux, and Mac OS. For quick install using conda, see below:
+ SLEAP can be installed as a Python package on Windows, Linux, and macOS. For a quick installation using conda, see below:
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
SLEAP can be installed as a Python package on Windows, Linux, and Mac OS. For quick install using conda, see below:
SLEAP can be installed as a Python package on Windows, Linux, and macOS. For a quick installation using conda, see below:
Tools
LanguageTool

[grammar] ~3-~3: The operating system from Apple is written “macOS”
Context: ...a Python package on Windows, Linux, and Mac OS. For quick install using conda, see bel...

(MAC_OS)


[grammar] ~3-~3: The word ‘install’ is not a noun.
Context: ...n Windows, Linux, and Mac OS. For quick install using conda, see below: ````{tabs} ...

(A_INSTALL)

Comment on lines +417 to +420
If you were not able to get SLEAP installed, activate the conda environment it is in and generate a list of the package versions installed:

```bash
mamba list
conda list
Copy link

Choose a reason for hiding this comment

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

Improve wording for clarity.

The phrase "If you were not able to get SLEAP installed" could be simplified to "If you were unable to install SLEAP" to avoid wordiness and improve readability.

Apply this diff to improve the wording:

- If you were not able to get SLEAP installed, activate the conda environment it is in and generate a list of the package versions installed:
+ If you were unable to install SLEAP, activate the conda environment it is in and generate a list of the package versions installed:
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
If you were not able to get SLEAP installed, activate the conda environment it is in and generate a list of the package versions installed:
```bash
mamba list
conda list
If you were unable to install SLEAP, activate the conda environment it is in and generate a list of the package versions installed:
```bash
conda list
```
Tools
LanguageTool

[style] ~417-~417: Consider using “unable” to avoid wordiness.
Context: ...`bash sleap-diagnostic ``` If you were not able to get SLEAP installed, activate the co...

(NOT_ABLE_PREMIUM)

@talmo talmo merged commit 91d6c96 into develop Sep 6, 2024
5 checks passed
@talmo talmo deleted the liezl/update-intallation-docs-1.4.1 branch September 6, 2024 18: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.

2 participants