Skip to content

Commit

Permalink
Merge pull request #2165 from fractal-analytics-platform/poetry-v2
Browse files Browse the repository at this point in the history
Switch to poetry v2
  • Loading branch information
tcompa authored Jan 7, 2025
2 parents 815944d + e1dde16 commit 6c1b55b
Show file tree
Hide file tree
Showing 15 changed files with 206 additions and 77 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/benchmarks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
sudo --login -u postgres createdb fractal_test
- name: Install poetry
run: pipx install poetry==1.8.2
run: pipx install poetry==2.0.0

- name: Set up Python 3.10
uses: actions/setup-python@v5
Expand All @@ -32,7 +32,7 @@ jobs:
cache: "poetry"

- name: Install dependencies
run: poetry install --with dev --without docs --no-interaction
run: poetry install --with dev --no-interaction

- name: Run Fractal with Gunicorn
run: |
Expand Down Expand Up @@ -95,7 +95,7 @@ jobs:
sudo --login -u postgres createdb fractal_test
- name: Install poetry
run: pipx install poetry==1.8.2
run: pipx install poetry==2.0.0

- name: Set up Python 3.10
uses: actions/setup-python@v5
Expand All @@ -104,7 +104,7 @@ jobs:
cache: "poetry"

- name: Install dependencies
run: poetry install --with dev --without docs --no-interaction
run: poetry install --with dev --no-interaction

- name: Benchmark
run: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
run: docker pull ghcr.io/fractal-analytics-platform/ubuntu22-slurm-multipy:0.1 && mkdir -p ci/cache/docker/slurm-multipy && docker image save ghcr.io/fractal-analytics-platform/ubuntu22-slurm-multipy:0.1 --output ./ci/cache/docker/slurm-multipy/slurm-multipy.tar

- name: Install poetry
run: pipx install poetry==1.8.2
run: pipx install poetry==2.0.0

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
Expand All @@ -52,7 +52,7 @@ jobs:

- name: Install dependencies
run: |
poetry install --with dev --without docs --no-interaction
poetry install --with dev --no-interaction
- name: Test with pytest
env:
Expand Down Expand Up @@ -100,7 +100,7 @@ jobs:
run: docker pull ghcr.io/fractal-analytics-platform/ubuntu22-slurm-multipy:0.1 && mkdir -p ci/cache/docker/slurm-multipy && docker image save ghcr.io/fractal-analytics-platform/ubuntu22-slurm-multipy:0.1 --output ./ci/cache/docker/slurm-multipy/slurm-multipy.tar

- name: Install poetry
run: pipx install poetry==1.8.2
run: pipx install poetry==2.0.0

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
Expand All @@ -110,7 +110,7 @@ jobs:

- name: Install dependencies
run: |
poetry install --with dev --without docs --no-interaction
poetry install --with dev --no-interaction
- name: Test with pytest
env:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/migrations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
run: psql -U postgres -h localhost -d fractal_test -f ${ROOTDIR}/clean_db_fractal_${SOURCE_VERSION}.sql

- name: Install poetry
run: pipx install poetry==1.8.2
run: pipx install poetry==2.0.0

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
Expand All @@ -58,7 +58,7 @@ jobs:

- name: Install fractal-server
run: |
poetry install --without dev --without docs --no-interaction
poetry install --no-interaction
poetry add setuptools # required for py3.12
- name: Apply migration and fix-db script (postgres)
Expand All @@ -85,7 +85,7 @@ jobs:
sudo --login -u postgres createdb fractal_test
- name: Install poetry
run: pipx install poetry==1.8.2
run: pipx install poetry==2.0.0

- name: Set up Python 3.11
uses: actions/setup-python@v5
Expand All @@ -95,7 +95,7 @@ jobs:

- name: Install fractal-server
run: |
poetry install --without dev --without docs --no-interaction
poetry install --no-interaction
- name: Apply upgrade and downgrade
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pip_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- run: pip install -e .[gunicorn]
- run: pip install -e .
4 changes: 2 additions & 2 deletions .github/workflows/poetry_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ jobs:
with:
python-version: "3.10"

- name: "Install poetry 1.8.2"
run: curl -sSL https://install.python-poetry.org | python3 - --version 1.8.2
- name: "Install poetry"
run: curl -sSL https://install.python-poetry.org | python3 - --version 2.0.0

- name: Build package
run: poetry build
2 changes: 1 addition & 1 deletion .github/workflows/poetry_update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Install poetry
run: pipx install poetry==1.8.2
run: pipx install poetry==2.0.0
- uses: actions/setup-python@v3
with:
python-version: "3.10"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ jobs:
with:
python-version: "3.10"

- name: "Install poetry 1.8.2"
run: curl -sSL https://install.python-poetry.org | python3 - --version 1.8.2
- name: "Install poetry"
run: curl -sSL https://install.python-poetry.org | python3 - --version 2.0.0

- name: Build package
run: poetry build
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,8 @@ tests/data/ssh_config.json
*.egg-info

.DS_Store
Temporary_folder_for_regression_test/
monitoring.db
jobs/wf*
runinfo
mypy-scan
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
**Note**: Numbers like (\#1234) point to closed Pull Requests on the fractal-server repository.

# 2.10.4

* Switch to poetry v2 (\#2165).
* Require Python <3.13 (\#2165).

# 2.10.3

Note: this version fixes a bug introduced in version 2.10.1.
Expand Down
4 changes: 2 additions & 2 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ To contribute code, please fork the repository and submit a pull request.

Fractal uses [poetry](https://python-poetry.org/docs) to manage the development
environment and dependencies, and to streamline the build and release
operations; at least version 1.3 is recommended.
operations; at least version 2.0.0 is recommended.

A simple way to install `poetry` is
```console
pipx install poetry==1.8.2`
pipx install poetry==2.0.0`
```
while other options are described
[here](https://python-poetry.org/docs#installing-with-the-official-installer).
Expand Down
4 changes: 0 additions & 4 deletions fractal_server/.gitignore

This file was deleted.

2 changes: 0 additions & 2 deletions fractal_server/app/runner/.gitignore

This file was deleted.

1 change: 0 additions & 1 deletion fractal_server/migrations/README

This file was deleted.

Loading

0 comments on commit 6c1b55b

Please sign in to comment.