Skip to content

Commit

Permalink
Merge pull request #62 from neuromatch/release-v0.2.0
Browse files Browse the repository at this point in the history
Release v0.2.0
  • Loading branch information
iamzoltan authored Jun 17, 2024
2 parents 8915c97 + 8f328c2 commit 0406696
Show file tree
Hide file tree
Showing 35 changed files with 12,632 additions and 185 deletions.
12 changes: 12 additions & 0 deletions .github/actions/check-notebooks/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ inputs:
required: false
default: false
type: string
cdsapi_uid:
description: 'CDSAPI UID'
required: true
cdsapi_key:
description: 'CDSAPI Key'
required: true

runs:
using: composite
Expand Down Expand Up @@ -47,6 +53,8 @@ runs:
if: "!contains(env.COMMIT_MESSAGE, 'skip ci')"
id: changed-files
uses: tj-actions/changed-files@v35
with:
files_ignore: projects/archive/*

- name: List all changed files
run: |
Expand Down Expand Up @@ -79,6 +87,10 @@ runs:
id: process_notebooks
if: ${{ env.NBS != '' }}
run: |
# process notebooks
# add cdsapi credentials for projects
echo "url: https://cds.climate.copernicus.eu/api/v2" >> /home/runner/.cdsapirc
echo "key: ${{ inputs.cdsapi_uid }}:${{ inputs.cdsapi_key }}" >> /home/runner/.cdsapirc
python ci/process_notebooks.py ${{ env.NBS }} ${{ inputs.exec_flag}}
shell: bash -l {0}

Expand Down
6 changes: 5 additions & 1 deletion .github/actions/setup/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,16 @@ runs:
- name: Update environment
if: ${{steps.cache-python.outputs.cache-hit != 'true' || inputs.force_env_update == 'true'}}
run: |
# Install python dependencies
# mamba env update -n climatematch -f environment.yml
pip install -r ci/requirements.txt
pip install -r requirements.txt
pip install ecmwflibs
pip install eccodes==1.3.1
pip install cfgrib
python -m cfgrib selfcheck
pip install requests aiohttp
pip install jupyter-book==0.14.0 ghp-import cftime pyleoclim importlib-metadata==4.13.0
# pip install climlab==0.8.2
shell: bash -l {0}

- name: Build climlab from source
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/notebook-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ jobs:
# exec_flag: '--check-only'
exec_flag: '--execute'
# exercise-continue-on-error: true
cdsapi_uid: ${{ secrets.CDSAPI_UID }}
cdsapi_key: ${{ secrets.CDSAPI_KEY }}

# - name: Add PR comment
# if: ${{ env.NBS != '' }}
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
book/_build/
*.grib
*.idx
*.nc
*.csv
.ipynb_checkpoints/
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"cells": [
{
{
"cell_type": "markdown",
"metadata": {
"execution": {}
Expand Down Expand Up @@ -554,7 +554,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.11"
"version": "3.9.16"
}
},
"nbformat": 4,
Expand Down
File renamed without changes.
85 changes: 58 additions & 27 deletions projects/keynote.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
{
"cell_type": "markdown",
"id": "347f0ae5",
"metadata": {},
"metadata": {
"execution": {}
},
"source": [
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/neuromatch/climate-course-content/blob/main/tutorials/W2D2_ProjectsDay/W2D2_Intro.ipynb) &nbsp; <a href=\"https://kaggle.com/kernels/welcome?src=https://raw.githubusercontent.com/neuromatch/climate-course-content/main/tutorials/W2D2_ProjectsDay/W2D2_Intro.ipynb\" target=\"_parent\"><img src=\"https://kaggle.com/static/images/open-in-kaggle.svg\" alt=\"Open in Kaggle\"/></a>"
]
Expand Down Expand Up @@ -35,9 +37,9 @@
"execution": {}
},
"source": [
"Today marks the transition point from our study of the physical aspect of the climate system and climate change to the socio-economic effects of climate change as well as mitigation and adaptation strategies. You will start the day learning about individual and collective action.\n",
"Today marks the last day of an intense week, where we covered the study of the physical aspect of the climate system and climate change and its socio-economic effects as well as mitigation and adaptation strategies. You will start the day learning about individual and collective action.\n",
"\n",
"What is it that we can expect from climate change in the future? How do do energy and food systems specifically contribute to climate change and what can we do to minimize this contribution? In his lecture, Dr Paul Behrens is talks about what choices we can make as individuals and as societies to improve the chances for a better future.\n",
"What is it that we can expect from climate change in the future? How do energy and food systems specifically contribute to climate change and what can we do to minimize this contribution? In his lecture, Dr. Paul Behrens talks about what choices we can make as individuals and as societies to improve the chances for a better future. \n",
"You will then focus the rest of your day on advancing your research projects. There will be no tutorials."
]
},
Expand All @@ -59,7 +61,22 @@
"cellView": "form",
"execution": {}
},
"outputs": [],
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "fc4d62174a794907b031880e6fb2795c",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Tab(children=(Output(), Output()), selected_index=0, titles=('Youtube', 'Bilibili'))"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# @markdown\n",
"\n",
Expand Down Expand Up @@ -127,38 +144,52 @@
"cellView": "form",
"execution": {}
},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"If you want to download the slides: https://osf.io/download/3tc2h/\n"
]
},
{
"data": {
"text/html": [
"\n",
" <iframe\n",
" width=\"854\"\n",
" height=\"480\"\n",
" src=\"https://mfr.ca-1.osf.io/render?url=https://osf.io/3tc2h/?direct%26mode=render%26action=download%26mode=render\"\n",
" frameborder=\"0\"\n",
" allowfullscreen\n",
" \n",
" ></iframe>\n",
" "
],
"text/plain": [
"<IPython.lib.display.IFrame at 0x7f5df4e47520>"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# @markdown\n",
"from ipywidgets import widgets\n",
"# @title Slides\n",
"# @markdown These are the slides for the videos in all tutorials today\n",
"from IPython.display import IFrame\n",
"\n",
"link_id = \"3tc2h\"\n",
"\n",
"download_link = f\"https://osf.io/download/{link_id}/\"\n",
"render_link = f\"https://mfr.ca-1.osf.io/render?url=https://osf.io/{link_id}/?direct%26mode=render%26action=download%26mode=render\"\n",
"# @markdown\n",
"out = widgets.Output()\n",
"with out:\n",
" print(f\"If you want to download the slides: {download_link}\")\n",
" display(IFrame(src=f\"{render_link}\", width=730, height=410))\n",
"display(out)"
"print(f\"If you want to download the slides: https://osf.io/download/{link_id}/\")\n",
"IFrame(src=f\"https://mfr.ca-1.osf.io/render?url=https://osf.io/{link_id}/?direct%26mode=render%26action=download%26mode=render\", width=854, height=480)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "9f88fae3",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"colab": {
"collapsed_sections": [],
"include_colab_link": true,
"name": "W2D1_Intro",
"name": "keynote",
"toc_visible": true
},
"kernel": {
Expand All @@ -181,7 +212,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.8"
"version": "3.9.19"
}
},
"nbformat": 4,
Expand Down
Loading

0 comments on commit 0406696

Please sign in to comment.