Skip to content

Asterics2020-Obelics/School2018

Repository files navigation

School2018

2nd ASTERICS-OBELICS International School

School indico

This repository contains all the material needed for the 2st ASTERICS-OBELICS International School on "Advanced software programming for astrophysics and astroparticle physics".

Table of contents

Get a copy of this repository with git

Clone this repository on your personal computer.

  git clone https://github.com/Asterics2020-Obelics/School2018.git

You will need it before the school to install the different tools, and during the school while attending the hands-on. For Windows, see below.

Recommendation for Python install

You must install Python 3.6 and a few Python libraries. The recommended way to do so is to use Anaconda. The procedure described bellow will help you install what is needed for the school. If you already have Anaconda installed, you may skip to the Library requirements section.

Linux

  1. Install required distribution packages :

    • Ubuntu: sudo apt-get install -y git bzip2 wget
    • Fedora 25: sudo dnf install -y git wget bzip2
    • CERN Scientific Linux 6: sudo yum install -y git tar bzip2 wget
    • CERN CentOS 7: sudo yum install -y git bzip2 wget
  2. Download the Linux Anaconda installer for Python 3.6.

  3. Run the following command line:

     bash Anaconda3-5.1.0-Linux-x86_64.sh
    
  4. Accept the License by pressing <Enter>, then scrolling down to the bottom using <space> and writing yes

  5. Choose the install location, we recommend ~/.local/anaconda3 instead of ~/anaconda3 to not mess up you home too much.

  6. After the installation, you are asked if you want to add conda to the PATH. Answer no.

    Do you wish the installer to prepend the Anaconda3 install location
    to PATH in your /home/username/.bashrc ? [yes|no]
    [no] >>> no
    
  7. Edit your .bashrc to include the first or both of the following two lines you .bashrc. The first line should always be added and makes the conda command available. The second command will make anaconda your default python in the shell, you might want to leave it out, if you use another python installation regularly.

. "$HOME/.local/anaconda3/etc/profile.d/conda.sh"
conda activate

Set the correct path to your anaconda installation. If you do not include the second command, you need to run conda activate before using python for this workshop.

  1. Close your current terminal window and open a new one after so the changes to the .bashrc can take effect

  2. Install the Requirements

Mac

  1. Download the Mac Anaconda installer for Python 3.6.

  2. Run the following command line:

bash Anaconda3-5.1.0-MacOSX-x86_64.sh
  1. Accept the License by pressing <Enter>, then scrolling down to the bottom using <space> and writing yes

  2. Choose the install location, we recommend ~/.local/anaconda3 instead of ~/anaconda3 to not mess up your home too much.

  3. After the installation, you are asked if you want to add conda to the PATH. Answer no.

Do you wish the installer to prepend the Anaconda3 install location
to PATH in your /home/username/.bashrc ? [yes|no]
[no] >>> no
  1. Edit your ~/.bash_profile to include the first or both of the following two lines you ~/.bash_profile. Create the file, if it does not exist. The first line should always be added and makes the conda command available. The second command will make anaconda your default python in the shell, you might want to leave it out, if you use another python installation regularly.
. "$HOME/.local/anaconda3/etc/profile.d/conda.sh"
conda activate

Set the correct path to your anaconda installation. If you do not include the second command, you need to run conda activate before using python for this workshop.

  1. Close your current terminal window and open a new one after so the changes to the .bash_profile can take effect

  2. Install the Requirements

Windows

There are two possibilities for Windows users:

  1. If you have Windows 10 installed, then you can install WLS (Windows Linux Subsystem) which is an Ubuntu Linux distribution. In this case, everything is done from the WLS terminal following the Linux instructions (for Ubuntu).

  2. Alternatively, you can run the Windows Anaconda executable. In this case please use the following instructions:

Instruction for Windows can be found here for the installation of Anaconda. Once installed, you can run Anaconda navigator. To run Jupyter, on the main page of the Anaconda navigator, click on Launch on the Jupyter notebook box. This will open your favorite browser. From there, you can either load a notebook (e.g. from the Git folder) or create a new notebook by clicking new -> Python 3.

When a conda command is required, run it from the Anaconda prompt terminal.

You can also install a Git tool for Windows: Git for Windows. Launch Git GUI or Git bash to get started.

Library requirements

We will use a common environment all along the school. First of all, update conda to be able to use the latest features:

conda update conda

Windows users: run this command (and the followings) from the Anaconda prompt terminal.

To create the environment, you just need to run the following command from the directory where you cloned this School2018 repository (since this repository contains the file environment.yml):

conda env create -f environment.yml

If after the creation the file environment.yml was updated, you can update your installation with:

conda env update -f environment.yml

Once the environment has been created and all dependencies installed, you may activate it with (you will need to do that every time you want to use this environment):

conda activate school18

Note that if you haven't followed the Anaconda installation or have an Anaconda version < 4.4, you will have to run

source activate school18

Having troubles?

If you have any technical issue (e.g. regarding the install), first have a look at the Issues tab and check that the issue has not been solved already (check the closed ones too). If not, please do open an issue (you will need a github account) for each question you may have before or during the school about software install and/or about one of the classes.

You may also ask a question on slack.

Jupyter

To launch a Jupyter notebook, simply run the following command:

jupyter notebook

On Windows, see in the above.

IDE: PyCharm

We recommend to use pycharm. Free Community Edition: Download PyCharm or opt for a free copy of the Professional Edition under Student License.

Chat rooms

Slack chat rooms are available before, during and after the school (you should have received an email with an invitation). If you need to talk to each other during a session, share information, ask questions, you can use the corresponding chat rooms to do so. These chat rooms can also be used by the different tutors to give information or advices before or during the hands-on sessions. You can also start one-to-one chat rooms.

Several channels are available, like General for all discussion/questions about the school, lectures, hands-on, etc. There is also a channel Social to help you to get out together during the evening.

You can get the slack app directly on your phone: Android or Apple. You can also get it for Windows, Mac, or Linux here.

Tutors

The full list of tutors is available here.

Here is the list of tutors for the hands-on sessions, with the additional tutors that would circulate to help participants during the exercises and hands-on.

Hands-on Main tutor(s) Additional tutors
Efficient code design Tammo Jan Dijkema, Zheng Meyer
Git Kai Bruegge, Maximilian Nöthe
Numpy Tamas Gal Frederic Gillardo
Pandas Tamas Gal Frederic Gillardo
Scipy Kai Bruegge, Maximilian Nöthe
PyVO Hendrik Heinl
Debugging & Profiling Christoph Deil
Astropy Axel Donath, Christoph Deil David Kirkby
Machine learning David Kirkby Kai Bruegge, Thomas Vuillaume, Mikaël Jacquemont

Resources

See the links file

2017 edition of the school: program and github