From fea9a1aad3f23f816105e712cbc14146ac4704a0 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Thu, 25 Jul 2024 20:09:01 +0000 Subject: [PATCH] differences for PR #67 --- 01-conda.md | 50 ++++++++++++++------------------------------- 02-visualisation.md | 4 ++-- md5sum.txt | 6 +++--- setup.md | 2 +- 4 files changed, 21 insertions(+), 41 deletions(-) diff --git a/01-conda.md b/01-conda.md index cbd32b7..e173316 100644 --- a/01-conda.md +++ b/01-conda.md @@ -29,7 +29,7 @@ we need to consider what Python libraries are best suited to the task. For reading, writing and analysing data stored in the netCDF file format, atmosphere and ocean scientists will typically do most of their work with either the -[xarray](https://xarray.pydata.org/en/stable/) or [iris](https://scitools.org.uk/iris/) libraries. +[xarray](https://docs.xarray.dev) or [iris](https://scitools-iris.readthedocs.io/) libraries. These libraries are built on top of more generic data science libraries like numpy and matplotlib, to make the types of analysis we do faster and more efficient. To learn more about the PyAOS "stack" shown in the diagram below @@ -54,15 +54,15 @@ a number of scientific Python "distributions" have been released over the years. These come with the most popular data science libraries and their dependencies pre-installed, and some also come with a package manager to assist with installing additional libraries that weren't pre-installed. -Today the most popular distribution for data science is [Anaconda](https://www.anaconda.com/distribution/), +Today the most popular distribution for data science is [Anaconda](https://docs.anaconda.com/anaconda/), which comes with a package (and environment) manager called [conda](https://conda.io/docs/). ## Introducing conda -According to the [latest documentation](https://docs.anaconda.com/anaconda/#anaconda-navigator-or-conda), -Anaconda comes with over 250 of the most widely used data science libraries (and their dependencies) pre-installed. -In addition, there are several thousand more libraries available via the `conda install` command, -which can be executed using the Bash Shell or Anaconda Prompt (Windows only). +According to the [latest documentation]([https://docs.anaconda.com/anaconda/), +Anaconda comes with over 300 of the most widely used data science libraries (and their dependencies) pre-installed. +In addition, there are several thousand more libraries available via the Anaconda Public Repository, +which can be installed by running the `conda install` command the Bash Shell or Anaconda Prompt (Windows only). It is also possible to install packages using the Anaconda Navigator graphical user interface. ::::::::::::::::::::::::::::::::::::::::: callout @@ -93,7 +93,7 @@ OR using Anaconda Navigator: ## Miniconda If you don't want to install the entire Anaconda distribution, -you can install [Miniconda](https://conda.pydata.org/miniconda.html) instead. +you can install [Miniconda](https://docs.anaconda.com/miniconda/) instead. It essentially comes with conda and nothing else. :::::::::::::::::::::::::::::::::::::::::::::::::: @@ -105,8 +105,7 @@ one of the most important features that Anaconda provides is the [Anaconda Cloud](https://anaconda.org) website, where the community can contribute conda installation packages. This is critical because many of our libraries have a small user base, -which means they'll never make it into the top few thousand data science libraries -supported by Anaconda. +which means they'll never make it into the Anaconda Public Repository. You can search Anaconda Cloud to find the command needed to install the package. For instance, here is the search result for the `iris` package: @@ -115,7 +114,7 @@ For instance, here is the search result for the `iris` package: As you can see, there are often multiple versions of the same package up on Anaconda Cloud. To try and address this duplication problem, -[conda-forge](https://conda-forge.github.io/) has been launched, +[conda-forge](https://conda-forge.org/) has been launched, which aims to be a central repository that contains just a single (working) version of each package on Anaconda Cloud. You can therefore expand the selection of packages available via `conda install` @@ -137,7 +136,7 @@ because mixing packages from multiple channels can cause headaches like binary i For these particular lessons we will use `xarray`, but all the same tasks could be performed with `iris`. We'll also install -[`dask`](https://dask.org/) (`xarray` uses this for parallel processing), +[`dask`](https://www.dask.org/) (`xarray` uses this for parallel processing), [`netCDF4`](https://unidata.github.io/netcdf4-python/) (`xarray` requires this to read netCDF files), [`cartopy`](https://scitools.org.uk/cartopy/) (to help with geographic plot projections), [`cmocean`](https://matplotlib.org/cmocean/) (for nice color palettes) and @@ -172,7 +171,7 @@ If you've got multiple data science projects on the go, installing all your packages in the same conda environment can get a little messy. (By default they are installed in the root/base environment.) It's therefore common practice to -[create separate conda environments](https://conda.io/docs/user-guide/tasks/manage-environments.html) +[create separate conda environments](https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html) for the various projects you're working on. For instance, we could create an environment called `pyaos-lesson` for this lesson. @@ -231,20 +230,6 @@ using the YAML file: $ conda env create -f pyaos-lesson.yml ``` -For ease of sharing the YAML file, -it can be uploaded to your account at the Anaconda Cloud website, - -```bash -$ conda env upload -f pyaos-lesson.yml -``` - -so that others can re-create the environment by simply refering to your Anaconda username: - -```bash -$ conda env create damienirving/pyaos-lesson -$ conda activate pyaos-lesson -``` - The ease with which others can recreate your environment (on any operating system) is a huge breakthough for reproducible research. @@ -278,7 +263,7 @@ $ The `>>>` prompt indicates that you are now talking to the Python interpreter. A more powerful alternative to the default Python interpreter is IPython (Interactive Python). -The [online documentation](https://ipython.readthedocs.io/en/stable/) +The [online documentation](https://ipython.readthedocs.io) outlines all the special features that come with IPython, but as an example, it lets you execute bash shell commands without having to exit the IPython interpreter: @@ -342,8 +327,7 @@ Python 3 notebook: ## JupyterLab -The Jupyter team have recently launched -[JupyterLab](https://blog.jupyter.org/jupyterlab-is-ready-for-users-5a6f039b8906) +If you like Jupyter Notebooks you might want to try [JupyterLab](https://jupyterlab.readthedocs.io), which combines the Jupyter Notebook with many of the features common to an IDE. :::::::::::::::::::::::::::::::::::::::::::::::::: @@ -365,10 +349,8 @@ you'll need to install jupyter too.) ::::::::::::::: solution -The [setup menu](https://carpentries-lab.github.io/python-aos-lesson/setup.html) -at the top of the page -contains drop-down boxes explaining how to install the Python libraries -using the Bash Shell or Anaconda Navigator. +The [software installation instructions](https://carpentries-lab.github.io/python-aos-lesson/#software-installation) +explain how to install the Python libraries using the Bash Shell or Anaconda Navigator. ::::::::::::::::::::::::: @@ -412,5 +394,3 @@ import numpy as np - Use conda to install and manage your Python environments. :::::::::::::::::::::::::::::::::::::::::::::::::: - - diff --git a/02-visualisation.md b/02-visualisation.md index 24baa81..baf09f0 100644 --- a/02-visualisation.md +++ b/02-visualisation.md @@ -261,7 +261,7 @@ plt.show() The default colorbar used by matplotlib is `viridis`. It used to be `jet`, -but that was changed a couple of years ago in response to the +but that was changed in response to the [\#endtherainbow](https://www.climate-lab-book.ac.uk/2014/end-of-the-rainbow/) campaign. Putting all the code together @@ -334,7 +334,7 @@ clim.plot.contourf( Rather than plot the annual climatology, edit the code so that it plots the June-August (JJA) season. -(Hint: the [groupby]() functionality can be used to +(Hint: the `groupby` functionality can be used to group all the data into seasons prior to averaging over the time axis) ::::::::::::::: solution diff --git a/md5sum.txt b/md5sum.txt index ee682d5..dfa2208 100644 --- a/md5sum.txt +++ b/md5sum.txt @@ -5,8 +5,8 @@ "helper_lesson_check.md" "1d1b53176140a057b588969f9f60fa61" "site/built/helper_lesson_check.md" "2024-07-25" "index.md" "0e62af27fdd16f8c6f2c9e1fef67e750" "site/built/index.md" "2024-07-25" "paper.md" "32ace9442c642b5e25ce659e7ae9df72" "site/built/paper.md" "2024-07-25" -"episodes/01-conda.md" "a6686033d7b73c398bf6f559e29b0065" "site/built/01-conda.md" "2024-07-25" -"episodes/02-visualisation.md" "1e0da181aa29d53a614a7358d5379434" "site/built/02-visualisation.md" "2024-07-25" +"episodes/01-conda.md" "6145214a159aca5d93d996ce060b6fc2" "site/built/01-conda.md" "2024-07-25" +"episodes/02-visualisation.md" "a12f74e55346ec75d7fc4a945ab028c5" "site/built/02-visualisation.md" "2024-07-25" "episodes/03-functions.md" "5f76d28ee961529d9fdf812a01cc5e81" "site/built/03-functions.md" "2024-07-25" "episodes/04-cmdline.md" "ba7a163f8c93824a88a42045723108c6" "site/built/04-cmdline.md" "2024-07-25" "episodes/05-git.md" "6b10244dccd7f145ba1ad6c915ac06b8" "site/built/05-git.md" "2024-07-25" @@ -17,5 +17,5 @@ "episodes/10-large-data.md" "909dba426cb9409b6124181662c31af4" "site/built/10-large-data.md" "2024-07-25" "instructors/instructor-notes.md" "858a8aea24f020d8732ac71b2601f2e6" "site/built/instructor-notes.md" "2024-07-25" "learners/reference.md" "4e0dcbc7892af6f9610d44d356e66617" "site/built/reference.md" "2024-07-25" -"learners/setup.md" "d86e41df032ef642f234e5014b28178a" "site/built/setup.md" "2024-07-25" +"learners/setup.md" "67749e8099ace68108310de95ec0a636" "site/built/setup.md" "2024-07-25" "profiles/learner-profiles.md" "60b93493cf1da06dfd63255d73854461" "site/built/learner-profiles.md" "2024-07-25" diff --git a/setup.md b/setup.md index 2e8283b..8d9da68 100644 --- a/setup.md +++ b/setup.md @@ -42,7 +42,7 @@ The Carpentries maintain a list of common issues on their :::::::::::::::::::::::::::::::::::::::::::::::::: Your workshop instructor may also ask that you install the python packages introduced in the -[first lesson](https://carpentries-lab.github.io/python-aos-lesson/01-conda/index.html) +[first lesson](https://carpentries-lab.github.io/python-aos-lesson/01-conda.html) ahead of time. You can do this via the command line or by using the Anaconda Navigator: