Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
jonas-eschle authored Nov 9, 2023
2 parents 8c9806c + 277d642 commit b3d509b
Show file tree
Hide file tree
Showing 21 changed files with 1,882 additions and 396 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,30 @@
name: Build webpage

on: [push, pull_request]
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true

on:
pull_request:
push:
tags:
- "*"
branches:
- master

jobs:
build-pages:
if: github.event_name == 'pull_request' || github.repository == 'hsf-training/analysis-essentials'
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- uses: conda-incubator/setup-miniconda@v2
with:
mamba-version: "*"
channels: conda-forge,defaults
python-version: 3.8
python-version: 3.11
environment-file: environment.yml
activate-environment: analysis-essentials

Expand Down
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-added-large-files
args: ['--maxkb=1000']
Expand All @@ -17,11 +17,11 @@ repos:
rev: 1.7.0
hooks:
- id: nbqa-isort
additional_dependencies: [ isort==5.6.4 ]
additional_dependencies: [ isort ]

- id: nbqa-pyupgrade
additional_dependencies: [ pyupgrade==2.7.4 ]
args: [ --py37-plus ]
additional_dependencies: [ pyupgrade ]
args: [ --py38-plus ]
#
# - repo: https://github.com/ambv/black
# rev: 21.9b0
Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ In exchange,
we will address your issues and/or assess your change proposal as promptly as we can,
and help you become a member of our community.
Everyone involved in [HSF training][hsf-training]
agrees to abide by our [code of conduct](CODE_OF_CONDUCT.md).
agrees to abide by our [code of conduct](CONDUCT.md).

## How to Contribute

Expand Down Expand Up @@ -49,12 +49,12 @@ There are many ways to contribute,
from writing new exercises and improving existing ones
to updating or filling in the documentation
and submitting [bug reports][issues]
about things that do not work, aren not clear, or are missing.
about things that do not work, are not clear, or are missing.
If you are looking for ideas, please see the 'Issues' tab for
a list of issues associated with this repository,
or you may also look at all issues in [hsf-training][hsf-training-issues]

There is also [a list](hsf-training-gfis) of all issues that are particularly easy and suitable
There is also [a list][hsf-training-gfis] of all issues that are particularly easy and suitable
for first contributions.

Comments on issues and reviews of pull requests are just as welcome:
Expand Down
1 change: 1 addition & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

# Instructional Material

All instructional material is made available under the [Creative Commons
Expand Down
39 changes: 24 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Analysis essentials [![Build Status](https://api.travis-ci.org/hsf-training/analysis-essentials.svg?branch=master)](https://travis-ci.org/hsf-training/analysis-essentials) [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/hsf-training/analysis-essentials/master)
# Analysis essentials [![Build Status]([https://github.com/hsf-training/analysis-essentials/actions/workflows/build.yml/badge.svg](https://github.com/hsf-training/analysis-essentials/actions/workflows/build.yml/badge.svg))](https://github.com/hsf-training/analysis-essentials/actions/workflows/build.yml/badge.svg) [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/hsf-training/analysis-essentials/master)


This is the source material for the [analysis essentials website][website], a
Expand All @@ -19,29 +19,36 @@ There are two options for running these lessons. Running locally should be prefe

### Local

This tutorial uses `Python 3.7` and requires some packages.
It is recommended to use [Conda](https://docs.conda.io/en/latest/) to install the correct packages.
This tutorial uses `Python 3.11` and requires some packages.
It is recommended to use [mambaforge](https://github.com/conda-forge/miniforge#mambaforge) to install the correct packages.
**Note:** `mamba` is like `conda` and can be used interchangeably. "forge" in the name refers to the [conda-forge](https://conda-forge.org/) channel, _the_ open-source maintained channel which contains a lot of packages.

To install `Conda` you will need to do the following:
To install `Conda`/`mamba` you will need to do the following:

- Install `Conda` according to the instructions [here](https://docs.conda.io/projects/conda/en/latest/user-guide/install/index.html#installing-in-silent-mode)
- You can add `source /my/path/for/miniconda/etc/profile.d/conda.sh` to your `.bashrc`
- Add the channel:
- Install `mamba` according to the instructions [here](https://github.com/conda-forge/miniforge#install)
- To add `mamba`/`conda` to your shell, follow the instructions after the installation and execute
```bash
conda config --add channels conda-forge
mamba init
```
- In order no not use the base environment (which you almost never should), do
```bash
conda config --set auto_activate_base false
```

Now to use your first ```Conda``` environment:
- Create an environment with some packages already installed:

Now to use your first ```Conda/Mamba``` environment:

- This will install the above packages. In order to make sure that you install all of the packages needed in the tutorial, you can use the `environment.yml` file (make sure that the file `environment.yml` is in the current directory):
```bash
conda create -n my-analysis-env python=3.7 jupyterlab ipython matplotlib uproot numpy pandas scikit-learn scipy tensorflow xgboost hep_ml wget
mamba env create -f environment.yml
```
- Activate your environment by doing: `conda activate my-analysis-env`
- You can install additional packages by doing: `conda install package_name`
- For the lessons to work fully you will also need to install a special helper package with pip:
- Alternatively, you could create an environment with some packages already in this way
```bash
pip install git+https://github.com/hsf-training/python-lesson.git
mamba create -n analysis-essentials python=3.11 jupyterlab ipython matplotlib uproot numpy pandas scikit-learn scipy tensorflow xgboost hep_ml wget
```
- Activate your environment by doing: `mamba activate analysis-essentials`
- You can install additional packages by doing: `mamba install package_name`


You will also need [Jupyter](https://jupyterlab.readthedocs.io/) to run the examples in this tutorial.
Jupyter was already installed in the previous command and can be ran by following the instructions [here](https://jupyterlab.readthedocs.io/en/stable/getting_started/starting.html).
Expand Down Expand Up @@ -86,4 +93,6 @@ If you have any problems or questions, you can [open an issue][issues] on this r
snakemake/README.md
git/README.md
CONTRIBUTING.md
CONDUCT.md
LICENSE.md
```
Loading

0 comments on commit b3d509b

Please sign in to comment.