diff --git a/.appveyor.yml b/.appveyor.yml index 84b744b..879efff 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -8,7 +8,7 @@ environment: install: # windows config (for installation) - - cmd: "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%" + - cmd: "%PYTHON%\\Scripts\\activate.bat%" - cmd: setlocal - cmd: set ANACONDA_API_TOKEN= # conda config diff --git a/ci/conda-recipe/meta.yaml b/ci/conda-recipe/meta.yaml index 1ef09d9..1055a27 100644 --- a/ci/conda-recipe/meta.yaml +++ b/ci/conda-recipe/meta.yaml @@ -40,6 +40,7 @@ test: - seaborn - pillow - psy-maps + - pyqtwebengine source_files: - tests diff --git a/psy_view/ds_widget.py b/psy_view/ds_widget.py index b85613c..9b8057f 100644 --- a/psy_view/ds_widget.py +++ b/psy_view/ds_widget.py @@ -1498,7 +1498,7 @@ def refresh(self, reset_combo: bool = True) -> None: if self.sp: data = self.data - ds_data = self.ds[self.variable] + ds_data = self.ds.psy[self.variable] with self.silence_variable_buttons(): self.variable_buttons[self.variable].setChecked(True) diff --git a/psy_view/plotmethods.py b/psy_view/plotmethods.py index 97c1eb9..75788f6 100644 --- a/psy_view/plotmethods.py +++ b/psy_view/plotmethods.py @@ -55,6 +55,7 @@ import xarray as xr from psyplot.utils import unique_everseen +import psyplot.data as psyd from PyQt5 import QtWidgets, QtCore, QtGui import psy_view.dialogs as dialogs @@ -401,6 +402,17 @@ class MapPlotWidget(PlotMethodWidget): plotmethod = 'mapplot' + @property + def sp(self) -> Optional[Project]: + sp = super().sp + if sp: + arrays: List[str] = [ + data.psy.arr_name for data in sp + if not isinstance(data, psyd.InteractiveList) + ] + return sp(arr_name=arrays) + return sp + def get_rows(self, func: Callable) -> List[List[GridCell]]: """Get the rows of the formatoption widgets.