Skip to content

Commit 5b9b482

Browse files
authored
Merge pull request #88 from gdsfactory/use_uv
use uv
2 parents a59ecfe + 9cf21ce commit 5b9b482

File tree

3 files changed

+27
-27
lines changed

3 files changed

+27
-27
lines changed

.github/workflows/pages.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,15 @@ jobs:
99
build-docs:
1010
runs-on: ubuntu-latest
1111
name: Sphinx docs to gh-pages
12-
container: ghcr.io/gdsfactory/gdsfactory:main
1312
steps:
1413
- uses: actions/checkout@v4
15-
- name: Installing the library
16-
shell: bash -l {0}
14+
- name: Set up Python
15+
uses: actions/setup-python@v5
16+
with:
17+
python-version: '3.11'
18+
- name: Install uv
19+
uses: astral-sh/setup-uv@v5
20+
- name: Install dependencies
1721
run: |
1822
make install
1923
- name: make docs

.github/workflows/test_code.yml

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,19 @@ jobs:
1010
pre-commit:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v4
14-
- name: Set up Python
15-
uses: actions/setup-python@v5
16-
with:
17-
python-version: "3.10"
18-
cache: "pip"
19-
cache-dependency-path: pyproject.toml
20-
- name: Test pre-commit hooks
21-
run: |
22-
python -m pip install --upgrade pip
23-
pip install pre-commit
24-
pre-commit run -a
13+
- uses: actions/checkout@v4
14+
- uses: actions/setup-python@v5
15+
- uses: pre-commit/[email protected]
2516
test_code:
2617
runs-on: ubuntu-latest
27-
container: ghcr.io/gdsfactory/gdsfactory:main
2818
steps:
2919
- uses: actions/checkout@v4
20+
- name: Set up Python
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version: '3.11'
24+
- name: Install uv
25+
uses: astral-sh/setup-uv@v5
3026
- name: Install dependencies
3127
run: |
3228
make install

Makefile

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
install:
2-
pip install -e .[dev,docs]
2+
uv sync --extra docs --extra dev
33

44
test:
5-
pytest -s tests/test_si220.py
6-
pytest -s tests/test_si500.py
7-
pytest -s tests/test_sin300.py
5+
uv run pytest -s tests/test_si220.py
6+
uv run pytest -s tests/test_si500.py
7+
uv run pytest -s tests/test_sin300.py
88

99
test-force:
1010
uv run pytest -s tests/test_si220.py --force-regen
1111
uv run pytest -s tests/test_si500.py --force-regen
1212
uv run pytest -s tests/test_sin300.py --force-regen
1313

1414
test-fail-fast:
15-
pytest -s tests/test_si220.py -x
16-
pytest -s tests/test_si500.py -x
17-
pytest -s tests/test_sin300.py -x
15+
uv run pytest -s tests/test_si220.py -x
16+
uv run pytest -s tests/test_si500.py -x
17+
uv run pytest -s tests/test_sin300.py -x
1818

1919
update-pre:
2020
pre-commit autoupdate --bleeding-edge
@@ -34,9 +34,9 @@ notebooks:
3434
jupytext docs/**/*.py --to ipynb
3535

3636
docs:
37-
python .github/write_cells_si220.py
38-
python .github/write_cells_si500.py
39-
python .github/write_cells_sin300.py
40-
jb build docs
37+
uv run python .github/write_cells_si220.py
38+
uv run python .github/write_cells_si500.py
39+
uv run python .github/write_cells_sin300.py
40+
uv run jb build docs
4141

4242
.PHONY: drc doc docs

0 commit comments

Comments
 (0)