Skip to content

Commit 6c39393

Browse files
authored
Fix ASV Benchmarking Workflow (#1186)
* Update `environment.yml` to fix ASV PR workflow (#1185) * Update environment.yml * Update mpas_ocean.py * add issue write permission * update cross section benchmark
1 parent 974c93f commit 6c39393

File tree

3 files changed

+6
-10
lines changed

3 files changed

+6
-10
lines changed

.github/workflows/asv-benchmarking-pr.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: ASV Benchmarking (PR)
22

3+
permissions:
4+
issues: write
5+
36
on:
47
pull_request:
58
types: [opened, reopened, synchronize, labeled]

benchmarks/mpas_ocean.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
from pathlib import Path
44

55
import numpy as np
6-
from polars.testing.parametric import dtypes
76

87
import uxarray as ux
98

@@ -170,8 +169,8 @@ def time_check_norm(self, resolution):
170169
from uxarray.grid.validation import _check_normalization
171170
_check_normalization(self.uxgrid)
172171

173-
class CrossSection:
174-
param_names = DatasetBenchmark.param_names + ['lat_step']
172+
class CrossSections(DatasetBenchmark):
173+
param_names = DatasetBenchmark.param_names + ['n_lat']
175174
params = DatasetBenchmark.params + [[1, 2, 4]]
176175

177176
def setup(self, resolution, lat_step):
@@ -180,13 +179,6 @@ def setup(self, resolution, lat_step):
180179
self.lats = np.arange(-45, 45, lat_step)
181180
_ = self.uxgrid.bounds
182181

183-
class CrossSections(DatasetBenchmark):
184-
param_names = DatasetBenchmark.param_names + ['n_lat']
185-
params = DatasetBenchmark.params + [[1, 2, 4, 8]]
186-
187-
def time_constant_lat_fast(self, resolution, n_lat):
188-
for lat in np.linspace(-89, 89, n_lat):
189-
self.uxds.uxgrid.constant_latitude_cross_section(lat, method='fast')
190182
def teardown(self, resolution, lat_step):
191183
del self.uxgrid
192184

ci/environment.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ dependencies:
1414
- healpix
1515
- holoviews
1616
- hvplot
17+
- hypothesis
1718
- matplotlib-base
1819
- matplotlib-inline
1920
- netcdf4

0 commit comments

Comments
 (0)