Skip to content

Commit ea7363c

Browse files
authored
Merge pull request #8 from pp-mo/better_env
Better env
2 parents ccabc55 + a2ff2d3 commit ea7363c

File tree

4 files changed

+156
-38
lines changed

4 files changed

+156
-38
lines changed

README.md

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,32 @@ So, we also provide a "lockfile" which ties down all package versions, from whic
1515
known-good environment can be recreated :
1616
e.g. `$ conda create --name meshtut_savefixed_env --file tutorial_conda_env_resolved.lock`
1717

18+
> :warning: **Important Note**
19+
> For now, the latest GeoVista build in channels is not sufficient.
20+
> You must also download geovista + install it, e.g. by `pip install -e .`
21+
### Installing Geovista : more-or-less detailed instructions
22+
You need to execute commands something like this ...
23+
24+
```bash
25+
$ # download
26+
$ cd ~/git
27+
$ git clone https://github.com/bjlittle/geovista.git
28+
$
29+
$ # install in the env
30+
$ conda activate mesh-tutorial
31+
$ cd ~/git/geovista
32+
$ pip install -e .
33+
... (lots of output) ...
34+
$
35+
$ # TEST that the import now works ...
36+
$ python -c "import geovista as gv; print(gv); print(gv.__version__)"
37+
<module 'geovista' from '/net/home/h05/itpp/git/geovista/src/geovista/__init__.py'>
38+
0.1a1.dev508
39+
40+
$
41+
```
42+
43+
1844
## Start the tutorial
1945
E.G.
2046
```
@@ -38,4 +64,26 @@ $ jupyter lab
3864
or http://127.0.0.1:8888/lab?token=c4ece2e59cd8c81779de0f394c421e22f258f50466cc027e
3965
```
4066
A window should then appear in your browser.
41-
Failing that, visit one of the urls displayed in the terminal output.
67+
Failing that, visit one of the urls displayed in the terminal output.
68+
69+
70+
## Developer notes: to build the lockfile
71+
The lockfile "tutorial_conda_env_resolved.lockfile" is produced from an actual environment.
72+
First build the env from the spec file "tutorial_conda_env.yml" ...
73+
74+
First using a conda env with "mamba" in it : resolve the env + snapshot the package list.
75+
76+
```bash
77+
$ conda activate mamba-env
78+
$ mamba create -n mesh-tutorial --file tutorial_conda_env.yml
79+
$ conda list -n mesh-tutorial --explicit >temp_condalist_explicit.txt
80+
```
81+
82+
Then using a conda env with 'ssstack' in it (https://github.com/MetOffice/ssstack) : generate new 'shareable'-form lockfile.
83+
84+
```bash
85+
$ conda activate ssstack-env
86+
$ ssstack shareable temp_condalist_explicit.txt >tutorial_conda_env_resolved.lockfile
87+
$ rm temp_condalist_explicit.txt
88+
```
89+

TEMP_notes_on_env_dev.txt

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,3 +273,54 @@ Latest overall plan :
273273
- and regrid
274274

275275

276+
======================
277+
Thurs 19th : problems with plotting stability
278+
(1) derived "notebooks/Sec_02_Meshes.py" from the notebook
279+
- and tweaked with
280+
281+
INVESTIGATE...
282+
= testing with above Python
283+
= tweaking the "tutorial_conda_env.yml" + building test envs
284+
285+
bill's
286+
pyvista = 0.36.1
287+
vtk = 9.2.2
288+
289+
cf problem-env (existing mesh-tutorial) :
290+
$ conda list | grep -i "\(vtk\|vista\)"
291+
geovista 0.1.dev1 pyhd8ed1ab_0 https://conda.anaconda.org/conda-forge
292+
ipyvtklink 0.2.3 pyhd8ed1ab_0 https://conda.anaconda.org/conda-forge
293+
pyvista 0.37.0 pyhd8ed1ab_0 https://conda.anaconda.org/conda-forge
294+
pyvistaqt 0.9.0 pyhd8ed1ab_0 https://conda.anaconda.org/conda-forge
295+
vtk 9.2.5 qt_py39h1a3df09_201 https://conda.anaconda.org/conda-forge
296+
297+
w pyvista=0.36 ((did not fully work : window does not close, still dumps))
298+
$ conda list -n meshtut_pv36 | grep -i "\(vtk\|vista\)"
299+
geovista 0.1.dev1 pyhd8ed1ab_0 conda-forge
300+
ipyvtklink 0.2.3 pyhd8ed1ab_0 conda-forge
301+
pyvista 0.36.1 pyhd8ed1ab_0 conda-forge
302+
pyvistaqt 0.9.0 pyhd8ed1ab_0 conda-forge
303+
vtk 9.2.5 qt_py39h99e95b5_202 conda-forge
304+
305+
w vtk=9.2.2
306+
LOOKS GOOD !
307+
$ conda list -n meshtut_vtk9x2x2 | grep -i "\(vtk\|vista\)"
308+
# packages in environment at /tmp/persistent/newconda-envs/meshtut_vtk9x2x2:
309+
geovista 0.1.dev1 pyhd8ed1ab_0 conda-forge
310+
ipyvtklink 0.2.3 pyhd8ed1ab_0 conda-forge
311+
pyvista 0.37.0 pyhd8ed1ab_0 conda-forge
312+
pyvistaqt 0.9.0 pyhd8ed1ab_0 conda-forge
313+
vtk 9.2.2 qt_py39hc075ee6_205 conda-forge
314+
315+
updated with that, and added i-e-r
316+
$ conda list -n mesh-tutorial-revised | grep -i "\(vtk\|vista\)"
317+
geovista 0.1.dev1 pyhd8ed1ab_0 conda-forge
318+
ipyvtklink 0.2.3 pyhd8ed1ab_0 conda-forge
319+
pyvista 0.37.0 pyhd8ed1ab_0 conda-forge
320+
pyvistaqt 0.9.0 pyhd8ed1ab_0 conda-forge
321+
vtk 9.2.2 qt_py39hc075ee6_205 conda-forge
322+
323+
Now updated :
324+
* tutorial_conda_env.yml
325+
* tutorial_conda_env_resolved.lockfile
326+
* README

tutorial_conda_env.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ dependencies:
55
- python=3.9
66
- iris
77
- geovista
8+
- vtk=9.2.2 # experiencing segfaults with latest version
89
- jupyterlab
910
- ipyvtklink
10-
- jupytext
11+
- jupytext=1.14.4 # changing version can cause notebook merge conflicts
1112
- pre-commit
12-
- ugrid-checks
13-
13+
- iris-esmf-regrid
14+
- esmpy=8.3 # iris-esmf-regrid doesn't work with latest, for some reason

0 commit comments

Comments
 (0)