2nd ASTERICS-OBELICS International School
This repository contains all the material needed for the 2st ASTERICS-OBELICS International School on "Advanced software programming for astrophysics and astroparticle physics".
- Get a copy of this repository with
git
- Recommendation for Python install
- Having troubles?
- Jupyter
- IDE: PyCharm
- Chat room
- Tutors
- Resources
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.
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.
-
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
- Ubuntu:
-
Download the Linux
Anaconda
installer for Python 3.6. -
Run the following command line:
bash Anaconda3-5.1.0-Linux-x86_64.sh
-
Accept the License by pressing
<Enter>
, then scrolling down to the bottom using<space>
and writingyes
-
Choose the install location, we recommend
~/.local/anaconda3
instead of~/anaconda3
to not mess up you home too much. -
After the installation, you are asked if you want to add conda to the
PATH
. Answerno
.Do you wish the installer to prepend the Anaconda3 install location to PATH in your /home/username/.bashrc ? [yes|no] [no] >>> no
-
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 theconda
command available. The second command will makeanaconda
your defaultpython
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.
-
Close your current terminal window and open a new one after so the changes to the
.bashrc
can take effect -
Install the Requirements
-
Download the Mac
Anaconda
installer for Python 3.6. -
Run the following command line:
bash Anaconda3-5.1.0-MacOSX-x86_64.sh
-
Accept the License by pressing
<Enter>
, then scrolling down to the bottom using<space>
and writingyes
-
Choose the install location, we recommend
~/.local/anaconda3
instead of~/anaconda3
to not mess up your home too much. -
After the installation, you are asked if you want to add conda to the
PATH
. Answerno
.
Do you wish the installer to prepend the Anaconda3 install location
to PATH in your /home/username/.bashrc ? [yes|no]
[no] >>> no
- 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 theconda
command available. The second command will makeanaconda
your defaultpython
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.
-
Close your current terminal window and open a new one after so the changes to the
.bash_profile
can take effect -
Install the Requirements
There are two possibilities for Windows users:
-
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).
-
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.
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
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.
To launch a Jupyter notebook, simply run the following command:
jupyter notebook
On Windows, see in the above.
We recommend to use pycharm. Free Community Edition: Download PyCharm or opt for a free copy of the Professional Edition under Student License.
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.
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 |
See the links file