Skip to content

Commit 2e3a097

Browse files
authored
chore: remove numpy dependency (#3483)
1 parent 28086cf commit 2e3a097

File tree

9 files changed

+386
-260
lines changed

9 files changed

+386
-260
lines changed

poetry.lock

Lines changed: 52 additions & 91 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ importlib-resources = ">=5.12.0,<5.13.0"
7575
inject = "<4.4.0,>=4.3.0"
7676
jinja2 = { version = ">=2.11.3,<3.1.3" }
7777
networkx = ">=2.6.0,<3.2"
78-
numpy = ">=1.24.0,<1.25.0"
7978
packaging = "<24.0,>=23.0"
8079
pathspec = "<1.0.0,>=0.8.0"
8180
patool = "==1.12"
@@ -246,11 +245,11 @@ pattern = """(?x) (?# ignore whitespace
246245
"""
247246

248247
[tool.pytest.ini_options]
249-
addopts = "--flake8 --black --doctest-glob=\"*.rst\" --doctest-modules --cov --cov-report=term-missing --ignore=docs/cheatsheet/"
248+
addopts = "--doctest-glob=\"*.rst\" --doctest-modules --cov --cov-report=term-missing --ignore=docs/cheatsheet/"
250249
doctest_optionflags = "ALLOW_UNICODE"
251250
flake8-ignore = ["*.py", "E121", "E126", "E203", "E226", "E231", "W503", "W504", "docs/conf.py", "docs/cheatsheet/conf.py", "ALL"]
252251
flake8-max-line-length = 120
253-
testpaths = ["docs", "tests", "renku", "conftest.py"]
252+
testpaths = ["docs", "tests", "conftest.py"]
254253
markers = [
255254
"integration: mark a test as a integration.",
256255
"jobs: mark a test as a job test.",

renku/command/view_model/activity_graph.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,8 +339,14 @@ def text_representation(
339339
max_y = max(max_y, local_max_y)
340340

341341
xy = node.view.xy
342+
split = node.data[0].splitlines()
343+
max_height = len(split)
344+
max_width = max(len(line) for line in split)
342345
node_shape = NodeShape(
343-
node.data[0], Point(xy[0], xy[1] + min_y), double_border=node.data[1], color=node_color
346+
node.data[0],
347+
Point(round(xy[0] - max_width / 2), round(xy[1] + min_y - max_height)),
348+
double_border=node.data[1],
349+
color=node_color,
344350
)
345351
canvas.add_shape(node_shape, layer=1)
346352
max_y = max(max_y, node_shape.extent[0][1])

0 commit comments

Comments
 (0)