diff --git a/pyowc/plot/plots.py b/pyowc/plot/plots.py index 7f9d62b..172447a 100644 --- a/pyowc/plot/plots.py +++ b/pyowc/plot/plots.py @@ -2,6 +2,8 @@ """ import os import copy +import warnings + import numpy as np from matplotlib.path import Path from matplotlib.patches import PathPatch @@ -137,8 +139,9 @@ def trajectory_plot(bath, reef, floats, climatology, float_name, config): plt.legend(loc=4, prop={'size': 6}) save_format = config['FLOAT_PLOTS_FORMAT'] - plot_loc = os.path.sep.join([config['FLOAT_PLOTS_DIRECTORY'], float_name]) - plt.savefig(plot_loc + "_trajectory." + save_format, format=save_format) + file_name = float_name + "_trajectory." + save_format + plot_loc = os.path.sep.join([config['FLOAT_PLOTS_DIRECTORY'], file_name]) + plt.savefig(plot_loc, format=save_format) # pylint: disable=too-many-arguments diff --git a/pyowc/tests/core_finders_test.py b/pyowc/tests/core_finders_test.py index 5aff940..a55c62a 100644 --- a/pyowc/tests/core_finders_test.py +++ b/pyowc/tests/core_finders_test.py @@ -33,7 +33,7 @@ def setUp(self): self.la_ptmp = mapped_values['la_ptmp'] - # matlab answers (for file 3901960) + # matlab answers (for file 3901960) A validity date ? self.tlevels = np.array([1.93961369305644, 1.94046894952240, diff --git a/pyowc/tests/plot_dashboard_test.py b/pyowc/tests/plot_dashboard_test.py index 15e9c29..b93b2eb 100644 --- a/pyowc/tests/plot_dashboard_test.py +++ b/pyowc/tests/plot_dashboard_test.py @@ -19,6 +19,4 @@ def test_dashboard(self, mockshow): float_dir = "/" float_name = TESTS_CONFIG['TEST_FLOAT_SOURCE'] config = TESTS_CONFIG - config['FLOAT_PLOTS_DIRECTORY'] = "data/test_data/float_plots/" - config['FLOAT_PLOTS_FORMAT'] = "eps" self.assertEqual(dashboard(float_dir, float_name, config, levels=2), None) diff --git a/pyowc/tests/plot_plots_test.py b/pyowc/tests/plot_plots_test.py index 1440a8b..8e0bf13 100644 --- a/pyowc/tests/plot_plots_test.py +++ b/pyowc/tests/plot_plots_test.py @@ -49,8 +49,6 @@ def test_plot_runs(self, mockshow): profile_no = float_data['PROFILE_NO'] config = TESTS_CONFIG - config['FLOAT_PLOTS_DIRECTORY'] = "data/test_data/float_plots/" - config['FLOAT_PLOTS_FORMAT'] = "eps" self.assertEqual(plots.cal_sal_curve_plot(sal, cal_sal, cal_sal_err, sta_sal, sta_sal_err, sta_mean, pcond_factor, @@ -115,8 +113,6 @@ def test_plot_runs(self, mockshow): profile_no = float_data['PROFILE_NO'] config = TESTS_CONFIG - config['FLOAT_PLOTS_DIRECTORY'] = "data/test_data/float_plots/" - config['FLOAT_PLOTS_FORMAT'] = "eps" # Check various types run @@ -200,8 +196,6 @@ def test_plot_runs(self, mockshow): plevels = thetas[1] config = TESTS_CONFIG - config['FLOAT_PLOTS_DIRECTORY'] = "data/test_data/float_plots/" - config['FLOAT_PLOTS_FORMAT'] = "eps" self.assertEqual(plots.t_s_profile_plot(sal, ptmp, pres, sal_var, theta_levels, tlevels, plevels, @@ -257,8 +251,6 @@ def test_plot_runs(self, mockshow): index = thetas[2] config = TESTS_CONFIG - config['FLOAT_PLOTS_DIRECTORY'] = "data/test_data/float_plots/" - config['FLOAT_PLOTS_FORMAT'] = "eps" # Check various types run @@ -282,8 +274,6 @@ def test_plot_runs(self): print("Test that trajectory plot throws no errors") config = TESTS_CONFIG - config['FLOAT_PLOTS_DIRECTORY'] = "data/test_data/float_plots/" - config['FLOAT_PLOTS_FORMAT'] = "eps" float_data_path = os.path.sep.join([TESTS_CONFIG['FLOAT_SOURCE_DIRECTORY'], TESTS_CONFIG['TEST_FLOAT_SOURCE'] + diff --git a/setup.py b/setup.py index 52054e6..3c5c7d6 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ name='pyowc', version='0.1.1', author="pyowc Developers", - author_email="edsmall@bodc.ac.uk", + author_email="argo@bodc.ac.uk", description="OWC salinity calibration in Python", long_description=long_description, long_description_content_type="text/markdown",