GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Python: switch to uv package manager (formerly: pdm) (#62951) · code-dot-org/code-dot-org@633a07e

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • .drone.yml
  • .gitignore
  • SETUP.md
  • cookbooks/cdo-python
    • recipes
      • default.rb
    • test
      • integration/default/inspec
        • python_spec.rb
      • shared
        • helper_spec.rb
  • docker
    • ci
      • Dockerfile
    • setup-compose.yml
    • site-compose.yml
    • ui-tests-compose.yml
    • unit-tests-compose.yml
  • lib
    • cdo
      • pycall.rb
      • python_venv.rb
      • test_run_utils.rb
    • rake
      • test.rake
  • pdm.lock
  • pyproject.toml
  • python
    • README.md
    • pycdo
      • pdm.lock
      • pyproject.toml
    • pythonlab
      • README.md
      • neighborhood
        • pdm.lock
        • pyproject.toml
      • pythonlab_setup
        • pdm.lock
        • pyproject.toml
      • unittest_runner
        • pdm.lock
        • pyproject.toml
  • uv.lock
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎.drone.yml‎

Copy file name to clipboardExpand all lines: .drone.yml
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ steps:
8282
- name: unit-tests
8383
# see: docker/ci/Dockerfile
8484
# TODO: switch to codedotorg/cdo-ci
85-
image: codedotorg/code-dot-org:1.11.1
85+
image: codedotorg/code-dot-org:1.14
8686
pull: always
8787
volumes:
8888
- name: rbenv
@@ -215,7 +215,7 @@ steps:
215215
- name: ui-tests
216216
# see: docker/ci/Dockerfile
217217
# TODO: switch to codedotorg/cdo-ci
218-
image: codedotorg/code-dot-org:1.11.1
218+
image: codedotorg/code-dot-org:1.14
219219
pull: always
220220
volumes:
221221
- name: rbenv
@@ -316,6 +316,6 @@ trigger:
316316
- push
317317
---
318318
kind: signature
319-
hmac: 38a0cef75d2449a37668b441e20c4d71ab55a1809191b792fc7b2e6297f57ddb
319+
hmac: 438911a0c59ad180adae90c55e5bf3f15713df10458caf0f44347f7fff00eb4c
320320

321321
...
Collapse file

‎.gitignore‎

Copy file name to clipboardExpand all lines: .gitignore
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,5 +101,6 @@ npm-debug.log
101101
/i18n/locales/*/standards/
102102
/i18n/locales/*/docs/
103103

104-
# Specifies the user-specific path to the venv for pdm
104+
# python venv:
105+
.venv
105106
.pdm-python
Collapse file

‎SETUP.md‎

Copy file name to clipboardExpand all lines: SETUP.md
+5-5Lines changed: 5 additions & 5 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ You can do Code.org development using macOS, Ubuntu, or Windows (running Ubuntu
2424
ruby --version # --> ruby 3.0.5
2525
node --version # --> v18.16.0
2626
git-lfs --version # >= git-lfs/3.0
27-
pdm --version # >= 2.17
27+
uv --version # >= 0.5.8
2828
```
2929

3030
1. `git lfs pull`
@@ -118,7 +118,7 @@ These steps are for Apple devices running **macOS 14.x**, including those runnin
118118

119119
1. Install **brew packages**:
120120
```
121-
brew install rbenv ruby-build nvm pdm [email protected] redis git-lfs enscript gs imagemagick coreutils parallel tidy-html5 openssl libffi pdftk-java
121+
brew install rbenv ruby-build nvm uv [email protected] redis git-lfs enscript gs imagemagick coreutils parallel tidy-html5 openssl libffi pdftk-java
122122
```
123123

124124
1. Initialize **Git LFS**:
@@ -250,9 +250,9 @@ Note: Virtual Machine Users should check the [Alternative note](#alternative-use
250250
1. If your PATH is missing `~/.rbenv/shims`, the next two commands might not work. Edit your .bashrc to include the following line:
251251
`export PATH="$HOME/.rbenv/bin:~/.rbenv/shims:$PATH"`, then run `source .bashrc` for the change to take effect (as seen in [this github issue](https://github.com/rbenv/rbenv/issues/877)).
252252
1. `rbenv rehash`
253-
1. Install pdm, which will be used later by `rake install` to install python
254-
1. `sudo pip3 install --prefix=/usr/local --upgrade pdm`
255-
- alternatively, if you prefer pipx and have it configured path-wise: `pipx install pdm`
253+
1. Install uv, which will be used later by `rake install` to install python
254+
1. `curl -LsSf https://astral.sh/uv/install.sh | sh`
255+
- alternatively, if you prefer pipx and have it configured path-wise: `pipx install uv`
256256
1. Enable **corepack** to install **yarn**: `corepack enable`
257257
1. Make it so that you can run apps tests locally
258258
1. Add the following to `~/.bashrc` or your desired shell configuration file:
Collapse file

‎cookbooks/cdo-python/recipes/default.rb‎

Copy file name to clipboard
+6-4Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
apt_package 'python3-pip'
1+
apt_package 'curl'
22

3-
execute 'install pdm' do
4-
command 'pip install --system --prefix=/usr/local pdm'
5-
not_if 'pip show pdm'
3+
execute 'install uv' do
4+
# By default uv's install.sh will install to the user's homedir and modify the user's PATH.
5+
# Instead we wish to install uv to /usr/local/bin, which is already in the PATH.
6+
command 'curl -LsSf https://astral.sh/uv/0.5.18/install.sh | XDG_BIN_HOME=/usr/local/bin UV_NO_MODIFY_PATH=1 sh'
7+
not_if 'which uv'
68
end
Collapse file

‎cookbooks/cdo-python/test/integration/default/inspec/python_spec.rb‎

Copy file name to clipboard
+4-3Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
describe command('which pdm') do
2-
its('exit_status') {should eq 0}
3-
end
1+
require_relative '../../../shared/helper_spec'
2+
3+
file_exist '/usr/local/bin/uv'
4+
cmd 'uv --version', '0.5.18'
Collapse file

‎cookbooks/cdo-python/test/shared/helper_spec.rb‎

Copy file name to clipboard
+17Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
def file_not_exist(file)
2+
describe file(file) do
3+
it {should_not exist}
4+
end
5+
end
6+
7+
def file_exist(file)
8+
describe file(file) do
9+
it {should exist}
10+
end
11+
end
12+
13+
def cmd(exec, match)
14+
describe command(exec) do
15+
its(:stdout) {should match match}
16+
end
17+
end
Collapse file

‎docker/ci/Dockerfile‎

Copy file name to clipboardExpand all lines: docker/ci/Dockerfile
+5-2Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,11 @@ RUN curl -SsL https://github.com/boxboat/fixuid/releases/download/v0.4/fixuid-0.
190190
mkdir -p /etc/fixuid && \
191191
printf "user: ${USER}\ngroup: ${GROUP}\n" > /etc/fixuid/config.yml
192192

193-
# install pdm for managing our python dependencies
194-
RUN pip install --system --prefix=/usr/local pdm
193+
# install uv for managing our python dependencies
194+
#
195+
# By default uv's install.sh will install to the user's homedir and modify the user's PATH.
196+
# Instead we wish to install uv to /usr/local/bin, which is already in the PATH.
197+
RUN curl -LsSf https://astral.sh/uv/0.5.18/install.sh | XDG_BIN_HOME=/usr/local/bin UV_NO_MODIFY_PATH=1 sh
195198

196199
# install sc, the sauce connect proxy for running UI tests
197200
RUN mkdir sauce_connect && \
Collapse file

‎docker/setup-compose.yml‎

Copy file name to clipboardExpand all lines: docker/setup-compose.yml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ version: "3"
1414
services:
1515
site:
1616
# TODO: switch to codedotorg/cdo-ci or other new image
17-
image: codedotorg/code-dot-org:1.11.1
17+
image: codedotorg/code-dot-org:1.14
1818
user: ${FIXUID:-1000}:${FIXGID:-1000}
1919
volumes:
2020
- ../:/home/ci/code-dot-org:delegated
Collapse file

‎docker/site-compose.yml‎

Copy file name to clipboardExpand all lines: docker/site-compose.yml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ version: "3"
1717
services:
1818
site:
1919
# TODO: switch to codedotorg/cdo-ci or other new image
20-
image: codedotorg/code-dot-org:1.11.1
20+
image: codedotorg/code-dot-org:1.14
2121
user: ${FIXUID:-1000}:${FIXGID:-1000}
2222
volumes:
2323
- ../:/home/ci/code-dot-org:delegated
Collapse file

‎docker/ui-tests-compose.yml‎

Copy file name to clipboardExpand all lines: docker/ui-tests-compose.yml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ version: "3"
2323
services:
2424
site:
2525
# TODO: switch to codedotorg/cdo-ci or other new image
26-
image: codedotorg/code-dot-org:1.11.1
26+
image: codedotorg/code-dot-org:1.14
2727
user: ${FIXUID:-1000}:${FIXGID:-1000}
2828
volumes:
2929
- ../:/home/ci/code-dot-org:delegated

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.