Skip to content

fix(deps): move pre-commit from core to dev dependencies #1624

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

Closed

Conversation

devin-ai-integration[bot]
Copy link
Contributor

Fix Version Conflicts: Move pre-commit to Development Dependencies

Description

This PR resolves version conflicts in the instructor project by moving pre-commit>=4.2.0 from core dependencies to development dependencies where it belongs.

Problem

The pre-commit>=4.2.0 package was incorrectly listed as a core dependency in pyproject.toml, which meant that development tools were being installed in production environments. This can cause version conflicts and unnecessary bloat in production deployments.

Solution

  • Removed pre-commit>=4.2.0 from the core dependencies list
  • Added pre-commit>=4.2.0 to both:
    • [project.optional-dependencies].dev
    • [dependency-groups].dev

This ensures consistency between both dependency specification methods used in the project while properly categorizing pre-commit as a development-only dependency.

Changes

  • Modified pyproject.toml:
    • Removed "pre-commit>=4.2.0" from core dependencies (line 17)
    • Added "pre-commit>=4.2.0" to [project.optional-dependencies].dev
    • Added "pre-commit>=4.2.0" to [dependency-groups].dev

Testing

  • ✅ Core dependencies build successfully: uv sync
  • ✅ Dev dependencies include pre-commit: uv sync --group dev
  • ✅ Basic functionality works: python -c "import instructor"
  • ✅ Lint checks pass: uv run ruff check .
  • ✅ Pre-commit available in dev environment but not in core (as expected)

Impact

  • Production environments: No longer install unnecessary development tools
  • Development environments: Pre-commit still available when installing dev dependencies
  • CI/CD: Should continue to work as expected since CI typically installs dev dependencies
  • Version conflicts: Eliminates potential conflicts from having dev tools in production dependency tree

Link to Devin run: https://app.devin.ai/sessions/c236f82acdb4459a8691ed87207f9662

Requested by: Jason Liu (work@jxnl.co)

- Remove pre-commit>=4.2.0 from core dependencies
- Add pre-commit>=4.2.0 to both [project.optional-dependencies].dev and [dependency-groups].dev
- Prevents development tools from being installed in production environments
- Resolves version conflicts caused by misplaced development dependencies

Co-Authored-By: Jason Liu <jason@jxnl.co>
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Copy link

cloudflare-workers-and-pages bot commented Jun 20, 2025

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
instructor 9caf2b5 Commit Preview URL Jun 20 2025, 06:54 PM

@github-actions github-actions bot added dependencies Pull requests that update a dependency file python Pull requests that update python code size:M This PR changes 30-99 lines, ignoring generated files. labels Jun 20, 2025
devin-ai-integration bot and others added 3 commits June 20, 2025 18:36
- Fix Black formatting issues in 13 blog post markdown files
- Add proper blank lines after imports and improve code spacing
- Resolves failing CI check for documentation linting
- Changes applied automatically by pytest-examples

Co-Authored-By: Jason Liu <jason@jxnl.co>
…of-density.md

- Fix unclosed triple-quote string in anthropic.md causing parsing error
- Add missing spaces after comments in chain-of-density.md code blocks
- Add proper blank lines between code sections
- Fix ruff linting issues: unused parameters and unnecessary file open modes
- Resolves remaining CI failure in documentation linting

Co-Authored-By: Jason Liu <jason@jxnl.co>
@jxnl jxnl closed this Jun 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file python Pull requests that update python code size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant