-
-
Notifications
You must be signed in to change notification settings - Fork 110
Introduce uv for Project Management
#547
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
Changes from 12 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
bb4f327
Update `.gitignore` to allow Git tracking of `uv.lock` file
KanchiShimono fb84723
Generate `uv.lock` by running `uv sync --all-extras`
KanchiShimono 44e7531
Add development dependencies to dependency-groups
KanchiShimono 160b60e
Remove requirements
KanchiShimono c1673ce
Update unit tests to accommodate the change in URL type implementatio…
KanchiShimono 12ebdad
Suppress mypy error
KanchiShimono c43110e
Format code by running Ruff
KanchiShimono 71a80d4
Update Makefile
KanchiShimono 781c894
Update GHA
KanchiShimono 0f2033a
Add installation of pip required for executing pre-commit/action
KanchiShimono 638fbc8
Fix typo
KanchiShimono 933f800
Remove unused dependencies
KanchiShimono 6110d33
Use the same release job as Pydantic’s GitHub Actions
KanchiShimono File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,14 +15,18 @@ jobs: | |
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: set up python | ||
| uses: actions/setup-python@v5 | ||
| - name: set up uv | ||
| uses: astral-sh/setup-uv@v5 | ||
| with: | ||
| python-version: '3.10' | ||
|
|
||
| - run: pip install -r requirements/linting.txt -r requirements/pyproject.txt | ||
| - name: Install dependencies | ||
| # Installing pip is required for the pre-commit action: | ||
| run: | | ||
| uv sync --group linting --all-extras | ||
| uv pip install pip | ||
|
|
||
| - uses: pre-commit/[email protected].0 | ||
| - uses: pre-commit/[email protected].1 | ||
| with: | ||
| extra_args: --all-files | ||
|
|
||
|
|
@@ -37,18 +41,21 @@ jobs: | |
| env: | ||
| PYTHON: ${{ matrix.python }} | ||
| OS: ${{ matrix.os }} | ||
| UV_PYTHON_PREFERENCE: only-managed | ||
|
|
||
| runs-on: ${{ matrix.os }} | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: set up python | ||
| uses: actions/setup-python@v5 | ||
| - name: set up uv | ||
| uses: astral-sh/setup-uv@v5 | ||
| with: | ||
| python-version: ${{ matrix.python }} | ||
|
|
||
| - run: pip install -r requirements/testing.txt -r requirements/pyproject.txt | ||
| - name: Install dependencies | ||
| run: | | ||
| uv sync --group testing --all-extras | ||
|
|
||
| - name: test | ||
| run: make test | ||
|
|
@@ -57,16 +64,16 @@ jobs: | |
| CONTEXT: ${{ runner.os }}-py${{ matrix.python }} | ||
|
|
||
| - name: uninstall deps | ||
| run: pip uninstall -y PyYAML | ||
| run: uv pip uninstall PyYAML | ||
|
|
||
| - name: test without deps | ||
| run: make test | ||
| env: | ||
| COVERAGE_FILE: .coverage.${{ runner.os }}-py${{ matrix.python }}-without-deps | ||
| CONTEXT: ${{ runner.os }}-py${{ matrix.python }}-without-deps | ||
|
|
||
| - run: coverage combine | ||
| - run: coverage xml | ||
| - run: uv run coverage combine | ||
| - run: uv run coverage xml | ||
|
|
||
| - uses: codecov/codecov-action@v4 | ||
| with: | ||
|
|
@@ -98,21 +105,18 @@ jobs: | |
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: set up python | ||
| uses: actions/setup-python@v5 | ||
| - name: set up uv | ||
| uses: astral-sh/setup-uv@v5 | ||
| with: | ||
| python-version: '3.10' | ||
|
|
||
| - name: install | ||
| run: pip install -U build | ||
|
|
||
| - name: check GITHUB_REF matches package version | ||
| uses: samuelcolvin/check-python-version@v3.1 | ||
| uses: samuelcolvin/check-python-version@v4.1 | ||
| with: | ||
| version_file_path: pydantic_settings/version.py | ||
|
|
||
| - name: build | ||
| run: python -m build | ||
| run: uv build | ||
|
|
||
| - name: Upload package to PyPI | ||
| uses: pypa/gh-action-pypi-publish@release/v1 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,6 +6,7 @@ venv/ | |
| env3*/ | ||
| Pipfile | ||
| *.lock | ||
| !uv.lock | ||
| *.py[cod] | ||
| *.egg-info/ | ||
| /build/ | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Let's not change the
releasepart. as we are using the same thing in pydantic.