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

Fix conda builds #1776

Merged
merged 29 commits into from
May 20, 2024
Merged

Fix conda builds #1776

merged 29 commits into from
May 20, 2024

Conversation

eberrigan
Copy link
Contributor

@eberrigan eberrigan commented May 16, 2024

Description

  • conda package tests removed from stage on .conda/meta.yml since conda solver is taking too long.
  • conda package tests are now a stage in build_manual.yml and build.yml since we are able to use the libmamba conda-solver in the miniconda set-up.
  • Now during the build conda package stage for each OS, the BUILD_PATH is saved as a GITHUB_ENV so it can be used in the next stage.
  • The BUILD_PATH is used to create an environment with the conda package for each OS.
  • SLEAP is imported and the version of SLEAP is printed to confirm the environment is working for each OS.
  • The mac environment has changed to ensure python 3.9 is used every time: conda-forge::python >=3.9.0, <3.10.0.
  • qudida and alubmentations are now longer needed in the mac build.sh since they are installed using conda-forge.

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!

❤️

Copy link

coderabbitai bot commented May 16, 2024

Walkthrough

The recent updates focus on enhancing build and test workflows using conda and pip. Changes include reorganizing test configurations, updating Python versions, refining installation commands, and improving GitHub Actions workflows for multi-OS testing. Detailed comments address dependency issues for future maintenance.

Changes

Files/Paths Change Summaries
.conda/meta.yaml, .conda_mac/condarc.yaml Moved sleap test config to build workflow; removed unused comment.
.conda_mac/build.sh Removed specific flags from pip install command.
.conda_mac/meta.yaml Updated Python version requirement, commented out test imports.
.github/workflows/build_manual.yml Adjusted branch triggers, build and test steps for multiple OS.
requirements.txt Added detailed comment on imgstore version issue.
.github/workflows/build.yml, .github/workflows/build_ci.yml Added test steps for various OS; switched to testing with built wheels.

🐰 In the realm of code, a rabbit did decree,
"Our project evolves with each commit, you see.
Python versions aligned, dependencies now clear,
Testing across systems, without any fear.
With workflows refined and errors effaced,
Our codebase thrives, elegantly encased."


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.

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 a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @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: 0

Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 43a4f13 and 5d576ac.
Files selected for processing (6)
  • .conda/meta.yaml (1 hunks)
  • .conda_mac/build.sh (1 hunks)
  • .conda_mac/condarc.yaml (1 hunks)
  • .conda_mac/meta.yaml (3 hunks)
  • .github/workflows/build_manual.yml (2 hunks)
  • requirements.txt (1 hunks)
Files skipped from review due to trivial changes (5)
  • .conda/meta.yaml
  • .conda_mac/build.sh
  • .conda_mac/condarc.yaml
  • .conda_mac/meta.yaml
  • requirements.txt
Additional comments not posted (6)
.github/workflows/build_manual.yml (6)

14-15: Branch trigger updated to include elizabeth/fix-mac-conda-build.


86-86: Saving BUILD_PATH as a GITHUB_ENV variable for Ubuntu.


94-94: Saving BUILD_PATH as a GITHUB_ENV variable for Windows.


102-102: Saving BUILD_PATH as a GITHUB_ENV variable for Mac.


104-137: Testing built conda package for Ubuntu and Windows.


138-170: Testing built conda package for Mac.

Copy link

codecov bot commented May 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.11%. Comparing base (7ed1229) to head (d084f74).
Report is 6 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1776      +/-   ##
===========================================
+ Coverage    73.30%   74.11%   +0.80%     
===========================================
  Files          134      134              
  Lines        24087    24462     +375     
===========================================
+ Hits         17658    18131     +473     
+ Misses        6429     6331      -98     

☔ 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 5d576ac and b6cbdba.
Files selected for processing (2)
  • .github/workflows/build.yml (1 hunks)
  • sleap/version.py (1 hunks)
Files skipped from review due to trivial changes (2)
  • .github/workflows/build.yml
  • sleap/version.py

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 b6cbdba and a72202a.
Files selected for processing (1)
  • .github/workflows/build.yml (1 hunks)
Additional comments not posted (1)
.github/workflows/build.yml (1)

87-154: Ensure consistency in environment setup across OS platforms.

Verification successful

Ensure consistency in environment setup across OS platforms.

The environment setup and testing steps for Ubuntu/Windows and Mac are consistent. Both sections follow the same sequence of commands for creating and testing the conda environment with the sleap package. The only difference is the channels used in the conda create command, which is expected due to platform-specific dependencies.

  • Ubuntu/Windows uses: -c file://$BUILD_PATH -c sleap/label/dev -c conda-forge -c nvidia -c anaconda
  • Mac uses: -c file://$BUILD_PATH -c conda-forge -c anaconda

This difference is necessary and does not indicate inconsistency in the overall setup process.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify that the environment setup and testing steps are consistent across different OS platforms in the workflow file.

# Test: Search for inconsistencies in environment setup and testing steps. Expect: Uniform steps across all OS platforms.
rg --type yaml $'echo "Creating and testing conda environment with sleap package..."' .github/workflows/build.yml

Length of output: 270



Script:

#!/bin/bash
# Extract and compare the environment setup and testing steps for Ubuntu/Windows and Mac in the workflow file.

# Extract the Ubuntu/Windows section
ubuntu_windows_section=$(sed -n '/# Test built conda package (Ubuntu and Windows)/,/# Test built conda package (Mac)/p' .github/workflows/build.yml)

# Extract the Mac section
mac_section=$(sed -n '/# Test built conda package (Mac)/,$p' .github/workflows/build.yml)

# Output the sections for comparison
echo "Ubuntu/Windows Section:"
echo "$ubuntu_windows_section"
echo
echo "Mac Section:"
echo "$mac_section"

Length of output: 16897

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 a72202a and b98594c.
Files selected for processing (2)
  • .github/workflows/build_ci.yml (1 hunks)
  • .github/workflows/build_manual.yml (2 hunks)
Files skipped from review due to trivial changes (1)
  • .github/workflows/build_ci.yml
Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/build_manual.yml

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 b98594c and d084f74.
Files selected for processing (1)
  • .github/workflows/build_ci.yml (2 hunks)
Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/build_ci.yml

@eberrigan eberrigan requested a review from talmo May 18, 2024 02:05
@eberrigan eberrigan merged commit 6a0cf9c into develop May 20, 2024
12 checks passed
@eberrigan eberrigan deleted the elizabeth/fix-mac-conda-build branch May 20, 2024 17:49
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