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

ci: ✨ add GitHub Actions workflow for Conda package builds #1736

Merged
merged 3 commits into from
Dec 14, 2024

Conversation

Anselmoo
Copy link
Owner

@Anselmoo Anselmoo commented Dec 14, 2024

All PR-Submissions:


  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open
    Pull Requests for the same
    update/change?

New ✨✨ Feature-Submissions:


  • Does your submission pass tests?
  • Have you lint your code locally prior to submission? Fixed:
  • This PR is for a new feature, not a bug fix.

Changes to ⚙️ Core-Features:


  • Have you added an explanation of what your changes do and why you'd like
    us to include them?
  • Have you written new tests for your core changes, as applicable?
  • Have you successfully run tests with your changes locally?

Summary by Sourcery

CI:

  • Introduce a GitHub Actions workflow for building Conda packages on push events.

@Anselmoo Anselmoo enabled auto-merge December 14, 2024 21:26
Copy link

Review changes with  SemanticDiff

Copy link
Contributor

sourcery-ai bot commented Dec 14, 2024

Reviewer's Guide by Sourcery

This PR adds a new GitHub Actions workflow that automates the testing of Conda package installations for different variants of the spectrafit package. The workflow runs on every push and tests the installation of four different package configurations using Conda-forge channel.

No diagrams generated as the changes look simple and do not need a visual representation.

File-Level Changes

Change Details Files
Implementation of a new GitHub Actions workflow for Conda package testing
  • Configures workflow to run on push events
  • Sets up matrix strategy to test multiple package variants (spectrafit, spectrafit-jupyter, spectrafit-all, spectrafit-rixs)
  • Uses Python 3.10 as the base environment
  • Configures Conda environment using environment.yml
  • Tests package installation from conda-forge channel for each matrix variant
.github/workflows/conda_check.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@github-actions github-actions bot added the github-actions Pull requests that update Github_actions code label Dec 14, 2024
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @Anselmoo - I've reviewed your changes - here's some feedback:

Overall Comments:

  • Consider upgrading actions/setup-python from v3 to v4 for latest features and security updates
  • Instead of updating the base environment, consider creating a new conda environment to avoid potential conflicts and improve reproducibility
Here's what I looked at during the review
  • 🟡 General issues: 1 issue found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@@ -0,0 +1,32 @@
name: Python Package using Conda

on: [push]
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion (performance): Consider adding path filters to the workflow trigger

Limiting the workflow to run only when relevant files change (like setup.py, environment.yml, or package source files) would reduce unnecessary CI runs

Suggested change
on: [push]
on:
push:
paths:
- '**.py'
- 'setup.py'
- 'setup.cfg'
- 'pyproject.toml'
- 'environment.yml'
- 'conda/**'
- '.github/workflows/**'

Copy link

codecov bot commented Dec 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (66194c6) to head (7e42058).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #1736   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           45        45           
  Lines         4520      4520           
=========================================
  Hits          4520      4520           
Flag Coverage Δ
unittests 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@Anselmoo Anselmoo disabled auto-merge December 14, 2024 21:36
@Anselmoo Anselmoo enabled auto-merge (squash) December 14, 2024 21:37
@Anselmoo Anselmoo merged commit 0acfea4 into main Dec 14, 2024
35 of 39 checks passed
@Anselmoo Anselmoo deleted the conda-cross-check branch December 14, 2024 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
github-actions Pull requests that update Github_actions code size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant