Skip to content

Commit

Permalink
Merge pull request #770 from fractal-analytics-platform/769-switch-to…
Browse files Browse the repository at this point in the history
…-poetry-v2

Switch to poetry v2
  • Loading branch information
tcompa authored Jan 7, 2025
2 parents 908b3a2 + 8122b04 commit fff2ade
Showing 8 changed files with 169 additions and 48 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -27,7 +27,7 @@ jobs:
- uses: actions/checkout@v4

- 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
@@ -36,7 +36,7 @@ jobs:
cache: "poetry"

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

- name: Test with pytest
env:
4 changes: 2 additions & 2 deletions .github/workflows/poetry_build.yml
Original file line number Diff line number Diff line change
@@ -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
@@ -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"
4 changes: 2 additions & 2 deletions .github/workflows/publish_pypi.yml
Original file line number Diff line number Diff line change
@@ -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
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
**Note**: Numbers like (\#123) point to closed Pull Requests on the fractal repository.

# Unreleased
# 2.6.1

* Move to `poetry` v2 (\#770).
* Require `Python<3.13` (\#770).
* Use default Postgres service in GitHub CI (\#761).

# 2.6.0
8 changes: 3 additions & 5 deletions docs/development.md
Original file line number Diff line number Diff line change
@@ -3,8 +3,7 @@
The development of Fractal Client takes place on the [fractal-client Github
repository](https://github.com/fractal-analytics-platform/fractal-client). To
ask questions or to inform us of a bug or unexpected behavior, please feel free
to [open an
issue](https://github.com/fractal-analytics-platform/fractal-client/issues/new).
to [open an issue](https://github.com/fractal-analytics-platform/fractal-client/issues/new).


## Set up the development environment
@@ -14,14 +13,13 @@ issue](https://github.com/fractal-analytics-platform/fractal-client/issues/new).
First, you should clone the repository
```
git clone https://github.com/fractal-analytics-platform/fractal-client.git
cd fractal
cd fractal-client
```

### Install package

We use [poetry](https://python-poetry.org/docs) to manage the development environment and the dependencies. A simple way to install it is `pipx install poetry==1.8.2`, or you can look at the installation section [here](https://python-poetry.org/docs#installation).
We use [poetry](https://python-poetry.org/docs) to manage the development environment and the dependencies. A simple way to install it is `pipx install poetry==2.0.0`, or you can look at the installation section [here](https://python-poetry.org/docs#installation).
Running

```console
poetry install [--with dev] [--with docs]
```
127 changes: 120 additions & 7 deletions poetry.lock

Large diffs are not rendered by default.

64 changes: 36 additions & 28 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,39 +1,56 @@
[tool.poetry]
[project]
name = "fractal-client"
version = "2.6.0"
description = "Client component of the Fractal analytics platform"
description = "Command-line client of the Fractal analytics platform"
authors = [
"Tommaso Comparin <tommaso.comparin@exact-lab.it>",
"Marco Franzon <marco.franzon@exact-lab.it>",
"Jacopo Nespolo <jacopo.nespolo@exact-lab.it>",
{ name="Tommaso Comparin", email="tommaso.comparin@exact-lab.it" },
{ name="Marco Franzon", email="marco.franzon@exact-lab.it" },
{ name="Yuri Chiucconi", email="yuri.chiucconi@exact-lab.it" },
{ name="Jacopo Nespolo", email="jacopo.nespolo@exact-lab.it" },
]
readme = "README.md"
license = { text = "BSD-3-Clause" }

packages = [
{include="fractal_client"}
]
exclude = [
"fractal_client/.gitignore",
]

requires-python = ">=3.10,<3.13"
dependencies = [
"python-dotenv >=1.0.0,<1.1.0",
"httpx >= 0.27.0, <0.28.0",
"PyJWT >= 2.8.0,<3.0.0",
"packaging >= 23.1.0, <24.0.0",

]

[project.scripts]
fractal = "fractal_client.client:main"

[project.urls]
homepage = "https://github.com/fractal-analytics-platform/fractal-client"
repository = "https://github.com/fractal-analytics-platform/fractal-client"
documentation = "https://fractal-analytics-platform.github.io/fractal-client"
license = "BSD-3-Clause"
exclude = [
"fractal_client/.gitignore",
]
changelog = "https://github.com/fractal-analytics-platform/fractal-client/blob/main/CHANGELOG.md"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

[tool.poetry.urls]
"Changelog" = "https://github.com/fractal-analytics-platform/fractal-client/blob/main/CHANGELOG.md"
[tool.poetry]
requires-poetry = ">=2.0"

[tool.poetry.dependencies]
python = "^3.10"
python-dotenv = "^1.0.0"
httpx = "^0.27.0"
PyJWT = "^2.8.0"
packaging = "^23.1"
pytest-randomly = "^3.15.0"
[tool.poetry.group.dev]
optional = true

[tool.poetry.group.dev.dependencies]
devtools = "^0.12.0"
pre-commit = ">=3.0.0,<4.0.0"
pytest = "^7.1.2"
pytest-randomly = "^3.15.0"
bumpver = "^2022.1118"
coverage = {extras = ["toml"], version = "^6.5.0"}
fractal-server = { git = "https://github.com/fractal-analytics-platform/fractal-server.git", branch = "main" }
@@ -50,11 +67,6 @@ mkdocs-section-index = "0.3.5"
mkdocstrings = { extras = ["python"], version = "0.25.2" }
mkdocs-include-markdown-plugin = { version = "4.0.4", python = "^3.8,<3.12" }


[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

[tool.bumpver]
current_version = "2.6.0"
version_pattern = "MAJOR.MINOR.PATCH[PYTAGNUM]"
@@ -71,16 +83,12 @@ push = true
'__VERSION__ = "{version}"$'
]

[tool.poetry.scripts]
fractal = "fractal_client.client:main"

[tool.coverage.run]
branch = true
parallel = true
relative_files = true
omit = ["tests/*"]


[[tool.mypy.overrides]]
[tool.mypy.overrides]
module = ["devtools", "uvicorn", "pytest", "httpx", "fractal_server"]
ignore_missing_imports = true

0 comments on commit fff2ade

Please sign in to comment.