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: Speed up python linting #64

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

Fogapod
Copy link
Contributor

@Fogapod Fogapod commented Feb 23, 2025

This speeds up linting step by ~10 seconds in total.
There are 3 primary changes:

pre-commit caching

pre-commit docs have an example of github caching which i applied: https://pre-commit.com/#github-actions-example

caching python dependencies

uv sync dependencies will now be cached by disabling pruning: prune-cache: false.
I think you would need to remove setup-uv-* caches at https://github.com/DS4SD/docling-serve/actions/caches for this to apply. updated lock file will create new cache

Switching to pre-commit-uv

https://github.com/tox-dev/pre-commit-uv is a patch to pre-commit which uses uv internally which speeds up initial dependency installation. Their caching/configuration is identical, the only change is package installation machinery.
Currently it will be automatically installed as a dev dependency.

I can exclude this patch if this is not desirable

Copy link

mergify bot commented Feb 23, 2025

Merge Protections

Your pull request matches the following merge protections and will not be merged until they are valid.

🟢 Enforce conventional commit

Wonderful, this rule succeeded.

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert)(?:\(.+\))?(!)?:

@Fogapod Fogapod changed the title These changes speed up python linting step by 10 seconds in total ci: Speed up python linting Feb 23, 2025
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.

1 participant