Skip to content

Commit

Permalink
deploy: 92013fc
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelSchulzMETNO committed May 5, 2024
0 parents commit 745d99e
Show file tree
Hide file tree
Showing 251 changed files with 88,309 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .buildinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: ada198080068ac74d00bcd575d0c6d13
tags: d77d1c0d9ca2f4c8421862c7c5a0d620
Empty file added .nojekyll
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/clone-repo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/fork-create.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/fork_button.png
Binary file added _images/git_ico.png
Binary file added _images/gui-credentials.png
Binary file added _images/issues-tab.png
Binary file added _images/new-issue.png
Binary file added _images/new-pr.png
Binary file added _images/pr-tab.png
Binary file added _images/push-pull-gui.png
Binary file added _images/repo-tab.png
Binary file added _images/spon_comb_dark.png
Binary file added _images/spon_comb_light.png
10 changes: 10 additions & 0 deletions _sources/basics/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Jupyterhub basic usage
======================


.. toctree::
:maxdepth: 1

start_stop
lab
kernels
80 changes: 80 additions & 0 deletions _sources/basics/kernels.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
Using different kernels in notebooks
====================================


.. note::
We are using ``mamba`` here which is a drop in replacement for ``conda`` that is generally faster. All commands that work with ``mamba`` should also work with ``conda``.

We provide different conda environments as kernels for processing jupyternotebooks.
You can see them in the launcher when you create a new notebook or choose one in the drop-dowmn menu in the top right corner.
If you want to check which packages are included in the environment you can find the names of the environments available by doing: ``mamba env list``.
To list packages and their versions within the environment use the following command: ``mamba env export -n environment_name --no-builds``.

Available kernels
-----------------

- **minimal**: bare python3.11 environment
- **base**: contains basic packages (mostly not useful for data processing)
- **pangeo-notebook**: environment, built from `Pangeo nootbook v2024.04.05 <https://github.com/pangeo-data/pangeo-docker-images/tree/2024.04.05/pangeo-notebook>`_ extended with ``rioxarray``, ``pyrcel`` and ``geocat`` packages.
- **ml-notebook**: environment, built from `Pangeo ml-nootbook v2024.04.05 <https://github.com/pangeo-data/pangeo-docker-images/tree/2024.04.05/ml-notebook>`_ with added packages:

.. code-block::
'gpflow'
'scikit-learn'
'tf-keras'
'tensorflow-probability'
'tensorflow'
'iris'
'tqdm'
'cis'
'ESEM'
'pyaro'
- **pyaero-notebook**: This `environment <https://raw.githubusercontent.com/metno/pyaerocom/v0.17.1/pyaerocom_env.yml>`_ includes various packages for ``pyaerocom``.

.. warning::

This is environment contains older versions of packages to allow the latest ``pyaerocom`` to work. If you don't require any specific packages from this environment,
you should use the ``pangeo-notebook`` or ``ml-notebook`` kernel instead.

..
.. code-block::
..
'pycel'
'ipykernel'
'scikit-learn'
'netcdf4'
'xarray'
'pyngl'
'proplot'
'cartopy'
'rioxarray'
'pandas'
'proplot'
'seaborn'
'cis'


Using the conda environments outside of the course
--------------------------------------------------

.. note::

Too learn more about what conda does and how to make your data analysis reproduce able, check out the code-refinery lesson on `conda-for-data-scientists <https://carpentries-incubator.github.io/introduction-to-conda-for-data-scientists/01-getting-started-with-conda/index.html>`_.


You can also pipe it to a file to view later or to create same environment somewhere else: ``mamba env export -n <environment name> > environment.yml``. To leave out the build information use add ``--no-builds``.
To create an environment out of this file: ``mamba -n environment_name -f environment.yml``.



.. attention::
:class: toggle
:name: Platform specific environments

The exported environment may be platform specific, f.e. you will see ``platform: linux-64``.
Recreating the environment on another platform might not work since some of the packages might not be available for your target platform.
In that case, it's recommended to use containers to reproduce the environment. However it is possible to export platform independent environments by using the ``--no-builds``.
Furthermore, conda-lock can be used to create a lock file that solves the dependencies for different platforms and can then be used to recreate the environment on another platform.
57 changes: 57 additions & 0 deletions _sources/basics/lab.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
The JupyterLab Interface
========================

By default, you will get the web-based user interface for Project Jupyter that is called `JupyterLab <https://jupyterlab.readthedocs.io/en/stable/>`_.

Menu Bar
--------

The menu bar at the top of JupyterLab has top-level menus that expose actions available in JupyterLab with
their keyboard shortcuts. The default menus are:

- **File**: actions related to files and directories
- **Edit**: actions related to editing documents and other activities
- **View**: actions that alter the appearance of JupyterLab
- **Run**: actions for running code in different activities such as notebooks and code consoles
- **Kernel**: actions for managing kernels, which are separate processes for running code
- **Tabs**: a list of the open documents and activities in the dock panel
- **Settings**: common settings and an advanced settings editor
- **Help**: a list of JupyterLab and kernel help links

Left Sidebar
------------

The left sidebar contains a number of commonly-used tabs, such as a file browser, a list of running
kernels and terminals, the command palette, and a list of tabs in the main work area:



If you move your mouse on the other icon of this left sidebar, a short information is given on its functionality.

If you click on the "stop button" icon, you can see what is currently running on your server and you can click on
"SHUT DOWN" to stop a running Python notebook or Terminal.

### Start a new Terminal

Similarly, you can start a new Terminal by clicking on "Terminal" in the Launcher.


Tips
----
If the **Launcher** tab does not exist
anymore in your JupyterLab, you can start a new one in "**File** --> **New Launcher**".



Create a new python 3 notebook
------------------------------

Go back to the **File Browser** left sidebar tab and in the launcher select **Python 3** under the Notebook
section:


By default, your new notebook is named as "**Untitled.ipynb**":

- **ipynb** is the extension for any Jupyter notebook and you should make sure all your notebooks get this extension (otherwise it is not recognized as a Jupyter notebook)
- you can rename your jupyter notebook with the tab "File --> Rename Notebook..." or
right click on its name.
19 changes: 19 additions & 0 deletions _sources/basics/start_stop.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Starting and stopping your server
=================================

Your Jupyterhub tab should have the following panels:


To start/stop your server, click "**File** --> **Hub Control Panel**":

When your server is not running, the button "Stop My Server" does not appear and you only see the button "My Server".

- To stop your server, click on "Stop My Server"
- To start your server, click on "My Server"

.. Warning ::
Don't forget to "**Stop My Server**" after you are done to free resources
43 changes: 43 additions & 0 deletions _sources/contrib.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Contribute to this page



## The recommended workflow for development
1. Fork the repository to your Github account and fetch upstream to receive the newest commits.
2. Alternatively, you should just clone this repo if you are part of the **eScience2024** team, this way the branches you create will get
3. Perform the development in a newly-created branch (other than `master`) in your repository.
4. Note that since we are using `myst-parser` both `.rst` and `.md` can be used.
5. Build the page in the command line to test the introduced modifications by following the instructions below.

### Locally build this page
Before filling a pull-request you should check that the changes introduced by you still make the site build. Therefore, you should always [build and test locally](https://coderefinery.github.io/sphinx-lesson/contributing-to-a-lesson/#build-and-test-locally) before you ask for a pull request.

To automatically update the documentation locally during development:
```
$[~/PROJECT_ROOT] sphinx-autobuild docs/ _build
```
Using venv or conda is highly recommended. Also, when you are pulling from `master`, please don't forget to update your environment with `pip install -r requirements.txt` since those might have been changed since you last built the page locally.

## After you are done with your changes:

1. Merge or rebase on `upstream/master` (`master` if you work within this repo) and resolve conflicts.
2. Check with `sphinx-autobuild` to see if the page builds and looks as intended.
3. Create a pull request to the `master` branch. Give a short description of what you have added.

The static webpage is hosted on Github and automatically built by pushing changes to the `master` branch. The built webpage is displayed when selecting the `gh-pages` branch. This process is automatic. A guide to the principles can be found [here](https://pythonrepo.com/repo/executablebooks-sphinx-autobuild-python-documentation).

If you have any questions, look in the Issues (including closed), if you don't find an answer - create a new one.

> **NOTE** If workflow above is too hard for you, there is a Github button in the top-right corner.


## Reviewing PRs
1. Checkout branch that is getting pulled.
2. Build locally.
3. Add commits locally to fix things.
4. Add comments in the pull request.
5. Merge the PR (if you have rights and are happy with the changes).

The web-page will get updated in a few minutes through github actions.

9 changes: 9 additions & 0 deletions _sources/course_workflow/data.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Sharing data
============

Small size data (\<10 Mb) can be shared directly through the `eScience2024-projects repo <https://github.com/MetOs-UiO/eScience2024-projects>`_.

Larger data will be put into read-only ``~/shared-craas1-nn9989k-geo4992/data/`` by request (ask @mvdebolsiy to copy it there).

If you want to share something real quick with members of your group: you can access other user's home directories at ``~/shared-craas1-ns9989k-geo4992/dataporten-home/fc-3auid-3a<feide-user-id>/``.
These folders are read-only for everyone except the owner.
10 changes: 10 additions & 0 deletions _sources/course_workflow/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Workflow for eScience2024 course
================================


.. toctree::
:maxdepth: 2

workflow
rules
data
12 changes: 12 additions & 0 deletions _sources/course_workflow/rules.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Basic Rules for the course
==========================



#. Write your scripts/notebooks into the clone of your eScience2024-projects fork.
#. Work in your ``Group#`` subfolder in the clone (or even a subsubfolder for your work, one level deeper) to reduce number of potential conflicts when merging.
#. If there are files that are automatically created in that folder that should not be tracked, update `.gitignore`
#. Do not store data in that folder unless it is \< 10 Mb. See :doc:`Sharing Data <./data>`.
#. Do not download large number of files/large datasets into your home directory.
#. Do not try to make files in the read-only folders (you will get errors on save). Mind where your File browser is when making new notebook/starting new Launcher.
#. Make issues in this repo, See :doc:`Contribute to this page <../contrib>`.
94 changes: 94 additions & 0 deletions _sources/course_workflow/workflow.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
Basic setup
===========


1. Fork projects repository
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. |fbutton| image:: img/fork_button.png

Before you start working on your group projects. You should fork `eScience2024-projects repo <https://github.com/MetOs-UiO/eScience2024-projects>`_.
To make a fork, go to the repo page. There you will see a ``fork`` button |fbutton|. Click on it to create a copy of this repository in your github user space.
**Uncheck** ``Copy the main branch only`` if you do not want to miss on other branches currently on the original repo.

.. image:: img/fork-create.png
:width: 700
:alt: Fork Creation page

2. Get GitGub Access token
~~~~~~~~~~~~~~~~~~~~~~~~~~

From `GitHub documentation <https://docs.github.com/en/[email protected]/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens>`_.

- Go to Github.
- Click on your your profile image in the top-right.
- Click ``Settings``
- Click ``Developer Settings``
- Click ``Personel access tokens->Tokens (classic)``
- Click ``Generate new token``
- Click ``Generate new token (classic)``
- Authenticate
- Make a note
- Click on ``repo``, ``user``
- Click ``generate``
- Save token somewhere, treat it as a password

3. Setup git and clone on jupyterhub
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

After you have forked the projects repo you should login to `Jupyterhub <https://escience2024.craas1.sigma2.no>`_.
There, you would need to clone your fork and create your first branch you would be working on. See :doc:`Starting with git on the jupyterhub <../git_integration/git_jlab>`.

.. attention::
:class: toggle

If you have already accessed `test sever <https://escience2024-test.craas1.sigma2.no>`_, you should move to `<https://escience2024.craas1.sigma2.no>`_.
Test server is only there for testing and will get shutdown.

- Open terminal through Launcher.
- Type this commands filling in your **github** username and email (without ``<>``):

.. code-block:: bash
git config --global user.name "<your_username>"
git config --global user.email "<your_email>"
- Clone **your fork** of projects repository:

.. code-block:: bash
git clone https://github.com/<your_username>/eScience2024-projects
- Go into your clone:

.. code-block:: bash
cd eScience2024-projects
- Add upstream repository (See :doc:`Setting up remotes <../git_integration/remotes>`):

.. code-block:: bash
git remote add upstream https://github.com/MetOs-UiO/eScience2024-projects
git fetch --all
- Make your first branch with a sensible name (what are you going to work on):

.. code-block:: bash
git checkout upstream/master
git switch -c <sensible-branch-name>
git push <sensible-branch-name> origin/<sensible-branch-name>
4. Sharing your work within the group
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Within your fork, you should put all your code in your ``Group#`` folder.

When you need to share your work with the others within your group you need to make a :doc:`Pull Request <../git_integration/github-work>` to the `upstream repo <https://github.com/MetOs-UiO/eScience2024-projects>`_ ``main`` branch.

After a Teaching assistant responsible for you group has merged your PR to ``upstream/main`` other members of your group can pull these changes into branches on their forks to work on.

In addition, you will most likely want to create new branches based on the updated ``upstream/main``. See :doc:`Setting up remotes <../git_integration/remotes>`.
12 changes: 12 additions & 0 deletions _sources/data/ACTRIS-data.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
ACTRIS data
===========

Access via thredds server from NILU
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Check examples 5-11 in ACTRIS Virtual Research Environment repository
`ACTRIS and EBAS example notebooks <https://github.com/ACTRIS-Data-Centre/actris-jupyter-hub>`_


Check availability via ACTRIS web interface
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
https://ebas-data.nilu.no
Loading

0 comments on commit 745d99e

Please sign in to comment.