WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 4b514ba

Browse files
authored
Update environment (#141)
* update environment * update dev environment * revert renaming of environment * roll back simpeg to 0.23 * roll back simpeg * update environment * update environment * update environment * try unpinning matplotlib dep * try removing qt from matplotlib dependency * update environment * remove matplotlib version pin * update testing * SimPEG --> simpeg * update environment file * update testing * update python version * update testing * restart and clear outputs from all notebooks * update testing
1 parent 24d2a22 commit 4b514ba

21 files changed

+336
-514
lines changed

.github/workflows/tests.yml

Lines changed: 51 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@ name: Testing
22

33
on:
44
push:
5-
branches:
6-
- '*'
5+
branches: ['*']
76
pull_request:
8-
branches:
9-
- '*'
7+
branches: ['*']
8+
109
jobs:
1110
setup-build:
1211
name: Ex1 (${{ matrix.python-version }}, ${{ matrix.os }})
@@ -18,26 +17,53 @@ jobs:
1817
fail-fast: false
1918
matrix:
2019
os: ["ubuntu-latest"]
21-
python-version: ["3.10"]
22-
test_file: ["tests/test_dcip.py", "tests/test_em.py", "tests/test_gpr.py", "tests/test_mag.py", "tests/test_seismic.py"]
20+
python-version: ["3.11"]
21+
test_file: [
22+
"tests/test_dcip.py",
23+
"tests/test_em.py",
24+
"tests/test_gpr.py tests/test_seismic.py",
25+
"tests/test_mag.py"
26+
]
27+
env:
28+
PYTEST_DISABLE_PLUGIN_AUTOLOAD: "1"
29+
MPLBACKEND: Agg # avoid GUI backends import cost
2330

2431
steps:
25-
- uses: actions/checkout@v2
26-
- name: Setup Conda
27-
uses: conda-incubator/setup-miniconda@v2
28-
with:
29-
auto-update-conda: true
30-
activate-environment: geosci-labs
31-
channels: conda-forge
32-
environment-file: environment.yml
33-
python-version: ${{ matrix.python-version }}
34-
- name: Install Env
35-
run: |
36-
conda info
37-
conda config --show
38-
conda install -y pytest
39-
pip install testipynb
40-
conda list
41-
- name: Run Tests
42-
run: |
43-
pytest -v ${{ matrix.test_file }}
32+
- uses: actions/checkout@v4
33+
34+
# Use Miniforge3 (not "latest" to avoid 404s) + mamba, strict conda-forge
35+
- name: Setup Conda (Miniforge3 + mamba)
36+
uses: conda-incubator/setup-miniconda@v3
37+
with:
38+
miniforge-variant: Miniforge3
39+
miniforge-version: "24.11.0-0" # pin to avoid 'latest' asset 404s
40+
python-version: ${{ matrix.python-version }}
41+
activate-environment: geosci-labs
42+
environment-file: environment.yml
43+
use-mamba: true
44+
auto-update-conda: false
45+
auto-activate-base: false
46+
channels: conda-forge
47+
channel-priority: strict
48+
condarc: |
49+
channels:
50+
- conda-forge
51+
channel_priority: strict
52+
53+
- name: Show environment info
54+
run: |
55+
conda info
56+
conda list
57+
58+
- name: Install test dependencies (pytest + testipynb)
59+
run: |
60+
n=0
61+
until [ $n -ge 3 ]; do
62+
mamba install -y pytest && pip install -U testipynb && break
63+
n=$((n+1))
64+
echo "Retry $n/3 after transient fetch error..."
65+
sleep 10
66+
done
67+
68+
- name: Run tests
69+
run: pytest -v ${{ matrix.test_file }}

environment-dev.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

environment.yml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,20 @@ name: geosci-labs
33
channels:
44
- conda-forge
55
dependencies:
6-
- cvxopt
7-
- deepdish
8-
- discretize
9-
- ipywidgets>=0.6.0
10-
- jupyter
11-
- matplotlib<3.5
12-
- Pillow
13-
- pip
14-
- pymatsolver
15-
- python=3.10
6+
- python=3.11
7+
- numpy
8+
- scipy
9+
- pydiso
10+
- matplotlib
11+
- ipywidgets
12+
- jupyterlab
13+
- pillow
1614
- requests
15+
- discretize
1716
- simpeg
17+
- pymatsolver
18+
- deepdish
19+
- cvxopt
20+
- pip
1821
- pip:
1922
- git+https://github.com/geoscixyz/geosci-labs

notebooks/dcip/DC_SurveyDataInversion.ipynb

Lines changed: 15 additions & 108 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,9 @@
22
"cells": [
33
{
44
"cell_type": "code",
5-
"execution_count": 1,
5+
"execution_count": null,
66
"metadata": {},
7-
"outputs": [
8-
{
9-
"name": "stderr",
10-
"output_type": "stream",
11-
"text": [
12-
"/Users/syckdog/opt/anaconda3/envs/e350_notebook/lib/python3.9/site-packages/discretize/utils/code_utils.py:247: FutureWarning: ExtractCoreMesh has been deprecated, please use extract_core_mesh. It will be removed in version 1.0.0 of discretize.\n",
13-
" warnings.warn(\n"
14-
]
15-
}
16-
],
7+
"outputs": [],
178
"source": [
189
"import warnings\n",
1910
"warnings.filterwarnings(\"ignore\")\n",
@@ -54,24 +45,9 @@
5445
},
5546
{
5647
"cell_type": "code",
57-
"execution_count": 2,
48+
"execution_count": null,
5849
"metadata": {},
59-
"outputs": [
60-
{
61-
"data": {
62-
"application/vnd.jupyter.widget-view+json": {
63-
"model_id": "04569e8a845b4a32bc77d043b2950dd3",
64-
"version_major": 2,
65-
"version_minor": 0
66-
},
67-
"text/plain": [
68-
"MyApp(children=(ToggleButtons(description='survey', options=('Dipole-Dipole', 'Dipole-Pole', 'Pole-Dipole', 'P…"
69-
]
70-
},
71-
"metadata": {},
72-
"output_type": "display_data"
73-
}
74-
],
50+
"outputs": [],
7551
"source": [
7652
"cylinder_app()"
7753
]
@@ -139,24 +115,9 @@
139115
},
140116
{
141117
"cell_type": "code",
142-
"execution_count": 3,
118+
"execution_count": null,
143119
"metadata": {},
144-
"outputs": [
145-
{
146-
"data": {
147-
"application/vnd.jupyter.widget-view+json": {
148-
"model_id": "d1384e6efce843ca873e1a2f8571cc74",
149-
"version_major": 2,
150-
"version_minor": 0
151-
},
152-
"text/plain": [
153-
"MyApp(children=(FloatSlider(value=-30.0, continuous_update=False, description='A', max=40.0, min=-40.0, step=1…"
154-
]
155-
},
156-
"metadata": {},
157-
"output_type": "display_data"
158-
}
159-
],
120+
"outputs": [],
160121
"source": [
161122
"plot_layer_potentials_app()"
162123
]
@@ -198,24 +159,9 @@
198159
},
199160
{
200161
"cell_type": "code",
201-
"execution_count": 4,
162+
"execution_count": null,
202163
"metadata": {},
203-
"outputs": [
204-
{
205-
"data": {
206-
"application/vnd.jupyter.widget-view+json": {
207-
"model_id": "d645ed44e78b485a93927aa419e818e8",
208-
"version_major": 2,
209-
"version_minor": 0
210-
},
211-
"text/plain": [
212-
"MyApp(children=(IntSlider(value=0, description='i', max=17), Output()), layout=Layout(align_items='stretch', d…"
213-
]
214-
},
215-
"metadata": {},
216-
"output_type": "display_data"
217-
}
218-
],
164+
"outputs": [],
219165
"source": [
220166
"MidpointPseudoSectionWidget()"
221167
]
@@ -242,26 +188,9 @@
242188
},
243189
{
244190
"cell_type": "code",
245-
"execution_count": 5,
246-
"metadata": {
247-
"scrolled": false
248-
},
249-
"outputs": [
250-
{
251-
"data": {
252-
"application/vnd.jupyter.widget-view+json": {
253-
"model_id": "6a25181275ec473a99eb1e64715b50d2",
254-
"version_major": 2,
255-
"version_minor": 0
256-
},
257-
"text/plain": [
258-
"interactive(children=(BoundedFloatText(value=1000.0, description='$\\\\rho_1$', max=1000.0, min=10.0), BoundedFl…"
259-
]
260-
},
261-
"metadata": {},
262-
"output_type": "display_data"
263-
}
264-
],
191+
"execution_count": null,
192+
"metadata": {},
193+
"outputs": [],
265194
"source": [
266195
"DC2DPseudoWidget()"
267196
]
@@ -296,34 +225,12 @@
296225
},
297226
{
298227
"cell_type": "code",
299-
"execution_count": 6,
228+
"execution_count": null,
300229
"metadata": {},
301-
"outputs": [
302-
{
303-
"data": {
304-
"application/vnd.jupyter.widget-view+json": {
305-
"model_id": "79e1c6477a08484db56eb9cd47a1916a",
306-
"version_major": 2,
307-
"version_minor": 0
308-
},
309-
"text/plain": [
310-
"MyApp(children=(BoundedFloatText(value=1000.0, description='$\\\\rho_1$', max=1000.0, min=10.0), BoundedFloatTex…"
311-
]
312-
},
313-
"metadata": {},
314-
"output_type": "display_data"
315-
}
316-
],
230+
"outputs": [],
317231
"source": [
318232
"DC2DfwdWidget()"
319233
]
320-
},
321-
{
322-
"cell_type": "code",
323-
"execution_count": null,
324-
"metadata": {},
325-
"outputs": [],
326-
"source": []
327234
}
328235
],
329236
"metadata": {
@@ -343,7 +250,7 @@
343250
"name": "python",
344251
"nbconvert_exporter": "python",
345252
"pygments_lexer": "ipython3",
346-
"version": "3.9.13"
253+
"version": "3.11.10"
347254
},
348255
"widgets": {
349256
"state": {
@@ -366,5 +273,5 @@
366273
}
367274
},
368275
"nbformat": 4,
369-
"nbformat_minor": 1
276+
"nbformat_minor": 4
370277
}

notebooks/em/EM_EM31.ipynb

Lines changed: 5 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"cells": [
33
{
44
"cell_type": "code",
5-
"execution_count": 1,
5+
"execution_count": null,
66
"metadata": {},
77
"outputs": [],
88
"source": [
@@ -65,34 +65,12 @@
6565
},
6666
{
6767
"cell_type": "code",
68-
"execution_count": 5,
68+
"execution_count": null,
6969
"metadata": {},
70-
"outputs": [
71-
{
72-
"data": {
73-
"application/vnd.jupyter.widget-view+json": {
74-
"model_id": "f1ca2def4ff64fd59de24c86ec4ed65f",
75-
"version_major": 2,
76-
"version_minor": 0
77-
},
78-
"text/plain": [
79-
"interactive(children=(FloatSlider(value=0.0, continuous_update=False, description='$h_{boom}$', max=2.0), Floa…"
80-
]
81-
},
82-
"metadata": {},
83-
"output_type": "display_data"
84-
}
85-
],
70+
"outputs": [],
8671
"source": [
8772
"interactive_responseFct()"
8873
]
89-
},
90-
{
91-
"cell_type": "code",
92-
"execution_count": null,
93-
"metadata": {},
94-
"outputs": [],
95-
"source": []
9674
}
9775
],
9876
"metadata": {
@@ -111,9 +89,9 @@
11189
"name": "python",
11290
"nbconvert_exporter": "python",
11391
"pygments_lexer": "ipython3",
114-
"version": "3.9.13"
92+
"version": "3.11.10"
11593
}
11694
},
11795
"nbformat": 4,
118-
"nbformat_minor": 1
96+
"nbformat_minor": 4
11997
}

0 commit comments

Comments
 (0)