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

build(uv): Lean on uv for all tasks within Makefile #316

Merged
merged 42 commits into from
Oct 29, 2024

Conversation

schloerke
Copy link
Collaborator

@schloerke schloerke commented Oct 28, 2024

Changes

Breaking changes:

  • Drop python 3.8 support
    • Main motivation: uv doesn't like to run quartodoc when python 3.8 is supported. However, python 3.8 is EOL, so it is fair to drop support.
    • Update: Workarounds were made to have quartodoc and uv play nicely. No remaining reason to drop 3.8

UV:

  • Require usage of .venv
  • Use uv for as many commands as possible
    • Every make command should be able to be run without requiring to activate the virtual environment
    • (Reduce adoption friction down to a minimum)
  • Always install deps with uv before a python package command is run
  • Remove requirements.txt and requirements-dev.txt. Instead, leverage pyproject.toml
    • Drop make deps and fold functionality into make dev
    • Currently waiting on pip to determine who groups are installed before uv implements group installation: uv pip install --group astral-sh/uv#8590 (comment) . However, uv is fast that groups are not really needed for now.

GHA:

  • Use astral-sh/setup-uv and uv python install VERSION to install uv and python
  • Remove usage of env: { UV_SYSTEM_PYTHON: true }
  • Drop cache from runs. uv is fast to install everything and nothing can get poisoned from prior runs. (Major pain to discover / debug)
  • Test on python 3.13

@schloerke schloerke self-assigned this Oct 28, 2024
@schloerke schloerke changed the title Auto white space formatting chore(uv): Lean on uv for all tasks within Makefile Oct 28, 2024
Copy link

github-actions bot commented Oct 29, 2024

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
1245 1191 96% 0% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
src/posit/connect/paginator.py 100% 🟢
TOTAL 100% 🟢

updated for commit: 8d8c0ae by action🐍

@schloerke schloerke marked this pull request as ready for review October 29, 2024 06:18
Copy link
Collaborator

@tdstein tdstein left a comment

Choose a reason for hiding this comment

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

This is awesome! We'll need to adjust to continue supporting Python 3.8, but otherwise this looks great. It's wild how many new features uv has introduced since we originally migrated to it in August.

pyproject.toml Outdated Show resolved Hide resolved
Makefile Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
Makefile Show resolved Hide resolved
.github/workflows/ci.yaml Outdated Show resolved Hide resolved
.github/workflows/ci.yaml Show resolved Hide resolved
docs/Makefile Show resolved Hide resolved
docs/Makefile Outdated Show resolved Hide resolved
docs/Makefile Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved
@tdstein
Copy link
Collaborator

tdstein commented Oct 29, 2024

Also, you can remove the '!' from the conventional commit title. The '!' is only necessary for breaking changes affecting package consumers (e.g., a change requiring a major version bump).

"build(uv): lean on uv for all python tasks" would also be appropriate since this affects more than the Makefiles.

@schloerke schloerke changed the title chore(uv)!: Lean on uv for all tasks within Makefile build(uv): Lean on uv for all tasks within Makefile Oct 29, 2024
docs/Makefile Outdated Show resolved Hide resolved
docs/installation.qmd Outdated Show resolved Hide resolved
Co-authored-by: Taylor Steinberg <[email protected]>
pyproject.toml Outdated Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved
Makefile Show resolved Hide resolved
Copy link
Collaborator

@tdstein tdstein left a comment

Choose a reason for hiding this comment

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

🙌🏻

I have one outstanding question regarding the integration tests, but regardless, this is awesome! I love the pragmatic use of uv in different places. It really shows the power of the tooling.

@schloerke schloerke merged commit 14922d2 into main Oct 29, 2024
33 checks passed
@schloerke schloerke deleted the barret-makefile-requires branch October 29, 2024 21:06
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.

3 participants