Skip to content

Commit e88ffee

Browse files
authored
Merge pull request #326 from vmarkovtsev/master
Limit the file name length
2 parents 5263b0a + 68491f6 commit e88ffee

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
dist: xenial
1+
dist: bionic
22
sudo: required
33

44
git:

python/labours/plotting.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import os
2+
from pathlib import Path
23

34

45
def import_pyplot(backend, style):
@@ -57,6 +58,10 @@ def deploy_plot(title: str, output: str, background: str, tight: bool = True) ->
5758
pyplot.gcf().canvas.set_window_title(title)
5859
pyplot.show()
5960
else:
61+
po = Path(output)
62+
if len(po.name) > 64:
63+
suffix = po.suffix[:5]
64+
output = str(po.with_name(po.stem[:64 - len(suffix)] + suffix))
6065
if title:
6166
pyplot.title(title, color="black" if background == "white" else "white")
6267
if tight:

python/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
description="Python companion for github.com/src-d/hercules to visualize the results.",
2323
long_description=long_description,
2424
long_description_content_type="text/markdown",
25-
version="10.5.2",
25+
version="10.5.3",
2626
license="Apache-2.0",
2727
author="source{d}",
2828
author_email="machine-learning@sourced.tech",

0 commit comments

Comments
 (0)