Skip to content

Commit 5313853

Browse files
committed
Require Ruff 0.16 and apply formatting
1 parent 20e1741 commit 5313853

17 files changed

Lines changed: 32 additions & 24 deletions

.github/workflows/ResInsightWithCache.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- name: Install Python dependencies
2727
run: |
2828
python -m pip install --upgrade pip
29-
pip install rips pytest pytest-cov ruff taskmaestro==0.1.0
29+
pip install rips pytest pytest-cov "ruff>=0.16" taskmaestro==0.1.0
3030
3131
- name: Ruff check
3232
run: ruff check .

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ cd ~/src/taskmaestro-resinsight
1111
# rips is not on PyPI; install from a local ResInsight checkout
1212
pip install -e /path/to/resinsight/GrpcInterface/Python
1313

14-
# install this repo (tasks become importable as taskmaestro_resinsight.*)
15-
pip install -e .
14+
# install this repo and its test/lint tools (including Ruff 0.16+)
15+
pip install -e ".[dev]"
1616
```
1717

1818
## Discovering tasks and workflows
@@ -28,7 +28,9 @@ from taskmaestro import (
2828
registered_workflow_names,
2929
)
3030

31-
print(sorted(name for name in registered_task_names() if name.startswith("resinsight.")))
31+
print(
32+
sorted(name for name in registered_task_names() if name.startswith("resinsight."))
33+
)
3234
# ['resinsight.add_perforation', 'resinsight.connect', ...]
3335

3436
print(registered_workflow_names())

pyproject.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@ dependencies = [
1111
"rips",
1212
]
1313

14+
[project.optional-dependencies]
15+
dev = [
16+
"pytest>=8.0",
17+
"pytest-cov>=5.0",
18+
"ruff>=0.16",
19+
]
20+
1421
[project.entry-points."taskmaestro.tasks"]
1522
"resinsight.add_perforation" = "taskmaestro_resinsight.add_perforation:AddPerforation"
1623
"resinsight.connect" = "taskmaestro_resinsight.connect_to_resinsight:ConnectToResInsight"

taskmaestro_resinsight/add_perforation.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
from __future__ import annotations
44

55
import rips
6-
76
from taskmaestro import ExecutionContext, Task
87

98
from .models import AddPerforationInput, PerforationOutput

taskmaestro_resinsight/connect_to_resinsight.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
from __future__ import annotations
44

55
import rips
6-
76
from taskmaestro import EmptyConfig, ExecutionContext, Task
87

98
from .models import RipsInstance

taskmaestro_resinsight/export_completions.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
import rips
99
from pydantic import BaseModel, ConfigDict, Field
10-
1110
from taskmaestro import ExecutionContext, Task
1211

1312
from .models import GridCase, PerforationOutput, RipsInstance

taskmaestro_resinsight/launch_resinsight.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
import rips
66
from pydantic import BaseModel
7-
87
from taskmaestro import ExecutionContext, Task
98

109
from .models import RipsInstance

taskmaestro_resinsight/models/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
from __future__ import annotations
44

5-
import rips
65
import datetime
7-
from pydantic import BaseModel, ConfigDict, Field
86

7+
import rips
8+
from pydantic import BaseModel, ConfigDict, Field
99
from taskmaestro import ObjectModel
1010

1111

taskmaestro_resinsight/workflows.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,19 @@
3434
.add_task(
3535
AddPerforation,
3636
name="add_perf_1",
37-
depends_on={"resinsight": ConnectToResInsight, "well_path": "select_well_path_1"},
37+
depends_on={
38+
"resinsight": ConnectToResInsight,
39+
"well_path": "select_well_path_1",
40+
},
3841
config_fields=["event_date", "start_md", "end_md"],
3942
)
4043
.add_task(
4144
AddPerforation,
4245
name="add_perf_2",
43-
depends_on={"resinsight": ConnectToResInsight, "well_path": "select_well_path_2"},
46+
depends_on={
47+
"resinsight": ConnectToResInsight,
48+
"well_path": "select_well_path_2",
49+
},
4450
config_fields=["event_date", "start_md", "end_md"],
4551
)
4652
.add_task(

tests/conftest.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
import pytest
99
import rips
10-
1110
from taskmaestro import ExecutionContext
1211

1312
from taskmaestro_resinsight.models import GridCase, RipsInstance, WellPath

0 commit comments

Comments
 (0)