Skip to content

Commit

Permalink
CI: First changes to try to fix CI. (#858)
Browse files Browse the repository at this point in the history
* CI: First changes to try to fix CI.

* FIX: Fix for dimensions issue.

* FIX: Update test plots.

* STY: PEP8.

* FIX: Update datarose plot.

* Update .github/workflows/ci.yml

Co-authored-by: Max Grover <[email protected]>

* Update ci.yml

* Update ci.yml

* FIX: Fix syntax in windrosedisplay...

* CI: Move some pip installs to conda.

---------

Co-authored-by: Max Grover <[email protected]>
  • Loading branch information
zssherman and mgrover1 authored Sep 26, 2024
1 parent 42af001 commit dadda9c
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 9 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
os: [macOS, ubuntu, Windows]
inlcude:
include:
- os: macos-latest
PLAT: arm64
INTERFACE64: ""
Expand All @@ -49,6 +49,7 @@ jobs:
create-args: python=${{ matrix.python-version }}
environment-file: ./continuous_integration/environment_actions.yml
environment-name: act_env
micromamba-version: 1.5.10-0

- name: Install ACT
run: |
Expand Down
5 changes: 2 additions & 3 deletions act/plotting/windrosedisplay.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,9 +407,9 @@ def plot_data(
# Produce direction (x-axis) and speed (y-axis) plots displaying the mean
# as the contours.
spd_data = ds[spd_field].values
spd_bins = np.linspace(0, ds[spd_field].max(), num_data_bins + 1)
spd_bins = np.linspace(0, ds[spd_field].max().values, num_data_bins + 1)
spd_bins = np.insert(spd_bins, 1, calm_threshold)
# Set up an array and cycle through the data, binning them by speed/direction
# Set up an array and cycle through the data, binning them by speed/direction
mean_data = np.zeros([len(bins), len(spd_bins)])
for i in range(len(bins) - 1):
for j in range(len(spd_bins)):
Expand All @@ -432,7 +432,6 @@ def plot_data(
mean_data = np.insert(mean_data, -1, mean_data[0, :], axis=0)
bins.append(bins[0])
mean_data[-1, :] = mean_data[0, :]

# In order to properly handle vmin/vmax in contours, need to adjust
# the levels plotted and remove the keywords to contourf
vmin = np.nanmin(mean_data)
Expand Down
7 changes: 2 additions & 5 deletions continuous_integration/environment_actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
name: act_env
channels:
- conda-forge
- defaults
dependencies:
- cartopy
- pyproj
Expand All @@ -13,7 +12,6 @@ dependencies:
- dask
- xarray
- ipython
- pint=0.8.1
- skyfield
- lxml
- scikit-posthocs
Expand All @@ -28,12 +26,11 @@ dependencies:
- cmweather
- moviepy
- ruff
- metpy
- arm_pyart
- pip
- pip:
- mpl2nc
- metpy
- pysp2
- arm_pyart
- icartt
- aiohttp>=3.9.0b1
- git+https://github.com/ARM-DOE/arm-test-data.git
Binary file modified tests/plotting/baseline/test_plot_datarose.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/plotting/baseline/test_stacked_bar_graph3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/plotting/baseline/test_stair_graph2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit dadda9c

Please sign in to comment.