Skip to content

Commit

Permalink
Merge branch 'unstructured_scheme' into unstructured_scheme_new
Browse files Browse the repository at this point in the history
* unstructured_scheme: (22 commits)
  Check mesh equality on MeshToGridESMFRegridder call (SciTools#138)
  Formalise regridder file format (SciTools#137)
  Fix issue 135 (mesh to grid chunking problems) (SciTools#136)
  Add load/save benchmarks (SciTools#132)
  Regridder load/saving (SciTools#130)
  Update dependencies (SciTools#128)
  Perform scalability for larger grids (SciTools#122)
  Add performance tests (SciTools#117)
  change iris source (SciTools#115)
  Unstructured scheme lazy regridding (with performance tests) (SciTools#111)
  Updating feature branch unstructured_scheme from 44d6048 to head of main, e528cbf
  Add grid to mesh scheme (SciTools#96)
  Unstructured scheme integration test (SciTools#66)
  Updated lockfiles according to branch requirement spec.
  Update Version to v0.1.dev2 (SciTools#59)
  Update version to v0.1.dev1 (SciTools#58)
  Unstructured Scheme - Extra Dims (SciTools#55)
  add __init__ to tests (SciTools#56)
  Unstructured Scheme - Additional Polish (docstrings and test coverage) (SciTools#53)
  Unstructured Scheme - Cube Creation 3D (SciTools#47)
  ...

# Conflicts:
#	benchmarks/benchmarks/ci/esmf_regridder.py
#	benchmarks/benchmarks/generate_data.py
#	requirements/nox.lock/py36-linux-64.lock
#	requirements/nox.lock/py37-linux-64.lock
#	requirements/nox.lock/py38-linux-64.lock
#	requirements/py36.yml
  • Loading branch information
stephenworsley committed Jan 10, 2022
2 parents b32e134 + 53e8b61 commit 7e44547
Show file tree
Hide file tree
Showing 30 changed files with 3,027 additions and 238 deletions.
28 changes: 24 additions & 4 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,36 @@ env:
# Maximum cache period (in weeks) before forcing a new cache upload.
CACHE_PERIOD: "2"
# Increment the build number to force new conda cache upload.
CONDA_CACHE_BUILD: "0"
CONDA_CACHE_BUILD: "1"
# Increment the build number to force new nox cache upload.
NOX_CACHE_BUILD: "0"
NOX_CACHE_BUILD: "2"
# Increment the build number to force new pip cache upload.
PIP_CACHE_BUILD: "0"
# Pip package to be installed.
PIP_CACHE_PACKAGES: "pip setuptools wheel nox pyyaml"
# Conda packages to be installed.
CONDA_CACHE_PACKAGES: "nox pip pyyaml"
# Use specific custom iris source feature branch.
IRIS_SOURCE: "github:main"
# Git commit hash for iris test data.
IRIS_TEST_DATA_VERSION: "2.2"
# Base directory for the iris-test-data.
IRIS_TEST_DATA_DIR: ${HOME}/iris-test-data
OVERRIDE_TEST_DATA_REPOSITORY: ${IRIS_TEST_DATA_DIR}/test_data


#
# YAML alias for the iris-test-data cache.
#
iris_test_data_template: &IRIS_TEST_DATA_TEMPLATE
data_cache:
folder: ${IRIS_TEST_DATA_DIR}
fingerprint_script:
- echo "iris-test-data v${IRIS_TEST_DATA_VERSION}"
populate_script:
- wget --quiet https://github.com/SciTools/iris-test-data/archive/v${IRIS_TEST_DATA_VERSION}.zip -O iris-test-data.zip
- unzip -q iris-test-data.zip
- mv iris-test-data-${IRIS_TEST_DATA_VERSION} ${IRIS_TEST_DATA_DIR}


#
Expand Down Expand Up @@ -88,8 +109,6 @@ test_task:
only_if: ${SKIP_TEST_TASK} == ""
auto_cancellation: true
matrix:
env:
PY_VER: "3.6"
env:
PY_VER: "3.7"
env:
Expand All @@ -104,6 +123,7 @@ test_task:
- echo "${CIRRUS_TASK_NAME}"
- echo "${NOX_CACHE_BUILD}"
- if [ -n "${IRIS_SOURCE}" ]; then echo "${IRIS_SOURCE}"; fi
<< : *IRIS_TEST_DATA_TEMPLATE
test_script:
- export CONDA_OVERRIDE_LINUX="$(uname -r | cut -d'+' -f1)"
- nox --session tests -- --verbose
Expand Down
43 changes: 43 additions & 0 deletions benchmarks/benchmarks/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,44 @@
"""Benchmark tests for iris-esmf-regrid"""


def disable_repeat_between_setup(benchmark_object):
"""
Decorator for benchmarks where object persistence would be inappropriate.
E.g:
* Data is realised during testing.
Can be applied to benchmark classes/methods/functions.
https://asv.readthedocs.io/en/stable/benchmarks.html#timing-benchmarks
"""
# Prevent repeat runs between setup() runs - object(s) will persist after 1st.
benchmark_object.number = 1
# Compensate for reduced certainty by increasing number of repeats.
# (setup() is run between each repeat).
# Minimum 5 repeats, run up to 30 repeats / 20 secs whichever comes first.
benchmark_object.repeat = (5, 30, 20.0)
# ASV uses warmup to estimate benchmark time before planning the real run.
# Prevent this, since object(s) will persist after first warmup run,
# which would give ASV misleading info (warmups ignore ``number``).
benchmark_object.warmup_time = 0.0

return benchmark_object


def skip_benchmark(benchmark_object):
"""
Decorator for benchmarks skipping benchmarks.
"""

def setup_cache(self):
pass

def setup(*args):
raise NotImplementedError

benchmark_object.setup_cache = setup_cache
benchmark_object.setup = setup

return benchmark_object
Loading

0 comments on commit 7e44547

Please sign in to comment.