-
Notifications
You must be signed in to change notification settings - Fork 187
feat(uv, ci): Api and shared-data uv migration #20135
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
Open
neo-jesse
wants to merge
117
commits into
edge
Choose a base branch
from
api-and-shared-uv-migration
base: edge
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
117 commits
Select commit
Hold shift + click to select a range
3e91b7f
trying api and shared only first
neo-jesse 5afec52
dynamic version
neo-jesse 1017a9a
setup uv first
neo-jesse b685508
more sources
neo-jesse bc631d1
still using pip
neo-jesse 32fdbb4
uv.lock files
neo-jesse d341879
deps
neo-jesse 4afb9f9
pre-create the cache
neo-jesse c2e4076
windows cache
neo-jesse 036f5b5
use the UV_CACHE_DIR environment variable
neo-jesse 1986ade
always run
neo-jesse a9707c5
GHA matrix options
neo-jesse 9fc2a2c
create the cache directory in two places
neo-jesse fe5da8d
test
neo-jesse d00bbbf
test
neo-jesse 553322f
trying runner cache
neo-jesse 2bec34a
no cache here
neo-jesse 2397acd
ignore
neo-jesse b3070e4
modularly install uv
neo-jesse af28c90
fix windows build
neo-jesse a5b9f52
disallow_untyped_decorators false
neo-jesse 5ff69cc
Added type casts
neo-jesse e73f1f6
pass the build
neo-jesse 9f6c867
more errors
neo-jesse 317040c
cast
neo-jesse a6fdfca
formatting
neo-jesse 513ab33
formatting
neo-jesse 612d84a
formatting
neo-jesse 818ae44
more deps
neo-jesse 919a011
dev deps
neo-jesse 71c39e0
need uv lock update
neo-jesse e06a1d8
we'll see
neo-jesse 56afca4
export path
neo-jesse 5f71c5a
deps
neo-jesse 30b6b28
mypy
neo-jesse e18e5e6
path
neo-jesse b18ba55
install-dev-deps
neo-jesse db24c4f
python-uv.mk
neo-jesse 86dc12e
maybe
neo-jesse b974082
install pipenv
neo-jesse 8292937
sync dev
neo-jesse 366890e
use pip
neo-jesse 715e9be
only api and shared-data
neo-jesse abfede5
api and shared-data
neo-jesse 17db7d4
more dev-deps
neo-jesse 402f211
docs dev deps
neo-jesse e0e43b6
more dev deps
neo-jesse 9234eb1
sync dev
neo-jesse 393dd95
sigh dev-deps
neo-jesse 083583a
first set of Seth recs
neo-jesse c42ff55
Merge branch 'edge' into api-and-shared-uv-migration
neo-jesse b361d37
Added imports for referencing
neo-jesse 5f94c9e
added --dev back
neo-jesse eefc7f8
referencing
neo-jesse e275c5d
formatting
neo-jesse 3677d6b
lockfile hash
neo-jesse d1de972
Update api/Makefile
neo-jesse db3f130
Update api/Makefile
neo-jesse c64022e
formatting
neo-jesse 3484337
another hash
neo-jesse 0d3b3e0
black is complaining
neo-jesse ff366f3
need this module
neo-jesse 82b2f2b
downgrade jsonschema
neo-jesse d6babb4
deps issue
neo-jesse 19f0e57
maybe can get rid of ignores
neo-jesse e63c96a
use real uv install
neo-jesse a7750a4
optional dep
neo-jesse 8c8abf5
mypy errors
neo-jesse 236913f
suggested changes
neo-jesse 2209780
no linux detection logic
neo-jesse 7fadfff
correct type
neo-jesse 29fe2f3
wrong version tags
neo-jesse b921c7b
regen lock file
neo-jesse 00ef191
formatting
neo-jesse 2fe3c59
remove -y
neo-jesse b2a2ad3
no hard versions
neo-jesse 7b8e039
dependency groups
neo-jesse 4fbfd32
switch to dependency groups
neo-jesse 0f8f481
group dev
neo-jesse 7a69e0d
robot server make test running with uv
y3rsh f065390
reset jsonschema version
neo-jesse e688c3c
adding ignores back in
neo-jesse 41d0cbc
remove extra cache action
neo-jesse f97b524
setup-uv action
neo-jesse 58caa89
perf helper
neo-jesse b5cb674
include robot
neo-jesse c82cb0b
fix docs
neo-jesse 2acce4c
removed unneeded change
neo-jesse e263295
more dep groups
neo-jesse 77ec4da
no more install-dev-deps
neo-jesse df03dc8
first run at migrating the rest
neo-jesse 8c84d54
use the right setup
neo-jesse cfa7fe8
more error fixes
neo-jesse 50ad2e4
old python
neo-jesse 1fc3d5c
update versions
neo-jesse c3884be
comments, removing pip
neo-jesse 54a0c22
uv caching, redundant steps
neo-jesse bd01434
more pytest
neo-jesse 3de4b02
setuptools
neo-jesse 196aa64
specify python version
neo-jesse d089165
revert to previous state
neo-jesse 8438b00
python 3.10
neo-jesse 1537688
uv pip install
neo-jesse e6582cb
venv python
neo-jesse eb9ded8
Revert "venv python"
neo-jesse 6bf6731
a few fixes
neo-jesse 317a21d
add back optional deps
neo-jesse 937f114
Api and shared uv migration josh (#20218)
y3rsh fdd48d6
Merge branch 'edge' into api-and-shared-uv-migration
neo-jesse 2712057
uniform stup-py targets
neo-jesse ef6db16
removed timing
neo-jesse 87d4a10
make matrix great again
neo-jesse 50964f8
more matrix
neo-jesse 4ee9e3e
need that file back
neo-jesse 32f306c
comments removed
neo-jesse 5ffe048
version fixes
neo-jesse ab14763
uv lock
neo-jesse 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
Some comments aren't visible on the classic Files Changed page.
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 |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| name: 'UV Python Setup' | ||
| description: 'Set up the environment for a UV-managed Python project' | ||
| inputs: | ||
| project: | ||
| description: 'Which project (by subdirectory) to set up' | ||
| required: true | ||
| python-version: | ||
| description: 'Python version to install via setup-uv' | ||
| required: false | ||
| default: '3.10' | ||
| install-system-deps: | ||
| description: 'Whether to install system dependencies (libsystemd-dev on Linux)' | ||
| required: false | ||
| default: 'true' | ||
| runs: | ||
| using: 'composite' | ||
| steps: | ||
| - shell: bash | ||
| if: inputs.install-system-deps == 'true' | ||
| run: | | ||
| if [[ "${OSTYPE}" =~ "linux" ]]; then | ||
| # WORKAROUND: Remove microsoft debian repo due to https://github.com/microsoft/linux-package-repositories/issues/130. Remove line below after it is resolved | ||
| sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list | ||
| sudo apt-get update | ||
| sudo apt-get install -y --no-install-recommends libsystemd-dev | ||
| fi | ||
| - shell: bash | ||
| run: npm install --global [email protected] | ||
| - name: Setup Python and UV | ||
| uses: astral-sh/setup-uv@v7 | ||
| with: | ||
| python-version: ${{ inputs.python-version }} | ||
| enable-cache: true | ||
| cache-dependency-glob: | | ||
| ${{ inputs.project }}/pyproject.toml | ||
| ${{ inputs.project }}/uv.lock | ||
| - name: Setup Python Environment | ||
| id: setup-env | ||
| shell: bash | ||
| run: make -C ${{ inputs.project }} setup |
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 |
|---|---|---|
|
|
@@ -4,35 +4,39 @@ inputs: | |
| project: | ||
| description: 'Which project (by subdirectory) to set up' | ||
| required: true | ||
| python-version: | ||
| description: "What Python version to use to create the project's virtual environment" | ||
| install-system-deps: | ||
| description: 'Whether to install system dependencies (libsystemd-dev on Linux)' | ||
| required: false | ||
| default: "false" | ||
| default: 'true' | ||
| runs: | ||
| using: 'composite' | ||
| steps: | ||
| - shell: bash | ||
| if: inputs.install-system-deps == 'true' | ||
| run: | | ||
| if [[ "${OSTYPE}" =~ "linux" ]]; then | ||
| # WORKAROUND: Remove microsoft debian repo due to https://github.com/microsoft/linux-package-repositories/issues/130. Remove line below after it is resolved | ||
| sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list | ||
| sudo apt-get update | ||
| sudo apt-get install -y --no-install-recommends libsystemd-dev | ||
| fi | ||
| - name: Set the OT_PYTHON env variable | ||
| shell: bash | ||
| run: echo "OT_PYTHON=$(which python)" >> $GITHUB_ENV | ||
| - name: If provided set the OT_VIRTUALENV_VERSION env variable | ||
| shell : bash | ||
| if: ${{ inputs.python-version != 'false' }} | ||
| run: echo "OT_VIRTUALENV_VERSION=${{ inputs.python-version }}" >> $GITHUB_ENV | ||
| - shell: bash | ||
| run: npm install --global [email protected] | ||
| - shell: bash | ||
| run: $OT_PYTHON -m pip install --upgrade pip | ||
| - shell: bash | ||
| run: $OT_PYTHON -m pip install --user pipenv==2023.12.1 | ||
| - shell: bash | ||
| run: $OT_PYTHON -m pip install --user virtualenv==20.30.0 | ||
| - shell: bash | ||
| run: 'make -C ${{ inputs.project }} setup || make -C ${{ inputs.project }} setup' | ||
| - name: Setup Python | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: '3.10' | ||
| - name: Install pipenv and virtualenv | ||
| shell: bash | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| python -m pip install --user pipenv==2023.12.1 | ||
| python -m pip install --user virtualenv==20.30.0 | ||
| - name: Setup Python Environment | ||
| id: setup-env | ||
| shell: bash | ||
| run: | | ||
| # For pipenv projects, make setup runs "pipenv sync --dev" which always installs dev dependencies | ||
| # (see scripts/python.mk where pipenv_opts includes --dev) | ||
| make -C ${{ inputs.project }} setup | ||
| echo "::notice::Setup completed" | ||
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 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 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
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.
Uh oh!
There was an error while loading. Please reload this page.