Skip to content

Commit 3c22eb7

Browse files
authored
Merge pull request #19 from nova-model/17-update-readme
Switch to Pixi
2 parents 0c7bd26 + 2d1c462 commit 3c22eb7

File tree

24 files changed

+2137
-3401
lines changed

24 files changed

+2137
-3401
lines changed

.github/workflows/test.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ jobs:
2323
file: Dockerfile
2424
load: true
2525
- name: Run ruff check
26-
run: docker run --rm ${{ steps.build.outputs.imageid }} poetry run ruff check
26+
run: docker run --rm ${{ steps.build.outputs.imageid }} ruff check
2727
- name: Run format check
28-
run: docker run --rm ${{ steps.build.outputs.imageid }} poetry run ruff format --check
28+
run: docker run --rm ${{ steps.build.outputs.imageid }} ruff format --check
2929
- name: Run mypy
30-
run: docker run --rm ${{ steps.build.outputs.imageid }} poetry run mypy .
30+
run: docker run --rm ${{ steps.build.outputs.imageid }} mypy .
3131
- name: Run tests
32-
run: docker run --rm -e GALAXY_URL=${{ env.GALAXY_URL }} -e GALAXY_API_KEY=${{ env.GALAXY_API_KEY }} ${{ steps.build.outputs.imageid }} poetry run pytest test_examples.py
32+
run: docker run --rm -e GALAXY_URL=${{ env.GALAXY_URL }} -e GALAXY_API_KEY=${{ env.GALAXY_API_KEY }} ${{ steps.build.outputs.imageid }} pytest test_examples.py

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ repos:
2020
hooks:
2121
- id: mypy
2222
name: mypy
23-
entry: poetry run mypy .
23+
entry: pixi run mypy .
2424
language: system
2525
types: [python]
2626
verbose: true

Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@ RUN apt update && apt install -y \
77
libx11-dev \
88
libxrender1
99

10-
ENV POETRY_HOME=/poetry
11-
ENV PATH=/poetry/bin:$PATH
12-
RUN curl -sSL https://install.python-poetry.org | python3 -
10+
RUN curl -fsSL https://pixi.sh/install.sh | sh
11+
ENV PATH="/root/.pixi/bin:${PATH}"
1312

1413
RUN mkdir -p /opt/run/examples
1514
COPY examples/ /opt/run/examples/
1615
COPY tests/ /opt/run/
1716
COPY pyproject.toml /opt/run/pyproject.toml
18-
COPY poetry.lock /opt/run/poetry.lock
1917

2018
WORKDIR /opt/run
21-
RUN poetry install
19+
RUN pixi install
20+
SHELL [ "pixi", "run" ]
21+
ENTRYPOINT [ "pixi", "run" ]
2222

2323
CMD []

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,19 @@ We also provide examples that take advantage of ORNL resources:
2727

2828
## Running Examples
2929

30-
If you want to run the examples, then you will need to install [Poetry](https://python-poetry.org/). Once done, run the following to run an example.
30+
If you want to run the examples, then you will need to install [Pixi](https://pixi.sh/latest/). Once done, run the following to run an example.
3131

3232
```bash
33-
poetry install
34-
poetry run python examples/{example_folder}/main.py
33+
pixi install
34+
pixi run python -m examples.{example_folder}
3535
```
3636

3737
## Running Tests
3838

3939
This repo includes an automated test to ensure that each example runs:
4040

4141
```bash
42-
poetry install
43-
poetry run pytest
42+
pixi run pytest
4443
```
4544

4645
You can set the environment variable `INCLUDE_ORNL_TESTS=1` if you want to test the examples that rely on specific ORNL resources. Note that you will need to run them from a location that has access to these resources.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
"""Entrypoint."""
2+
3+
from .main import main
4+
5+
main()
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
"""Entrypoint."""
2+
3+
from .main import main
4+
5+
main()
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
"""Entrypoint."""
2+
3+
from .main import main
4+
5+
main()

examples/data_selector/__main__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
"""Entrypoint."""
2+
3+
from .main import main
4+
5+
main()

examples/dialog/__main__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
"""Entrypoint."""
2+
3+
from .main import main
4+
5+
main()
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
"""Entrypoint."""
2+
3+
from .main import main
4+
5+
main()

0 commit comments

Comments
 (0)