Skip to content

Commit ec299bf

Browse files
authored
Clean up landing page + instructions (#72)
* link to user survey * add get-started * tutorial text in logo * add pint to environment * fix build errors * move going deeper to reference section * use grid on landing page, simplify titles * reset cache
1 parent 3056272 commit ec299bf

23 files changed

+1364
-1904
lines changed

.github/actions/setupconda/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ runs:
1717
- name: Setup Mambaforge
1818
uses: conda-incubator/setup-miniconda@v2
1919
with:
20-
miniforge-version: 4.12.0-0
20+
miniforge-version: latest
2121
miniforge-variant: Mambaforge
2222
use-mamba: true
2323
auto-update-conda: false
@@ -28,7 +28,7 @@ runs:
2828
id: cache-env
2929
uses: actions/cache@v3
3030
env:
31-
CACHE_NUMBER: 0
31+
CACHE_NUMBER: 1
3232
with:
3333
path: ${{ env.CONDA }}/envs
3434
key: conda-environment-${{ env.CACHE_NUMBER }}-${{ hashFiles('conda/conda-lock.yml') }}

.github/workflows/main.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ jobs:
2222
uses: actions/cache@v3
2323
with:
2424
path: _build
25-
# NOTE: change key to "jupyterbook-N+1" to force rebuilding cache
26-
key: jupyterbook-0
25+
# NOTE: change key to "jupyterbook-DATE" to force rebuilding cache
26+
key: jupyterbook-20220617
2727

2828
- uses: ./.github/actions/setupconda
2929

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
[![Jupyter Book Badge](https://jupyterbook.org/badge.svg)](https://tutorial.xarray.dev)
55
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/xarray-contrib/xarray-tutorial/HEAD?urlpath=lab)
66

7-
This is the repository for a JupyterBook website with tutorial material for [Xarray](https://github.com/pydata/xarray), _an open source project and Python package that makes working with labelled multi-dimensional arrays simple, efficient, and fun!_
7+
This is the repository for a Jupyter Book website with tutorial material for [Xarray](https://github.com/pydata/xarray), _an open source project and Python package that makes working with labelled multi-dimensional arrays simple, efficient, and fun!_
88

99
The website is hosted at https://tutorial.xarray.dev
1010

@@ -22,7 +22,7 @@ You can also run these notebooks on your own computer! We recommend using [`cond
2222
git clone https://github.com/xarray-contrib/xarray-tutorial.git
2323
cd xarray-tutorial
2424

25-
conda-lock install -f conda/conda-lock.yml --name xarray-tutorial
25+
conda-lock install conda/conda-lock.yml --name xarray-tutorial
2626
# Or latest package versions: `mamba env create -f conda/environment-unpinned.yml`
2727

2828
conda activate xarray-tutorial

_config.yml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,20 @@
11
# Learn more at https://jupyterbook.org/customize/config.html
2-
title: Xarray tutorial
3-
author: the Xarray community
2+
title: ''
3+
author: The Xarray Community
44
copyright: '2022'
55
logo: images/logo.png
66
only_build_toc_files: true
77

8+
# See https://jupyterbook.org/customize/config.html#add-a-link-to-your-repository
9+
html:
10+
# NOTE: this announcement shows up on all pages
11+
announcement: 'ℹ️ The 2022 Xarray User Survey is out! Please take ~5 minutes to help improve Xarray! <a href="https://docs.google.com/forms/d/e/1FAIpQLSfnMd8UsC1XP1lPuFczl148VfpmwnFu4a0Z94odt1L6U0R0Pw/viewform">LINK</a>'
12+
home_page_in_navbar: false
13+
use_edit_page_button: true
14+
use_issues_button: true
15+
use_repository_button: true
16+
# google_analytics_id: G-XXXXXXXXX
17+
818
parse:
919
# https://jupyterbook.org/content/content-blocks.html?highlight=myst%20substitution#define-substitutions-for-your-whole-book
1020
# https://jupyterbook.org/content/content-blocks.html#using-substitutions-in-links
@@ -50,10 +60,3 @@ bibtex_bibfiles:
5060
sphinx:
5161
config:
5262
bibtex_reference_style: author_year # or label, super, \supercite
53-
54-
# See https://jupyterbook.org/customize/config.html#add-a-link-to-your-repository
55-
html:
56-
use_edit_page_button: true
57-
use_issues_button: true
58-
use_repository_button: true
59-
# google_analytics_id: G-XXXXXXXXX

_toc.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ format: jb-book
44
parts:
55
- caption: Overview
66
chapters:
7+
- file: overview/get-started.md
78
- file: overview/xarray-in-45-min
89
- caption: Fundamentals
910
chapters:
10-
- file: fundamentals/00_overview
1111
- file: fundamentals/01_datastructures_and_io
1212
- file: fundamentals/02.1_working_with_labeled_data
1313
sections:
@@ -66,5 +66,7 @@ parts:
6666

6767
- caption: Reference
6868
chapters:
69+
- file: reference/resources
6970
- file: reference/glossary
7071
- file: reference/bibliography
72+
- file: reference/acknowledgements

conda/README.md

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
1-
# Install unpinned environment:
2-
3-
```
4-
mamba env create -f environment-unpinned.yml
5-
mamba activate xarray-tutorial
6-
```
1+
# Instructions for environment management
72

83
## Install locked environment:
94

10-
https://github.com/conda-incubator/conda-lock
5+
`conda-lock` can be used to create a multi-platform lockfile, so a reproducible set of package versions is installed across different operating systems. https://conda-incubator.github.io/conda-lock/
116

127
```
138
conda-lock install
@@ -21,9 +16,20 @@ conda-lock install
2116
conda-lock lock --mamba -f environment-unpinned.yml -p osx-64 -p linux-64 -p win-64 -p osx-arm64
2217
```
2318

24-
## Render a mybinder.org compatible locked file
19+
## Render a mybinder.org compatible environment.yml (linux-64)
2520

2621
```
2722
conda-lock render -k env
2823
mv conda-linux-64.lock.yml environment.yml
2924
```
25+
26+
## Install unpinned environment:
27+
28+
If you want to run tutorials with the latest versions of compatible packages
29+
30+
If you need to install mamba see https://github.com/conda-forge/miniforge#mambaforge
31+
32+
```
33+
mamba env create -f environment-unpinned.yml
34+
mamba activate xarray-tutorial
35+
```

0 commit comments

Comments
 (0)