-
Notifications
You must be signed in to change notification settings - Fork 13
Switch dependency managment to uv #1164
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,59 +18,21 @@ jobs: | |
| - name: Checkout | ||
| uses: actions/checkout@v6 | ||
|
|
||
| - name: Setup Python | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bumping the GHA action version as in the authalligator counterpart. |
||
| uses: actions/setup-python@v6 | ||
| - uses: astral-sh/setup-uv@v10.0.1 | ||
| with: | ||
| python-version: '3.12.3' | ||
| architecture: 'x64' | ||
|
|
||
| - name: Install dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| python -m pip install --no-deps -r requirements/requirements-lint.txt | ||
| run: uv sync --locked | ||
|
|
||
| - name: Formatting (ruff) | ||
| run: ruff format --check . | ||
| run: uv run ruff format --check . | ||
|
|
||
| - name: Linting (ruff) | ||
| run: ruff check --no-cache --output-format github . | ||
|
|
||
| - name: Install production requirements (for Mypy) | ||
| run: | | ||
| # Mypy needs production packages for typechecking | ||
| pip install --no-deps -r requirements/requirements-prod.txt | ||
| run: uv run ruff check --no-cache --output-format github . | ||
|
|
||
| - name: Mypy | ||
| run: mypy | ||
|
|
||
| check-compiled-requirements: | ||
|
wojcikstefan marked this conversation as resolved.
|
||
| runs-on: ubuntu-24.04 | ||
| if: ${{ !contains(github.event.head_commit.message, '#notests') }} | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| with: | ||
| ref: ${{ github.event.pull_request.head.ref }} | ||
| - uses: actions/setup-python@v6 | ||
| with: | ||
| python-version: '3.12.3' | ||
|
|
||
| - name: Prepare environment | ||
| run: | | ||
| pip install --no-deps -r requirements/requirements-pip.txt | ||
| pip install $(grep -rwoh requirements -e 'pip-tools==.*[^\]' | head -n 1) | ||
|
|
||
| - name: Compile Requirements Files | ||
| run: | | ||
| ./scripts/pip-compile-all.sh | ||
|
|
||
| - name: Check If Output Matches Committed | ||
| run: | | ||
| DIFF="$(git diff)" | ||
| if [ "$DIFF" ]; then | ||
| echo "Compiled requirements differ from committed requirements!" | ||
| echo "$DIFF" | ||
| exit 1 | ||
| fi | ||
| run: uv run mypy | ||
|
|
||
| build: | ||
| runs-on: ${{ matrix.runs-on }} | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -151,7 +151,7 @@ def get_start_times( # type: ignore[no-untyped-def] # noqa: ANN201 | |
|
|
||
| if len(excl_dates) > 0: | ||
| if not isinstance(rrules, rruleset): | ||
| rrules = rruleset().rrule(rrules) | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We don't pin types-python-dateutil (same as before) so this changed. IMO that's fine.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we should pin stuff for the sake of CI, no? |
||
| rrules = rruleset().rrule(rrules) # type: ignore[func-returns-value] | ||
|
|
||
| # We want naive-everything for all-day events. | ||
| if event.all_day: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,105 @@ | ||
| [project] | ||
| name = "sync-engine" | ||
| version = "0.1.0" | ||
| description = "Close's email sync engine." | ||
| requires-python = "==3.12.*" | ||
| dependencies = [ | ||
| "alembic==1.7.5", | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are all of these direct dependencies? Or will we separately prune them so that the lockfile contains all dependencies and this list only contains what we directly depend on? |
||
| "arrow==0.17.0", | ||
| "asn1crypto==0.24.0", | ||
| "attrs==23.1.0", | ||
| "authalligator-client @ https://github.com/closeio/authalligator-client/archive/e7cc8e0bc5b1f2285ab5997e2590a8eb056fc627.zip", | ||
| "boto3==1.35.50", | ||
| "botocore==1.35.50", | ||
| "ciso8601==2.2.0", | ||
| "click==8.1.7", | ||
| "colorlog==6.5.0", | ||
| "cryptography==50.0.0", | ||
| "dnspython==2.6.1", | ||
| "flanker @ https://github.com/closeio/flanker-new/archive/fa272d95345d45e8bb1f9bc32bc2c074bf52a484.zip", | ||
| "Flask==3.1.3", | ||
| "Flask-RESTful==0.3.9", | ||
| "gdata==2.0.18", | ||
| "gunicorn==23.0.0", | ||
| "hiredis==2.3.2", | ||
| "html2text==2020.1.16", | ||
| "icalendar==4.0.9", | ||
| "imapclient==2.2.0", | ||
| "importlib-metadata==4.8.1", | ||
| "importlib-resources==5.4.0", | ||
| "ipython==9.12.0", | ||
| "json_log_formatter==1.0", | ||
| "limitlion==1.1.0", | ||
| "lxml==6.1.0", | ||
| "mysqlclient==2.2.5", | ||
| "psutil==5.8.0", | ||
| "Pympler==0.9", | ||
| "PyNaCl==1.6.2", | ||
| "python-dateutil==2.8.2", | ||
| "python-json-logger==3.3.0", | ||
| "pytz==2026.1.post1", | ||
| "PyYAML==6.0.2", | ||
| "redis==5.0.2", | ||
| "requests==2.34.2", | ||
| "requests-file==1.5.1", | ||
| "s3transfer==0.10.3", | ||
| "sentry-sdk<3", | ||
| "setproctitle==1.2.2", | ||
| "setuptools==82.0.0", | ||
| "six==1.17.0", | ||
| "sqlalchemy==1.4.54", | ||
| "statsd==3.3.0", | ||
| "tldextract==3.1.2", | ||
| "structlog==23.1.0", | ||
| "typing_extensions", | ||
| "urllib3==2.7.0", | ||
| "vobject==0.9.6.1", | ||
| "Werkzeug==3.1.8", | ||
| "zipp==3.20.2", | ||
| "zstandard==0.23.0", | ||
| ] | ||
|
|
||
| [dependency-groups] | ||
| lint = [ | ||
| "mypy==1.13.0", | ||
| "ruff==0.8.2", | ||
| "types-boto", | ||
| "types-python-dateutil", | ||
| "types-pytz", | ||
| "types-PyYAML", | ||
| "types-redis", | ||
| "types-requests", | ||
|
Comment on lines
+66
to
+71
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we pin those? I don't think our CI should start failing just because something new got released. |
||
| ] | ||
| test = [ | ||
| "atomicwrites==1.4.1", | ||
| "coverage==7.6.1", | ||
| "exceptiongroup==1.2.2", | ||
| "funcsigs==1.0.2", | ||
| "freezegun==1.5.1", | ||
| "hypothesis==6.113.0", | ||
| "iniconfig==2.0.0", | ||
| "mockredispy==2.9.3", | ||
| "more-itertools==10.5.0", | ||
| "packaging==24.2", | ||
| "pbr==6.1.0", | ||
| "pluggy==1.6.0", | ||
| "pyparsing==3.1.4", | ||
| "pytest==9.0.3", | ||
| "pytest-cov==5.0.0", | ||
| "pytest-timeout==2.3.1", | ||
| "responses==0.25.3", | ||
| "types-toml==0.10.8.20240310", | ||
| "sortedcontainers==2.4.0", | ||
| "toml==0.10.2", | ||
| "tomli==2.2.1", | ||
| ] | ||
| dev = [{include-group = "lint"}, {include-group = "test"}] | ||
|
|
||
| [tool.uv] | ||
| required-version = "==0.12.7" | ||
| # This is a service, not a library to be installed/imported by others. | ||
| package = false | ||
|
|
||
| [tool.ruff] | ||
| target-version = "py312" | ||
| line-length = 79 | ||
|
|
||
This file was deleted.
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As with the other PRs taking the opportunity to reduce noise.