Skip to content

Commit

Permalink
Merge pull request #88 from gdsfactory/use_uv
Browse files Browse the repository at this point in the history
use uv
  • Loading branch information
joamatab authored Dec 25, 2024
2 parents a59ecfe + 9cf21ce commit 5b9b482
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 27 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,15 @@ jobs:
build-docs:
runs-on: ubuntu-latest
name: Sphinx docs to gh-pages
container: ghcr.io/gdsfactory/gdsfactory:main
steps:
- uses: actions/checkout@v4
- name: Installing the library
shell: bash -l {0}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Install dependencies
run: |
make install
- name: make docs
Expand Down
22 changes: 9 additions & 13 deletions .github/workflows/test_code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,19 @@ jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: "pip"
cache-dependency-path: pyproject.toml
- name: Test pre-commit hooks
run: |
python -m pip install --upgrade pip
pip install pre-commit
pre-commit run -a
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: pre-commit/[email protected]
test_code:
runs-on: ubuntu-latest
container: ghcr.io/gdsfactory/gdsfactory:main
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Install dependencies
run: |
make install
Expand Down
22 changes: 11 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
install:
pip install -e .[dev,docs]
uv sync --extra docs --extra dev

test:
pytest -s tests/test_si220.py
pytest -s tests/test_si500.py
pytest -s tests/test_sin300.py
uv run pytest -s tests/test_si220.py
uv run pytest -s tests/test_si500.py
uv run pytest -s tests/test_sin300.py

test-force:
uv run pytest -s tests/test_si220.py --force-regen
uv run pytest -s tests/test_si500.py --force-regen
uv run pytest -s tests/test_sin300.py --force-regen

test-fail-fast:
pytest -s tests/test_si220.py -x
pytest -s tests/test_si500.py -x
pytest -s tests/test_sin300.py -x
uv run pytest -s tests/test_si220.py -x
uv run pytest -s tests/test_si500.py -x
uv run pytest -s tests/test_sin300.py -x

update-pre:
pre-commit autoupdate --bleeding-edge
Expand All @@ -34,9 +34,9 @@ notebooks:
jupytext docs/**/*.py --to ipynb

docs:
python .github/write_cells_si220.py
python .github/write_cells_si500.py
python .github/write_cells_sin300.py
jb build docs
uv run python .github/write_cells_si220.py
uv run python .github/write_cells_si500.py
uv run python .github/write_cells_sin300.py
uv run jb build docs

.PHONY: drc doc docs

0 comments on commit 5b9b482

Please sign in to comment.