From 2c2ba24a63776947e61ac1e221e0f02a5a34ce48 Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Wed, 12 Dec 2018 23:51:06 +0100 Subject: [PATCH] Refactor - pysankey beta is now a third party lib Use the beta version that we can update. And remove dependency handled by pysankey --- .isort.cfg | 2 +- requirements.txt | 5 +---- survey/exporter/tex/question2tex_sankey.py | 4 ++-- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/.isort.cfg b/.isort.cfg index 5480c4a6..ad7eada5 100644 --- a/.isort.cfg +++ b/.isort.cfg @@ -1,6 +1,6 @@ [settings] multi_line_output=3 line_length=88 -known_third_party =django,matplotlib,mock,numpy,pandas,pytz,seaborn,setuptools,yaml +known_third_party =django,mock,pandas,pysankey,pytz,setuptools,yaml project = survey include_trailing_comma=True diff --git a/requirements.txt b/requirements.txt index 90ebf832..f281b4e7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,7 +5,4 @@ django-registration==2.2 # account logic, views and workflows pytz==2017.2 ordereddict==1.1 PyYAML==3.12 -pysankey==0.0.1 -matplotlib==2.1.0rc1 -seaborn==0.8.1 -numpy==1.13.3 +pySankeyBeta==1.0.1 diff --git a/survey/exporter/tex/question2tex_sankey.py b/survey/exporter/tex/question2tex_sankey.py index 747cc032..9525772d 100755 --- a/survey/exporter/tex/question2tex_sankey.py +++ b/survey/exporter/tex/question2tex_sankey.py @@ -4,9 +4,9 @@ from django.utils.translation import ugettext_lazy as _ from pandas.core.frame import DataFrame +from pysankey import sankey from survey.exporter.tex.question2tex import Question2Tex -from pySankey.sankey import sankey from survey.models.question import Question LOGGER = logging.getLogger(__name__) @@ -78,7 +78,7 @@ def tex(self, other_question): df[other_question.text], aspect=20, fontsize=10, - figure_name=name, + figureName=name, ) return Question2TexSankey.TEX_SKELETON % ( name[4:],