Skip to content

Commit d52748b

Browse files
committed
Implement support for Astral's uv.
Signed-off-by: Thomas Mansencal <[email protected]>
1 parent a9d2797 commit d52748b

File tree

15 files changed

+381
-253
lines changed

15 files changed

+381
-253
lines changed

.github/workflows/configuration-artifacts.yml

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,18 @@ jobs:
2828
- name: Install Dependencies
2929
run: |
3030
sudo apt-get --yes install graphviz graphviz-dev
31-
- name: Install Poetry
31+
- name: Install uv
3232
run: |
33-
curl -sSL https://install.python-poetry.org | POETRY_HOME=$HOME/.poetry python3 -
34-
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
33+
pip install uv
3534
shell: bash
3635
- name: Install Package Dependencies
3736
run: |
38-
poetry run python -m pip install --upgrade pip
39-
poetry install
37+
uv sync --all-extras --no-dev
38+
uv run python -c "import imageio;imageio.plugins.freeimage.download()"
4039
shell: bash
4140
- name: ACES - Conversion Graph
4241
run: |
43-
poetry run invoke build-aces-conversion-graph
42+
uv run invoke build-aces-conversion-graph
4443
shell: bash
4544
- uses: actions/upload-artifact@v4
4645
with:
@@ -49,7 +48,7 @@ jobs:
4948
build/aces/graph/
5049
- name: Generation - Config - Common Tests
5150
run: |
52-
poetry run invoke build-config-common-tests
51+
uv run invoke build-config-common-tests
5352
shell: bash
5453
- uses: actions/upload-artifact@v4
5554
with:
@@ -58,7 +57,7 @@ jobs:
5857
build/config/common/tests/
5958
- name: Generation - Config - ACES Reference (Analytical)
6059
run: |
61-
poetry run invoke build-config-reference-analytical
60+
uv run invoke build-config-reference-analytical
6261
shell: bash
6362
- uses: actions/upload-artifact@v4
6463
with:
@@ -67,7 +66,7 @@ jobs:
6766
build/config/aces/analytical/
6867
- name: Generation - Config - ACES Reference
6968
run: |
70-
poetry run invoke build-config-reference
69+
uv run invoke build-config-reference
7170
shell: bash
7271
- uses: actions/upload-artifact@v4
7372
with:
@@ -76,7 +75,7 @@ jobs:
7675
build/config/aces/reference/
7776
- name: Generation - Config - ACES CG
7877
run: |
79-
poetry run invoke build-config-cg
78+
uv run invoke build-config-cg
8079
shell: bash
8180
- uses: actions/upload-artifact@v4
8281
with:
@@ -85,7 +84,7 @@ jobs:
8584
build/config/aces/cg/
8685
- name: Generation - Config - ACES Studio
8786
run: |
88-
poetry run invoke build-config-studio
87+
uv run invoke build-config-studio
8988
shell: bash
9089
- uses: actions/upload-artifact@v4
9190
with:

.github/workflows/continuous-integration-quality-unit-tests.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@ jobs:
77
name: ${{ matrix.os }} - Python ${{ matrix.python-version }}
88
strategy:
99
matrix:
10-
# os: [macOS-13, ubuntu-20.04, windows-latest]
11-
os: [macOS-13, ubuntu-20.04]
12-
python-version: [3.11]
10+
os: [macOS-latest, ubuntu-latest, windows-latest]
11+
python-version: [3.13]
1312
fail-fast: false
1413
runs-on: ${{ matrix.os }}
1514
steps:
@@ -23,33 +22,34 @@ jobs:
2322
echo "CI_SHA=${{ github.sha }}" >> $GITHUB_ENV
2423
echo "COVERALLS_REPO_TOKEN=${{ secrets.COVERALLS_REPO_TOKEN }}" >> $GITHUB_ENV
2524
shell: bash
26-
- name: Set up Python 3.9 for Pre-Commit
25+
- name: Set up Python 3.10 for Pre-Commit
2726
uses: actions/setup-python@v4
2827
with:
29-
python-version: 3.9
28+
python-version: "3.10"
3029
- name: Set up Python ${{ matrix.python-version }}
3130
uses: actions/setup-python@v4
3231
with:
3332
python-version: ${{ matrix.python-version }}
34-
- name: Install Poetry
33+
- name: Install uv
3534
run: |
36-
curl -sSL https://install.python-poetry.org | POETRY_HOME=$HOME/.poetry python3 -
37-
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
35+
pip install uv
3836
shell: bash
3937
- name: Install Package Dependencies
4038
run: |
41-
poetry run python -m pip install --upgrade pip
42-
poetry install --without graphviz
39+
uv sync --all-extras --no-dev
40+
uv run python -c "import imageio;imageio.plugins.freeimage.download()"
4341
shell: bash
4442
- name: Pre-Commit (All Files)
4543
run: |
46-
poetry run pre-commit run --all-files
44+
uv run pre-commit run --all-files
4745
shell: bash
4846
- name: Test Optimised Python Execution
47+
# Segfault on Windows currently.
48+
if: matrix.os == 'macOS-latest' || matrix.os == 'ubuntu-latest'
4949
run: |
50-
poetry run python -OO -c "import $CI_PACKAGE"
50+
uv run python -OO -c "import $CI_PACKAGE"
5151
shell: bash
5252
- name: Test with Pytest
5353
run: |
54-
poetry run python -W ignore -m pytest --disable-warnings --doctest-modules --ignore=$CI_PACKAGE/config/reference/aces-dev --cov=$CI_PACKAGE $CI_PACKAGE
54+
uv run python -W ignore -m pytest --disable-warnings --doctest-modules --ignore=$CI_PACKAGE/config/reference/aces-dev --cov=$CI_PACKAGE $CI_PACKAGE
5555
shell: bash

.github/workflows/continuous-integration-static-type-checking.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ jobs:
77
name: ${{ matrix.os }} - Python ${{ matrix.python-version }}
88
strategy:
99
matrix:
10-
os: [macOS-13]
11-
python-version: [3.11]
10+
os: [macOS-latest]
11+
python-version: [3.13]
1212
fail-fast: false
1313
runs-on: ${{ matrix.os }}
1414
steps:
@@ -23,7 +23,7 @@ jobs:
2323
python-version: ${{ matrix.python-version }}
2424
- name: Install Package Dependencies
2525
run: |
26-
pip install -r requirements.txt
26+
cat requirements.txt | grep -Eo '(^[^#]+)' | xargs -n 1 pip install || true
2727
- name: Static Type Checking
2828
run: |
2929
pyright --skipunannotated

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@
55
.coverage
66
.dmypy.json
77
.idea
8+
.venv
89
__pycache__
910
build
1011
dist
1112
docs/_build
1213
docs/generated
13-
poetry.lock
14+
uv.lock

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ repos:
3737
rev: 1.16.0
3838
hooks:
3939
- id: blacken-docs
40-
language_version: python3.9
40+
language_version: python3.10
4141
- repo: https://github.com/pre-commit/mirrors-prettier
4242
rev: "v3.1.0"
4343
hooks:

README.rst

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -70,26 +70,24 @@ argument, it is possible to initialize the submodules as follows::
7070

7171
git submodule update --init --recursive
7272

73-
Poetry
74-
~~~~~~
73+
uv
74+
~~
7575

76-
The *OpenColorIO Configuration for ACES* repository adopts `Poetry <https://poetry.eustace.io>`__
76+
The *OpenColorIO Configuration for ACES* repository adopts `uv <https://github.com/astral-sh/uv>`__
7777
to help managing its dependencies, this is the recommended way to get started
7878
with development.
7979

80-
Assuming `python >= 3.9 <https://www.python.org/download/releases>`__ is
80+
Assuming `python >= 3.10 <https://www.python.org/download/releases>`__ is
8181
available on your system along with `OpenColorIO <https://opencolorio.org>`__,
82-
the development dependencies are installed with `Poetry <https://poetry.eustace.io>`__
82+
the development dependencies are installed with `uv <https://github.com/astral-sh/uv>`__
8383
as follows::
8484

8585
git clone --recursive https://github.com/AcademySoftwareFoundation/OpenColorIO-Config-ACES.git
8686
cd OpenColorIO-Config-ACES
87-
poetry install --with optional
87+
uv sync --all-extras
8888

8989
The *aces-dev* *CTL* reference graph can be plotted but it requires `Graphviz <https://graphviz.org>`__
90-
to be installed on the system::
91-
92-
poetry install --with optional
90+
to be installed on the system.
9391

9492
Docker
9593
~~~~~~
@@ -121,7 +119,7 @@ dependencies in order to run and be able to generate the *OCIO* configurations:
121119
Primary Dependencies
122120
********************
123121

124-
- `python >= 3.9, < 3.11 <https://www.python.org/download/releases>`__
122+
- `python >= 3.10, < 3.14 <https://www.python.org/download/releases>`__
125123
- `opencolorio <https://pypi.org/project/opencolorio>`__
126124
- `requests <https://pypi.org/project/requests>`__
127125
- `semver <https://pypi.org/project/semver>`__
@@ -135,20 +133,24 @@ Optional Dependencies
135133
- `networkx <https://pypi.org/project/networkx>`__
136134
- `pydot <https://pypi.org/project/pydot>`__
137135

136+
Docs Dependencies
137+
*****************
138+
139+
- `pydata-sphinx-theme <https://pypi.org/project/pydata-sphinx-theme>`__
140+
- `sphinx <https://pypi.org/project/sphinx>`__
141+
138142
Development Dependencies
139143
************************
140144

141145
- `coverage <https://pypi.org/project/coverage>`__
142146
- `coveralls <https://pypi.org/project/coveralls>`__
147+
- `hatch <https://pypi.org/project/hatch>`__
143148
- `invoke <https://pypi.org/project/invoke>`__
144149
- `pre-commit <https://pypi.org/project/pre-commit>`__
145-
- `pydata-sphinx-theme <https://pypi.org/project/pydata-sphinx-theme>`__
146150
- `pyright <https://pypi.org/project/pyright>`__
147151
- `pytest <https://pypi.org/project/pytest>`__
148152
- `pytest-cov <https://pypi.org/project/pytest-cov>`__
149-
- `restructuredtext-lint <https://pypi.org/project/restructuredtext-lint>`__
150-
- `sphinx >= 4, < 5 <https://pypi.org/project/sphinx>`__
151-
- `twine <https://pypi.org/project/twine>`__
153+
- `pytest-xdist <https://pypi.org/project/pytest-xdist>`__
152154

153155
Components Status
154156
^^^^^^^^^^^^^^^^^

docs/installation.rst

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,26 +18,24 @@ argument, it is possible to initialize the submodules as follows::
1818

1919
git submodule update --init --recursive
2020

21-
Poetry
22-
------
21+
uv
22+
~~
2323

24-
The *OpenColorIO Configuration for ACES* repository adopts `Poetry <https://poetry.eustace.io>`__
24+
The *OpenColorIO Configuration for ACES* repository adopts `uv <https://github.com/astral-sh/uv>`__
2525
to help managing its dependencies, this is the recommended way to get started
2626
with development.
2727

28-
Assuming `python >= 3.9 <https://www.python.org/download/releases>`__ is
29-
available on your system along with `OpenColorIO >= 2 <https://opencolorio.org>`__,
30-
the development dependencies are installed with `Poetry <https://poetry.eustace.io>`__
28+
Assuming `python >= 3.10 <https://www.python.org/download/releases>`__ is
29+
available on your system along with `OpenColorIO <https://opencolorio.org>`__,
30+
the development dependencies are installed with `uv <https://github.com/astral-sh/uv>`__
3131
as follows::
3232

3333
git clone --recursive https://github.com/AcademySoftwareFoundation/OpenColorIO-Config-ACES.git
3434
cd OpenColorIO-Config-ACES
35-
poetry install --with optional
35+
uv sync --all-extras
3636

3737
The *aces-dev* *CTL* reference graph can be plotted but it requires `Graphviz <https://graphviz.org>`__
38-
to be installed on the system::
39-
40-
poetry install --with optional
38+
to be installed on the system.
4139

4240
Docker
4341
------
@@ -69,7 +67,7 @@ dependencies in order to run and be able to generate the *OCIO* configurations:
6967
Primary Dependencies
7068
********************
7169

72-
- `python >= 3.9, < 3.11 <https://www.python.org/download/releases>`__
70+
- `python >= 3.10, < 3.14 <https://www.python.org/download/releases>`__
7371
- `opencolorio <https://pypi.org/project/opencolorio>`__
7472
- `requests <https://pypi.org/project/requests>`__
7573
- `semver <https://pypi.org/project/semver>`__
@@ -83,17 +81,21 @@ Optional Dependencies
8381
- `networkx <https://pypi.org/project/networkx>`__
8482
- `pydot <https://pypi.org/project/pydot>`__
8583

84+
Docs Dependencies
85+
*****************
86+
87+
- `pydata-sphinx-theme <https://pypi.org/project/pydata-sphinx-theme>`__
88+
- `sphinx <https://pypi.org/project/sphinx>`__
89+
8690
Development Dependencies
8791
************************
8892

8993
- `coverage <https://pypi.org/project/coverage>`__
9094
- `coveralls <https://pypi.org/project/coveralls>`__
95+
- `hatch <https://pypi.org/project/hatch>`__
9196
- `invoke <https://pypi.org/project/invoke>`__
9297
- `pre-commit <https://pypi.org/project/pre-commit>`__
93-
- `pydata-sphinx-theme <https://pypi.org/project/pydata-sphinx-theme>`__
9498
- `pyright <https://pypi.org/project/pyright>`__
9599
- `pytest <https://pypi.org/project/pytest>`__
96100
- `pytest-cov <https://pypi.org/project/pytest-cov>`__
97-
- `restructuredtext-lint <https://pypi.org/project/restructuredtext-lint>`__
98-
- `sphinx >= 4, < 5 <https://pypi.org/project/sphinx>`__
99-
- `twine <https://pypi.org/project/twine>`__
101+
- `pytest-xdist <https://pypi.org/project/pytest-xdist>`__

docs/requirements.txt

Lines changed: 41 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,41 @@
1-
accessible-pygments==0.0.4 ; python_version >= "3.9" and python_version < "3.12"
2-
alabaster==0.7.16 ; python_version >= "3.9" and python_version < "3.12"
3-
babel==2.14.0 ; python_version >= "3.9" and python_version < "3.12"
4-
beautifulsoup4==4.12.3 ; python_version >= "3.9" and python_version < "3.12"
5-
certifi==2024.2.2 ; python_version >= "3.9" and python_version < "3.12"
6-
charset-normalizer==3.3.2 ; python_version >= "3.9" and python_version < "3.12"
7-
colorama==0.4.6 ; python_version >= "3.9" and python_version < "3.12" and sys_platform == "win32"
8-
colour-science==0.4.4 ; python_version >= "3.9" and python_version < "3.12"
9-
docutils==0.17.1 ; python_version >= "3.9" and python_version < "3.12"
10-
idna==3.7 ; python_version >= "3.9" and python_version < "3.12"
11-
imageio==2.34.1 ; python_version >= "3.9" and python_version < "3.12"
12-
imagesize==1.4.1 ; python_version >= "3.9" and python_version < "3.12"
13-
importlib-metadata==7.1.0 ; python_version >= "3.9" and python_version < "3.10"
14-
jinja2==3.1.3 ; python_version >= "3.9" and python_version < "3.12"
15-
jsonpickle==2.2.0 ; python_version >= "3.9" and python_version < "3.12"
16-
markupsafe==2.1.5 ; python_version >= "3.9" and python_version < "3.12"
17-
networkx==3.2.1 ; python_version >= "3.9" and python_version < "3.12"
18-
numpy==1.26.4 ; python_version >= "3.9" and python_version < "3.12"
19-
opencolorio==2.3.2 ; python_version >= "3.9" and python_version < "3.12"
20-
packaging==24.0 ; python_version >= "3.9" and python_version < "3.12"
21-
pillow==10.3.0 ; python_version >= "3.9" and python_version < "3.12"
22-
pydata-sphinx-theme==0.13.3 ; python_version >= "3.9" and python_version < "3.12"
23-
pygments==2.17.2 ; python_version >= "3.9" and python_version < "3.12"
24-
pygraphviz==1.11 ; python_version >= "3.9" and python_version < "3.12"
25-
requests==2.31.0 ; python_version >= "3.9" and python_version < "3.12"
26-
scipy==1.13.0 ; python_version >= "3.9" and python_version < "3.12"
27-
semver==3.0.2 ; python_version >= "3.9" and python_version < "3.12"
28-
snowballstemmer==2.2.0 ; python_version >= "3.9" and python_version < "3.12"
29-
soupsieve==2.5 ; python_version >= "3.9" and python_version < "3.12"
30-
sphinx==4.5.0 ; python_version >= "3.9" and python_version < "3.12"
31-
sphinxcontrib-applehelp==1.0.8 ; python_version >= "3.9" and python_version < "3.12"
32-
sphinxcontrib-devhelp==1.0.6 ; python_version >= "3.9" and python_version < "3.12"
33-
sphinxcontrib-htmlhelp==2.0.5 ; python_version >= "3.9" and python_version < "3.12"
34-
sphinxcontrib-jsmath==1.0.1 ; python_version >= "3.9" and python_version < "3.12"
35-
sphinxcontrib-qthelp==1.0.7 ; python_version >= "3.9" and python_version < "3.12"
36-
sphinxcontrib-serializinghtml==1.1.10 ; python_version >= "3.9" and python_version < "3.12"
37-
typing-extensions==4.11.0 ; python_version >= "3.9" and python_version < "3.12"
38-
urllib3==2.2.1 ; python_version >= "3.9" and python_version < "3.12"
39-
zipp==3.18.1 ; python_version >= "3.9" and python_version < "3.10"
1+
# This file was autogenerated by uv via the following command:
2+
# uv export --no-hashes --all-extras --no-dev
3+
accessible-pygments==0.0.5
4+
alabaster==1.0.0
5+
babel==2.16.0
6+
beautifulsoup4==4.12.3
7+
certifi==2024.8.30
8+
charset-normalizer==3.4.0
9+
colorama==0.4.6 ; sys_platform == 'win32'
10+
colour-science==0.4.6
11+
docutils==0.21.2
12+
idna==3.10
13+
imageio==2.36.0
14+
imagesize==1.4.1
15+
jinja2==3.1.4
16+
jsonpickle==2.2.0
17+
markupsafe==3.0.2
18+
networkx==3.4.2
19+
numpy==2.1.3
20+
opencolorio==2.4.0
21+
packaging==24.2
22+
pillow==11.0.0
23+
pydata-sphinx-theme==0.16.0
24+
pydot==3.0.2
25+
pygments==2.18.0
26+
pyparsing==3.2.0
27+
requests==2.32.3
28+
scipy==1.14.1
29+
semver==3.0.2
30+
snowballstemmer==2.2.0
31+
soupsieve==2.6
32+
sphinx==8.1.3
33+
sphinxcontrib-applehelp==2.0.0
34+
sphinxcontrib-devhelp==2.0.0
35+
sphinxcontrib-htmlhelp==2.1.0
36+
sphinxcontrib-jsmath==1.0.1
37+
sphinxcontrib-qthelp==2.0.0
38+
sphinxcontrib-serializinghtml==2.0.0
39+
tomli==2.1.0 ; python_full_version < '3.11'
40+
typing-extensions==4.12.2
41+
urllib3==2.2.3

0 commit comments

Comments
 (0)