Skip to content

Commit

Permalink
chore: support Python 3.12
Browse files Browse the repository at this point in the history
Signed-off-by: SdgJlbl <sarah.diot-girard@owkin.com>
  • Loading branch information
SdgJlbl committed Jun 28, 2024
1 parent dd01b9b commit f0a8f0f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Set up python
uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.12"
- name: Install tools
run: pip install flake8 black isort wheel docstring-parser
- name: Lint
Expand Down Expand Up @@ -45,7 +45,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
name: Tests on Python ${{ matrix.python-version }}
steps:
- name: Set up python
Expand Down
1 change: 1 addition & 0 deletions changes/418.added
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Python 3.12 support
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ classifiers = [
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
license = { file = "LICENSE" }
authors = [{ name = "Owkin, Inc." }]
Expand Down
4 changes: 2 additions & 2 deletions substra/sdk/backends/local/compute/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,15 +150,15 @@ def _prepare_artifact_input(self, task_input, task_key, input_volume, multiple):
assert output.kind == schemas.AssetKind.model, "The task_input value must be an artifact, not a performance"
filename = _generate_filename()
path_to_input = input_volume / filename
Path(output.asset.address.storage_address).link_to(path_to_input)
Path(output.asset.address.storage_address).hardlink_to(path_to_input)

return TaskResource(id=task_input.identifier, value=f"{TPL_VOLUME_INPUTS}/{filename}", multiple=multiple)

def _prepare_dataset_input(
self, dataset: models.Dataset, task_input: models.InputRef, input_volume: str, multiple: bool
):
path_to_opener = input_volume / Filenames.OPENER.value
Path(dataset.opener.storage_address).link_to(path_to_opener)
Path(dataset.opener.storage_address).hardlink_to(path_to_opener)
return TaskResource(
id=task_input.identifier,
value=f"{TPL_VOLUME_INPUTS}/{Filenames.OPENER.value}",
Expand Down

0 comments on commit f0a8f0f

Please sign in to comment.