Skip to content

Run tests with extra dependencies separately #8246

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

Merged
merged 4 commits into from
May 21, 2025

Conversation

TomeHirata
Copy link
Collaborator

Currently, the ci pipeline installs all dependencies and runs all tests at a time. But we want to confirm if core tests are passed successfully with minimum dependencies. This PR separate the test steps into two; core dependencies and extra dependencies. This is a prerequisite for the upcoming separation of large dependencies.

@chenmoneygithub
Copy link
Collaborator

I am actually not sure if we need to split, with uv the installation time is <1s for all deps, splitting test means some extra overhead, and extra now only has one test case:
image

@TomeHirata
Copy link
Collaborator Author

@chenmoneygithub This separation is necessary to test the core tests with the core dependencies of DSPy. While currently there is only one extra test, I'll move dataset and optimizer related tests into this step after removing pandas or optuna.

pyproject.toml Outdated
]
mcp = ["mcp; python_version >= '3.10'"]
full_test = [
Copy link
Collaborator

Choose a reason for hiding this comment

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

Sorry this one is on me, maybe we should make this as extras to the dev group?

So something like:

extended_test = [
  "mcp; python_version >= '3.10'",
  "pandas",
  "datasets",
]

Then in the action we do uv sync -p .venv --extra dev --extra extended_test?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I added a group called test_extras for adding all extras

Copy link
Collaborator

@chenmoneygithub chenmoneygithub left a comment

Choose a reason for hiding this comment

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

LGTM!

@TomeHirata TomeHirata merged commit a15c42c into stanfordnlp:main May 21, 2025
3 checks passed
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