This repository contains all the material needed for the 3rd ASTERICS-OBELICS International School on "Advanced software programming for astrophysics and astroparticle physics".
- Install
git
and other tools - Get a copy of this repository with
git
- Recommendation for Python install
- Having troubles?
- Jupyter
- IDE: PyCharm
- Julia
- Chat room
- Tutors
- Resources
- 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
- ARCH:
sudo pacman -S git bzip2 wget
- Ubuntu:
Install git and other development tools by running
xcode-select --install
You should tell git who you are:
git config --global user.name 'John Doe'
git config --global user.email '[email protected]'
Clone this repository on your personal computer.
git clone https://github.com/Asterics2020-Obelics/School2019.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 below will help you install what is needed for the school. If you already have Anaconda installed, you may skip to the Library requirements section.
-
Download the Linux
Anaconda
installer for Python 3.7. -
Run the following command line in the directory with the file you downloaded:
bash Anaconda3-2018.12-Linux-x86_64.sh -b -p $HOME/.local/anaconda3
- 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.7. -
Run the following command line in the directory with the file you downloaded:
bash Anaconda3-2018.12-MacOSX-x86_64.sh -b -p $HOME/.local/anaconda3
- 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 WSL 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 School2019 repository (since this repository contains the file environment.yml
):
conda env create -f environment.yml
For the c++ tutorial, we are going to need compiler tools. For Linux and Windows with the WSL run
conda activate school19
conda install gcc_linux-64 gxx_linux-64 gfortran_linux-64
For macos we will just use the system compiler (clang
).
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 school19
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, a full python IDE. Free Community Edition: Download PyCharm or opt for a free copy of the Professional Edition under Student License.
A more flexible text editor with good python integration is VS Code: https://code.visualstudio.com.
There will be a short talk (in form of a live demonstration) on the Julia Language. If you are interested and want to follow along, download the package here: https://julialang.org/downloads/
If you don't want to install anything but still eager to try Julia, you can spawn a Jupyter notebook on JuliaBox for free.
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.
See the links file
Complete Python tutorials:
Workshops: