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

feature 140 fix import of hovmoeller #197

Merged
merged 57 commits into from
Feb 17, 2022
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
76d5cb2
ignore pycache files
Feb 15, 2022
5f27b06
fix import of config
georgemccabe Feb 15, 2022
66b0d99
fix import of constants
georgemccabe Feb 15, 2022
376b094
added test to ensure import of subset of package works correctly. The…
georgemccabe Feb 15, 2022
35127e2
changed imports to be relative to package so that all imports will st…
georgemccabe Feb 15, 2022
016d5d0
changed scripts that will be called directly to use full paths to imp…
georgemccabe Feb 15, 2022
37385cf
removed pycache files from repo
georgemccabe Feb 15, 2022
48c7759
added missing dunder init file
georgemccabe Feb 15, 2022
e55417f
added another missing dunder init file
georgemccabe Feb 15, 2022
4f4ce2a
added another missing dunder init file
georgemccabe Feb 15, 2022
5709cb6
changed more imports
georgemccabe Feb 15, 2022
a54bd73
added another pytest for the import commands used in another METplus …
georgemccabe Feb 15, 2022
ca819fc
get correct path to config file even if pytest is run outside of the …
georgemccabe Feb 15, 2022
b7b382c
change output directory to the current directory, which corresponds t…
Feb 15, 2022
ace003d
while testing Issue #140, found input data directory setting is point…
Feb 16, 2022
c5efd2b
while testing Issue #140 fixed the imports for this test
Feb 16, 2022
1d9aaa6
Update base_plot.py
bikegeek Feb 17, 2022
00666f9
modifications based on changes to the base_plot.py code
bikegeek Feb 17, 2022
86b0c54
changes to test based on updates to base_plot.py
bikegeek Feb 17, 2022
678c7b0
updates based on changes to base_plot.py
bikegeek Feb 17, 2022
43bfcf7
updates based on changes to base_plot.py
bikegeek Feb 17, 2022
46a9401
Revert "while testing Issue #140 fixed the imports for this test"
georgemccabe Feb 17, 2022
d38f3e6
fixed relative import
georgemccabe Feb 17, 2022
72de595
issue #140 update test to reflect change to base_plot.py
bikegeek Feb 17, 2022
3695a54
issue #140 update test to reflect change to base_plot.py
bikegeek Feb 17, 2022
e15f3f8
reorganized tests based on plot type
bikegeek Feb 17, 2022
fb2e3d8
Moved to appropriate sub-directories
bikegeek Feb 17, 2022
b7c1f9c
Moved to appropriate sub-directory
bikegeek Feb 17, 2022
d40fe3e
Moved to subdirectory
bikegeek Feb 17, 2022
d01f53a
issue #140 update test to reflect change to base_plot.py and director…
bikegeek Feb 17, 2022
4b42960
issue #140 reverted to original directory structure
bikegeek Feb 17, 2022
5ad1158
#140 skip test, requires large dataset and special packages
bikegeek Feb 17, 2022
1419b47
#140 tests skipped, need updating to reflect changes to the histogram…
bikegeek Feb 17, 2022
02d0c08
only a test fixture in this file, but updated the METPLOTPY_BASE to r…
bikegeek Feb 17, 2022
7022efc
#140 updates to test to reflect changes to base_plot.py
bikegeek Feb 17, 2022
bc5084d
#140 updated test to reflect change to base_plot.py
bikegeek Feb 17, 2022
f3c7a7e
#140 update to reflect change to base_plot.py
bikegeek Feb 17, 2022
2b5e4ef
#140 skipping, these tests require different packages and large sampl…
bikegeek Feb 17, 2022
2a19a59
#140 fixed import, tests are skipped-they require special packages an…
bikegeek Feb 17, 2022
728b2e0
#140 update to reflect change in base_plot.py
bikegeek Feb 17, 2022
b65e92a
#140 modifications to order of tests and skip image testing to allow …
bikegeek Feb 17, 2022
1815231
#140 scikit image error, skipping image comparison
bikegeek Feb 17, 2022
672bcae
#140 skip image comparison- depends on which machine this test is run…
bikegeek Feb 17, 2022
56a9e48
#140 skip image comparison- depends on which machine is running this …
bikegeek Feb 17, 2022
4776b38
#140 removed unused imports
bikegeek Feb 17, 2022
4c5acb5
#140 removed unused import to sys
bikegeek Feb 17, 2022
10a68bd
#140 remove unused import of sys
bikegeek Feb 17, 2022
2b88bc6
#140 remove unused import of sys
bikegeek Feb 17, 2022
ff8d6aa
#140 remove unused import to sys
bikegeek Feb 17, 2022
e88be28
#140 remove unused sys import
bikegeek Feb 17, 2022
8e41657
#140 remove unused imports for sys and pytest
bikegeek Feb 17, 2022
7b5997c
#140 skip image comparison, fails on linux hosts
Feb 17, 2022
304dd1f
#140 skip image comparison
Feb 17, 2022
b9fdb53
#140 skip image comparison
Feb 17, 2022
2558515
#140 skip image comparison
Feb 17, 2022
1e75c21
#140 skip image comparison
Feb 17, 2022
adae1d3
#140 skip image comparison
Feb 17, 2022
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
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ docs/_build

docs/examples/*


__pycache__/
Empty file.
10 changes: 5 additions & 5 deletions metplotpy/plots/bar/bar.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
from plotly.subplots import make_subplots
from plotly.graph_objects import Figure

from plots.constants import PLOTLY_AXIS_LINE_COLOR, PLOTLY_AXIS_LINE_WIDTH, PLOTLY_PAPER_BGCOOR
from plots.bar.bar_config import BarConfig
from plots.bar.bar_series import BarSeries
from plots.base_plot import BasePlot
import plots.util as util
from metplotpy.plots.constants import PLOTLY_AXIS_LINE_COLOR, PLOTLY_AXIS_LINE_WIDTH, PLOTLY_PAPER_BGCOOR
from metplotpy.plots.bar.bar_config import BarConfig
from metplotpy.plots.bar.bar_series import BarSeries
from metplotpy.plots.base_plot import BasePlot
from metplotpy.plots import util

import metcalcpy.util.utils as calc_util

Expand Down
6 changes: 3 additions & 3 deletions metplotpy/plots/bar/bar_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

import itertools

from plots.config import Config
import plots.constants as constants
import plots.util as util
from ..config import Config
from .. import constants
from .. import util

import metcalcpy.util.utils as utils

Expand Down
4 changes: 2 additions & 2 deletions metplotpy/plots/bar/bar_series.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
from pandas import DataFrame

import metcalcpy.util.utils as utils
from plots import GROUP_SEPARATOR
from .. import GROUP_SEPARATOR

from plots.series import Series
from ..series import Series


class BarSeries(Series):
Expand Down
2 changes: 1 addition & 1 deletion metplotpy/plots/base_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import yaml
from typing import Union

from plots.config import Config
from .config import Config


class BasePlot:
Expand Down
10 changes: 5 additions & 5 deletions metplotpy/plots/box/box.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@

import metcalcpy.util.utils as calc_util

from plots.base_plot import BasePlot
from plots.box.box_config import BoxConfig
from plots.box.box_series import BoxSeries
import plots.util as util
from plots.constants import PLOTLY_AXIS_LINE_COLOR, PLOTLY_AXIS_LINE_WIDTH, PLOTLY_PAPER_BGCOOR
from metplotpy.plots.base_plot import BasePlot
from metplotpy.plots.box.box_config import BoxConfig
from metplotpy.plots.box.box_series import BoxSeries
from metplotpy.plots import util
from metplotpy.plots.constants import PLOTLY_AXIS_LINE_COLOR, PLOTLY_AXIS_LINE_WIDTH, PLOTLY_PAPER_BGCOOR


class Box(BasePlot):
Expand Down
6 changes: 3 additions & 3 deletions metplotpy/plots/box/box_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

import itertools

from plots.config import Config
import plots.constants as constants
import plots.util as util
from ..config import Config
from .. import constants
from .. import util

import metcalcpy.util.utils as utils

Expand Down
2 changes: 1 addition & 1 deletion metplotpy/plots/box/box_series.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from pandas import DataFrame

import metcalcpy.util.utils as utils
from plots.series import Series
from ..series import Series


class BoxSeries(Series):
Expand Down
2 changes: 1 addition & 1 deletion metplotpy/plots/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from typing import Union

import metcalcpy.util.utils as utils
import plots.constants as constants
from . import constants


class Config:
Expand Down
12 changes: 6 additions & 6 deletions metplotpy/plots/contour/contour.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
from plotly.subplots import make_subplots
from plotly.graph_objects import Figure

from plots.constants import PLOTLY_PAPER_BGCOOR
from plots.base_plot import BasePlot
import plots.util as util
from plots.contour.contour_config import ContourConfig
from plots.contour.contour_series import ContourSeries
from plots.series import Series
from metplotpy.plots.constants import PLOTLY_PAPER_BGCOOR
from metplotpy.plots.base_plot import BasePlot
from metplotpy.plots import util
from metplotpy.plots.contour.contour_config import ContourConfig
from metplotpy.plots.contour.contour_series import ContourSeries
from metplotpy.plots.series import Series

import metcalcpy.util.utils as calc_util

Expand Down
6 changes: 3 additions & 3 deletions metplotpy/plots/contour/contour_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
"""
__author__ = 'Tatiana Burek'

from plots.config import Config
import plots.constants as constants
import plots.util as util
from ..config import Config
from .. import constants
from .. import util

import metcalcpy.util.utils as utils

Expand Down
2 changes: 1 addition & 1 deletion metplotpy/plots/contour/contour_series.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from typing import Union
import numpy as np

from plots.series import Series
from ..series import Series


class ContourSeries(Series):
Expand Down
14 changes: 7 additions & 7 deletions metplotpy/plots/eclv/eclv.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
import plotly.graph_objects as go

from metcalcpy.event_equalize import event_equalize
from plots.base_plot import BasePlot
from plots.constants import PLOTLY_AXIS_LINE_COLOR, PLOTLY_AXIS_LINE_WIDTH
from plots.eclv.eclv_config import EclvConfig
from plots.eclv.eclv_series import EclvSeries
from plots.line.line import Line
import plots.util as util
from plots.series import Series
from metplotpy.plots.base_plot import BasePlot
from metplotpy.plots.constants import PLOTLY_AXIS_LINE_COLOR, PLOTLY_AXIS_LINE_WIDTH
from metplotpy.plots.eclv.eclv_config import EclvConfig
from metplotpy.plots.eclv.eclv_series import EclvSeries
from metplotpy.plots.line.line import Line
from metplotpy.plots import util
from metplotpy.plots.series import Series

import metcalcpy.util.utils as calc_util

Expand Down
2 changes: 1 addition & 1 deletion metplotpy/plots/eclv/eclv_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
__author__ = 'Tatiana Burek'

import itertools
from plots.line.line_config import LineConfig
from ..line.line_config import LineConfig


class EclvConfig(LineConfig):
Expand Down
2 changes: 1 addition & 1 deletion metplotpy/plots/eclv/eclv_series.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from scipy.stats import norm

import metcalcpy.util.utils as utils
from plots.line.line_series import LineSeries
from ..line.line_series import LineSeries


class EclvSeries(LineSeries):
Expand Down
10 changes: 5 additions & 5 deletions metplotpy/plots/ens_ss/ens_ss.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
from plotly.graph_objects import Figure

from metcalcpy.event_equalize import event_equalize
from plots.constants import PLOTLY_AXIS_LINE_COLOR, PLOTLY_AXIS_LINE_WIDTH, PLOTLY_PAPER_BGCOOR
from plots.ens_ss.ens_ss_config import EnsSsConfig
from plots.ens_ss.ens_ss_series import EnsSsSeries
from plots.base_plot import BasePlot
import plots.util as util
from metplotpy.plots.constants import PLOTLY_AXIS_LINE_COLOR, PLOTLY_AXIS_LINE_WIDTH, PLOTLY_PAPER_BGCOOR
from metplotpy.plots.ens_ss.ens_ss_config import EnsSsConfig
from metplotpy.plots.ens_ss.ens_ss_series import EnsSsSeries
from metplotpy.plots.base_plot import BasePlot
import metplotpy.plots.util as util
import metcalcpy.util.utils as utils


Expand Down
6 changes: 3 additions & 3 deletions metplotpy/plots/ens_ss/ens_ss_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

import itertools

from plots.config import Config
import plots.constants as constants
import plots.util as util
from ..config import Config
from .. import constants
from .. import util

import metcalcpy.util.utils as utils

Expand Down
4 changes: 2 additions & 2 deletions metplotpy/plots/ens_ss/ens_ss_series.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
from scipy.stats import norm

import metcalcpy.util.utils as utils
from plots import GROUP_SEPARATOR
from ..plots import GROUP_SEPARATOR

from plots.series import Series
from ..plots.series import Series


class EnsSsSeries(Series):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
from plotly.subplots import make_subplots
from plotly.graph_objects import Figure

from plots.constants import PLOTLY_AXIS_LINE_COLOR, PLOTLY_AXIS_LINE_WIDTH, PLOTLY_PAPER_BGCOOR
from plots.equivalence_testing_bounds.equivalence_testing_bounds_series \
from metplotpy.plots.constants import PLOTLY_AXIS_LINE_COLOR, PLOTLY_AXIS_LINE_WIDTH, PLOTLY_PAPER_BGCOOR
from metplotpy.plots.equivalence_testing_bounds.equivalence_testing_bounds_series \
import EquivalenceTestingBoundsSeries
from plots.line.line_config import LineConfig
from plots.line.line_series import LineSeries
from plots.base_plot import BasePlot
import plots.util as util
from metplotpy.plots.line.line_config import LineConfig
from metplotpy.plots.line.line_series import LineSeries
from metplotpy.plots.base_plot import BasePlot
from metplotpy.plots import util

import metcalcpy.util.utils as calc_util

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

import metcalcpy.util.utils as utils
from metcalcpy.sum_stat import calculate_statistic
from plots import GROUP_SEPARATOR
from plots.line.line_series import LineSeries
from .. import GROUP_SEPARATOR
from ..line.line_series import LineSeries


class EquivalenceTestingBoundsSeries(LineSeries):
Expand Down
13 changes: 7 additions & 6 deletions metplotpy/plots/histogram/hist.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@
from plotly.subplots import make_subplots
from plotly.graph_objects import Figure

import plots.histogram.hist_config
from plots.constants import PLOTLY_AXIS_LINE_COLOR, PLOTLY_AXIS_LINE_WIDTH, PLOTLY_PAPER_BGCOOR
from plots.histogram.hist_series import HistSeries
from plots.base_plot import BasePlot
import plots.util as util
from ..histogram import hist_config
from ..constants import PLOTLY_AXIS_LINE_COLOR, PLOTLY_AXIS_LINE_WIDTH, PLOTLY_PAPER_BGCOOR
from ..histogram.hist_series import HistSeries
from ..base_plot import BasePlot
from .. import util

import metcalcpy.util.utils as utils
from metcalcpy.event_equalize import event_equalize

Expand Down Expand Up @@ -48,7 +49,7 @@ def __init__(self, parameters: dict) -> None:
# instantiate a HistogramConfig object, which holds all the necessary settings from the
# config file that represents the BasePlot object.
self.config_obj = \
getattr(sys.modules['plots.histogram.hist_config'],
getattr(sys.modules['hist_config'],
self.config_obj_name)(self.parameters)

# Check that we have all the necessary settings for each ser
Expand Down
6 changes: 3 additions & 3 deletions metplotpy/plots/histogram/hist_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

import itertools

from plots.config import Config
import plots.constants as constants
import plots.util as util
from ..config import Config
from .. import constants
from .. import util

import metcalcpy.util.utils as utils

Expand Down
2 changes: 1 addition & 1 deletion metplotpy/plots/histogram/hist_series.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import numpy as np

import metcalcpy.util.utils as utils
from plots.series import Series
from ..series import Series


class HistSeries(Series):
Expand Down
2 changes: 1 addition & 1 deletion metplotpy/plots/histogram/histogram.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import pandas as pd
import numpy as np

from plots.base_plot import BasePlot
from metplotpy.plots.base_plot import BasePlot


class Histogram(BasePlot):
Expand Down
6 changes: 3 additions & 3 deletions metplotpy/plots/histogram/prob_hist.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
from typing import Union
import yaml

from plots.histogram.hist import Hist
from plots.histogram.hist_series import HistSeries
import plots.util as util
from metplotpy.plots.histogram.hist import Hist
from metplotpy.plots.histogram.hist_series import HistSeries
from metplotpy.plots import util


class ProbHist(Hist):
Expand Down
6 changes: 3 additions & 3 deletions metplotpy/plots/histogram/rank_hist.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

import yaml

from plots.histogram.hist import Hist
import plots.util as util
from plots.histogram.hist_series import HistSeries
from metplotpy.plots.histogram.hist import Hist
from metplotpy.plots import util
from metplotpy.plots.histogram.hist_series import HistSeries


class RankHist(Hist):
Expand Down
7 changes: 3 additions & 4 deletions metplotpy/plots/histogram/rel_hist.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@

import yaml

import plots.util as util
from plots.histogram.hist import Hist

from plots.histogram.hist_series import HistSeries
from metplotpy.plots import util
from metplotpy.plots.histogram.hist import Hist
from metplotpy.plots.histogram.hist_series import HistSeries


class RelHist(Hist):
Expand Down
Empty file.
5 changes: 3 additions & 2 deletions metplotpy/plots/histogram_2d/histogram_2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@
import yaml
import xarray as xr
import plotly.graph_objects as go
import plots.util as util

from .. import util

"""
Import BasePlot class
"""
from plots.base_plot import BasePlot
from ..base_plot import BasePlot


class Histogram_2d(BasePlot):
Expand Down
4 changes: 1 addition & 3 deletions metplotpy/plots/hovmoeller/hovmoeller.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@
"""
Import BasePlot class
"""
#from ..base_plot import BasePlot
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir)))
from base_plot import BasePlot
from metplotpy.plots.base_plot import BasePlot


class Hovmoeller(BasePlot):
Expand Down
Loading