Skip to content

John/cleanup dependencies#403

Closed
johnwalz97 wants to merge 3 commits intomainfrom
john/cleanup-dependencies
Closed

John/cleanup dependencies#403
johnwalz97 wants to merge 3 commits intomainfrom
john/cleanup-dependencies

Conversation

@johnwalz97
Copy link
Contributor

Pull Request Description

What and why?

How to test

What needs special review?

Dependencies, breaking changes, and deployment notes

Release notes

Checklist

  • What and why
  • Screenshots or videos (Frontend)
  • How to test
  • What needs special review
  • Dependencies, breaking changes, and deployment notes
  • Labels applied
  • PR linked to Shortcut
  • Unit tests added (Backend)
  • Tested locally
  • Documentation updated (if required)
  • Environment variable additions/changes documented (if required)

@johnwalz97 johnwalz97 closed this Jul 30, 2025
@validmind validmind deleted a comment from CLAassistant Jul 30, 2025
@github-actions
Copy link
Contributor

PR Summary

This PR introduces several enhancements aimed at improving dependency compatibility testing and error handling for missing packages, particularly SciPy, across the project. Major changes include:

  1. A new GitHub Actions workflow (.github/workflows/dependency-testing.yaml) that runs a matrix of dependency tests on multiple Python versions and dependency sets (minimum, maximum, default), as well as special workflows for pip-freeze, min, max, and python-version scenarios. This ensures that the project remains compatible with various dependency configurations and Python environments.

  2. Updates to the Makefile to add new targets for running tests with different dependency configurations (e.g., test-deps-min, test-deps-max, test-python-versions, test-freeze-env, test-tox-all). This provides developers with straightforward commands to validate dependency behavior.

  3. Enhancements to the tox.ini configuration to support the new testing targets and to clearly define environments for minimum and maximum dependency versions, along with linting and documentation generation.

  4. Modifications in documentation (README.md) to include instructions on using the new dependency testing targets, improving clarity for users and contributors.

  5. In several test scripts under validmind/tests/, the error handling for missing SciPy has been improved. Each test file now wraps the import of SciPy components in a try/except block, raising a custom MissingDependencyError if SciPy is not available. This provides clear guidance and actionable error messages for users who have not installed the optional statistical dependencies.

Overall, these changes improve the robustness of the project's dependency management and provide clearer error messaging when optional dependencies are missing, ensuring that tests and functionality that rely on SciPy fail gracefully with useful instructions.

Test Suggestions

  • Run the new GitHub Actions workflow to ensure all dependency matrix combinations (min, max, default) are working correctly across Python versions.
  • Execute the Makefile targets (e.g., 'make test-deps-min', 'make test-deps-max', 'make test-python-versions', 'make test-freeze-env') locally to verify that the commands run as expected.
  • Simulate the absence of the SciPy package in a controlled environment and verify that the custom MissingDependencyError is raised with the correct message.
  • Verify that the documentation updates in README.md correctly reflect the new testing commands.
  • Review the workflow_dispatch inputs by manually triggering the workflows to ensure that the branch conditions and inputs work as intended.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ johnwalz97
❌ Alexia Harger


Alexia Harger seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

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