Skip to content

Commit

Permalink
Merge branch 'main' into m_scen_ens
Browse files Browse the repository at this point in the history
  • Loading branch information
veni-vidi-vici-dormivi committed Dec 11, 2024
2 parents 6edf8b6 + 1481de9 commit 352db6f
Show file tree
Hide file tree
Showing 11 changed files with 121 additions and 83 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/pypi-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ jobs:
path: dist
- name: Publish package to TestPyPI
if: github.event_name == 'push'
uses: pypa/[email protected].2
uses: pypa/[email protected].3
with:
repository_url: https://test.pypi.org/legacy/
verbose: true
Expand All @@ -111,6 +111,6 @@ jobs:
name: releases
path: dist
- name: Publish package to PyPI
uses: pypa/[email protected].2
uses: pypa/[email protected].3
with:
verbose: true
11 changes: 9 additions & 2 deletions .github/workflows/upstream-dev-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,14 @@ jobs:
- name: Install mesmer
run: |
python -m pip install --no-deps -e .
- name: Environment info
run: |
micromamba info
micromamba list
echo ""
echo "numpy.show_config()"
echo ""
python -c "import numpy; numpy.show_config()"
- name: Import mesmer
run: |
python -c 'import mesmer'
Expand All @@ -69,7 +76,7 @@ jobs:
failure()
&& steps.status.outcome == 'failure'
&& github.event_name == 'schedule'
&& github.repository_owner == 'mesmer'
&& github.repository_owner == 'MESMER-group'
uses: xarray-contrib/issue-from-pytest-log@v1
with:
log-path: output-${{ matrix.python-version }}-log.jsonl
2 changes: 1 addition & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ Harmonic model
`#424 <https://github.com/MESMER-group/mesmer/pull/424>`_,
`#433 <https://github.com/MESMER-group/mesmer/pull/433>`_,
`#512 <https://github.com/MESMER-group/mesmer/pull/512>`_, and
`#512 <https://github.com/MESMER-group/mesmer/pull/512>`_).
`#574 <https://github.com/MESMER-group/mesmer/pull/574>`_).
- add tests (
`#431 <https://github.com/MESMER-group/mesmer/pull/431>`_, and
`#458 <https://github.com/MESMER-group/mesmer/pull/458>`_)
Expand Down
11 changes: 2 additions & 9 deletions ci/install-upstream-wheels.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,14 @@ conda uninstall -y --force \
# keep netcdf4: difficult to build

# to limit the runtime of Upstream CI
python -m pip install \
-i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple \
--no-deps \
--pre \
--upgrade \
matplotlib \
python -m pip install -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple --no-deps --pre --upgrade \
numpy \
pandas \
scikit-learn \
scipy \
statsmodels

python -m pip install \
--no-deps \
--upgrade \
python -m pip install --no-deps --upgrade \
git+https://github.com/dask/dask \
git+https://github.com/fatiando/pooch \
git+https://github.com/geopandas/geopandas \
Expand Down
65 changes: 37 additions & 28 deletions examples/example_mesmer_m.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,20 @@
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"execution_count": 1,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'0.10.0.post1.dev143+gfc10078.d20241008'"
]
},
"execution_count": 1,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"import importlib\n",
"\n",
Expand All @@ -41,7 +52,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -52,7 +63,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -80,7 +91,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -120,7 +131,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -140,7 +151,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -153,7 +164,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 7,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -174,7 +185,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 8,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -196,17 +207,15 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 10,
"metadata": {},
"outputs": [],
"source": [
"resids_after_hm = tas_stacked_m - harmonic_model_fit.predictions\n",
"\n",
"pt_coefficients = mesmer.stats.fit_yeo_johnson_transform(\n",
" tas_stacked_y.tas, resids_after_hm.tas\n",
" tas_stacked_y.tas, harmonic_model_fit.residuals\n",
")\n",
"transformed_hm_resids = mesmer.stats.yeo_johnson_transform(\n",
" tas_stacked_y.tas, resids_after_hm.tas, pt_coefficients\n",
" tas_stacked_y.tas, harmonic_model_fit.residuals, pt_coefficients\n",
")"
]
},
Expand All @@ -221,7 +230,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 11,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -241,7 +250,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 12,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -282,7 +291,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 13,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -309,7 +318,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 14,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -329,7 +338,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 15,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -355,7 +364,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 16,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -372,7 +381,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 17,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -383,7 +392,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 18,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -401,7 +410,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 19,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -413,7 +422,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 20,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -430,7 +439,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 21,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -460,7 +469,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 22,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -477,7 +486,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 23,
"metadata": {},
"outputs": [],
"source": [
Expand Down
Loading

0 comments on commit 352db6f

Please sign in to comment.