Skip to content

Commit 2021b9e

Browse files
committed
Remove Poetry
1 parent c77d89a commit 2021b9e

15 files changed

Lines changed: 1658 additions & 2304 deletions

File tree

.github/workflows/build-test.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,16 @@ jobs:
3636
with:
3737
file: dockerfiles/Dockerfile
3838
load: true
39+
target: source
3940
- name: Run ruff check
40-
run: docker run --rm ${{ steps.build.outputs.imageid }} poetry run ruff check
41+
run: docker run --rm ${{ steps.build.outputs.imageid }} ruff check
4142
- name: Run format check
42-
run: docker run --rm ${{ steps.build.outputs.imageid }} poetry run ruff format --check
43+
run: docker run --rm ${{ steps.build.outputs.imageid }} ruff format --check
4344
- name: Run mypy
44-
run: docker run --rm ${{ steps.build.outputs.imageid }} poetry run mypy .
45+
run: docker run --rm ${{ steps.build.outputs.imageid }} mypy .
4546
- name: Unit tests
46-
run: docker run -e NOVA_GALAXY_TEST_GALAXY_KEY=${{ env.GALAXY_KEY }} -e NOVA_GALAXY_TEST_GALAXY_URL=${{ env.GALAXY_URL }} --rm ${{ steps.build.outputs.imageid }} poetry run pytest
47+
run: docker run -e NOVA_GALAXY_TEST_GALAXY_KEY=${{ env.GALAXY_KEY }} -e NOVA_GALAXY_TEST_GALAXY_URL=${{ env.GALAXY_URL }} --rm ${{ steps.build.outputs.imageid }} pytest
4748
- name: Run coverage
48-
run: docker run -e NOVA_GALAXY_TEST_GALAXY_KEY=${{ env.GALAXY_KEY }} -e NOVA_GALAXY_TEST_GALAXY_URL=${{ env.GALAXY_URL }} --rm ${{ steps.build.outputs.imageid }} sh -c "poetry run coverage run && poetry run coverage report"
49+
run: docker run -e NOVA_GALAXY_TEST_GALAXY_KEY=${{ env.GALAXY_KEY }} -e NOVA_GALAXY_TEST_GALAXY_URL=${{ env.GALAXY_URL }} --rm ${{ steps.build.outputs.imageid }} sh -c "coverage run && coverage report"
4950
- name: Docs test
5051
run: docker run --rm ${{ steps.build.outputs.imageid }} bash build_docs.sh

.github/workflows/nova-galaxy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,4 @@ jobs:
5858
file: dockerfiles/Dockerfile
5959
load: true
6060
- name: Publish
61-
run: docker run --rm ${{ steps.build.outputs.imageid }} poetry publish -u __token__ -p ${PYPI_API_TOKEN}
61+
run: docker run --rm ${{ steps.build.outputs.imageid }} sh -c "hatch build && hatch publish -u __token__ -a ${PYPI_API_TOKEN}"

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,3 +164,5 @@ cython_debug/
164164

165165

166166
junit.xml
167+
168+
.pixi

.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

.readthedocs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ build:
1111
python: "3.13"
1212
jobs:
1313
post_create_environment:
14-
- pip install altair sphinx-rtd-theme==3.0.0rc3
14+
- pip install altair sphinx-rtd-theme==3.0.0rc3 tomli
1515
- pip install .
1616

1717
# Build documentation in the "docs/" directory with Sphinx

README.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,37 +16,36 @@ You can install this package directly with
1616
pip install nova-galaxy
1717
```
1818

19-
or with Poetry by placing the following in your pyproject.toml file (you can version lock with typical Semantic Versioning syntax)
19+
or with [Pixi](https://pixi.sh/latest/):
2020

2121

22-
```
23-
[tool.poetry.dependencies]
24-
nova-galaxy = "*"
22+
```commandline
23+
pixi add --pypi nova-galaxy
2524
```
2625

2726
## Formatting
2827
```commandline
29-
poetry run ruff format
28+
pixi run ruff format
3029
```
3130

3231
## Linting
3332
```commandline
34-
poetry run ruff check
35-
poetry run mypy .
33+
pixi run ruff check
34+
pixi run mypy .
3635
```
3736

3837
## Testing
3938
You can run the tests for this package with the following command from the base directory:
4039
```commandline
41-
NOVA_GALAXY_TEST_GALAXY_URL=galaxy-url NOVA_GALAXY_TEST_GALAXY_KEY=key poetry run pytest tests/
40+
NOVA_GALAXY_TEST_GALAXY_URL=galaxy-url NOVA_GALAXY_TEST_GALAXY_KEY=key pixi run pytest tests/
4241
```
4342
with `NOVA_GALAXY_TEST_GALAXY_URL` being the url of your Galaxy instance and `NOVA_GALAXY_TEST_GALAXY_KEY` being your
4443
Galaxy API Key.
4544

4645
To run tests with coverage (include the above environment variables):
4746
```commandline
48-
poetry run coverage run
49-
poetry run coverage report
47+
pixi run coverage run
48+
pixi run coverage report
5049
```
5150

5251
## CI/CD in GitHub

build_docs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
poetry run sphinx-build -M html docs docs/_build
1+
sphinx-build -M html docs docs/_build

dockerfiles/Dockerfile

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,27 @@
11
FROM --platform=amd64 python:3.10-slim AS source
22

3-
# make sure image can run as non-root user
4-
ENV POETRY_CACHE_DIR=/poetry/.cache
5-
ENV POETRY_CONFIG_DIR=/poetry/.config
6-
ENV POETRY_HOME=/poetry
3+
RUN apt update && apt install -y curl wget
74

8-
RUN pip install poetry
95
COPY . /src
106
WORKDIR /src
117

12-
RUN poetry install
13-
RUN poetry build --format=wheel
8+
RUN curl -fsSL https://pixi.sh/install.sh | sh
9+
ENV PATH="/root/.pixi/bin:${PATH}"
10+
RUN pixi install
11+
SHELL [ "pixi", "run" ]
12+
ENTRYPOINT [ "pixi", "run" ]
1413

15-
RUN chmod og+rwX -R /poetry
16-
RUN chmod og+rwX -R /src
14+
RUN chmod og+rwX -R /src /.cache
15+
16+
FROM --platform=amd64 python:3.10-slim AS package
17+
18+
RUN apt update && apt install -y curl
19+
20+
COPY . /src
21+
WORKDIR /src
22+
23+
RUN curl -fsSL https://pixi.sh/install.sh | sh
24+
ENV PATH="/root/.pixi/bin:${PATH}"
25+
RUN pixi install -e production
26+
SHELL [ "pixi", "run" ]
27+
ENTRYPOINT [ "pixi", "run" ]

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
author = "Andrew Ayres"
88
with open("../pyproject.toml", "rb") as toml_file:
99
toml_dict = tomli.load(toml_file)
10-
release = toml_dict["tool"]["poetry"]["version"]
10+
release = toml_dict["project"]["version"]
1111

1212
extensions = ["sphinx.ext.autodoc", "sphinx.ext.napoleon", "sphinx.ext.viewcode", "sphinx_rtd_theme"]
1313

docs/core_concepts/parameters.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,4 @@ Use `add_step_param` to set parameters for specific steps within the workflow. T
6262
list_of_datasets = [Dataset(id="ds1"), Dataset(id="ds2")]
6363
workflow_params.add_step_param("4", "multiple_inputs", list_of_datasets)
6464
65-
When running a workflow, you pass an instance of `WorkflowParameters` to the `Workflow.run()` method.
65+
When running a workflow, you pass an instance of `WorkflowParameters` to the `Workflow.run()` method.

0 commit comments

Comments
 (0)