Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Email in setup #82

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions pyowc/plot/plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
"""
import os
import copy
import warnings

import numpy as np
from matplotlib.path import Path
from matplotlib.patches import PathPatch
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pyowc/tests/core_finders_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 0 additions & 2 deletions pyowc/tests/plot_dashboard_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
10 changes: 0 additions & 10 deletions pyowc/tests/plot_plots_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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

Expand All @@ -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'] +
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down