Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 10 additions & 20 deletions .github/workflows/python-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,41 +18,31 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- run: pipx install poetry
- name: Set up Python
uses: actions/setup-python@v5
uses: astral-sh/setup-uv@v4
with:
python-version: ${{ matrix.python-version }}
cache: "poetry"
- name: selfie-lib - poetry install
run: poetry install
working-directory: python/selfie-lib
enable-cache: true
- name: selfie-lib - pytest
run: poetry run pytest -vv
run: uv run pytest -vv
working-directory: python/selfie-lib
- name: selfie-lib - pyright
run: poetry run pyright
run: uv run pyright
working-directory: python/selfie-lib
- name: selfie-lib - ruff
run: poetry run ruff format --check && poetry run ruff check
run: uv run ruff format --check && uv run ruff check
working-directory: python/selfie-lib
- name: pytest-selfie - poetry install
run: poetry install
working-directory: python/pytest-selfie
- name: pytest-selfie - pyright
run: poetry run pyright
run: uv run pyright
working-directory: python/pytest-selfie
- name: pytest-selfie - ruff
run: poetry run ruff format --check && poetry run ruff check
run: uv run ruff format --check && uv run ruff check
working-directory: python/pytest-selfie
- name: example-pytest-selfie - poetry install
run: poetry install
working-directory: python/example-pytest-selfie
- run: poetry run pytest -vv
- run: uv run pytest -vv
working-directory: python/example-pytest-selfie
- name: example-pytest-selfie - pyright
run: poetry run pyright
run: uv run pyright
working-directory: python/example-pytest-selfie
- name: example-pytest-selfie - ruff
run: poetry run ruff format --check && poetry run ruff check
run: uv run ruff format --check && uv run ruff check
working-directory: python/example-pytest-selfie
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ __pycache__/
dist/
python/html/
python/latex/
python/selfie-lib/selfie_lib.egg-info/
python/pytest-selfie/pytest_selfie.egg-info/
node_modules/
14 changes: 7 additions & 7 deletions python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@

## Contributing

Dependencies are managed using poetry:
Dependencies are managed using uv:

- https://python-poetry.org/docs/#installing-with-the-official-installer
- then cd into `selfie-lib` and run `poetry install`
- https://docs.astral.sh/uv/getting-started/installation/
- then cd into `selfie-lib` and run `uv sync` to get the dependencies

Our CI server runs three checks in the `selfie-lib` directory.

- `poetry run pytest` - run tests
- `poetry run pyright` - type checking
- `poetry run ruff format --check && poetry run ruff check` - code lint & formatting
- `poetry run ruff format && poetry run ruff check --fix` to fix
- `uv run pytest` - run tests
- `uv run pyright` - type checking
- `uv run ruff format --check && uv run ruff check` - code lint & formatting
- `uv run ruff format && uv run ruff check --fix` to fix

The same setup is used for `pytest-selfie` and `example-pytest-selfie`.

Expand Down
6 changes: 3 additions & 3 deletions python/example-pytest-selfie/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ The purpose of this project is to demonstrate selfie for the manual.

Go to https://selfie.dev/py/facets for the tutorial.

- First run `poetry install`
- You can run the app locally with `poetry run python app.py`
- You can run the tests with `poetry run pytest`
- First run `uv sync`
- You can run the app locally with `uv run python app.py`
- You can run the tests with `uv run pytest`
Loading
Loading