Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add IRFs used in IceCube-Gen2 TDR #52

Merged
merged 7 commits into from
May 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 4 additions & 19 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,27 +28,12 @@ jobs:

- uses: actions/checkout@v2

- name: Cache conda pacakges
uses: actions/cache@v2
env:
# Increase this value to reset cache if etc/example-environment.yml has not changed
CACHE_NUMBER: 0
with:
path: ~/conda_pkgs_dir
key:
conda-${{ steps.detect.outputs.platform }}-${{ env.CACHE_NUMBER }}-${{hashFiles('conda-lock.yml') }}

- name: Set up conda environment
uses: conda-incubator/setup-miniconda@v2
uses: mamba-org/setup-micromamba@v1
with:
auto-update-conda: false
activate-environment: test-env
environment-file: conda-${{ steps.detect.outputs.platform }}.lock

- name: Install pip deps
run: |
cat conda-${{ steps.detect.outputs.platform }}.lock | awk '/^# pip/ {print substr($0,7)}' > requirements.txt
pip install --no-deps -r requirements.txt
environment-file: conda-lock.yml
environment-name: ci
create-args: --category main dev

- name: Install project
env:
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
*.DS_Store
*.pyc
*.egg-info
data/
figures/**/*.json.gz
figures/**/*.pdf
notebooks/**/*.pdf
Expand Down
32 changes: 11 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,19 @@ sensitivities in different units depending on context.
## Installation

The way to install `toise` and its depedencies is
with `conda`. If you do not already have `miniconda` on your system, obtain the
installer from https://conda.io/miniconda.html, and install in a location of
your choice, e.g.:
with [`micromamba`](https://mamba.readthedocs.io/en/latest/installation/micromamba-installation.html). If you do not already have `micromamba` on your system,

```sh
sh ./Miniconda3-latest-Linux-x86_64.sh -p $CONDA_PREFIX
```console
"${SHELL}" <(curl -L micro.mamba.pm/install.sh)
```

replacing `CONDA_PREFIX` with the prefix you chose.
or, os macOS with Homebrew:

```console
brew install micromamba
```

Then, obtain `toise`:
Next, obtain `toise`:

```sh
git clone git@github.com:icecube/toise.git
Expand All @@ -37,21 +39,9 @@ git clone git@github.com:icecube/toise.git
Then, from the `toise` source directory, create a new environment:
```sh
cd toise
$CONDA_PREFIX/bin/conda env create -n toise --file environment.yml
```

This will also download the required data tables.

The above will install the latest available versions of all dependencies. You can also install exactly the versions that were most recently tested with:
```sh
cd toise

PLATFORM_LOCKFILE=$(conda info --json | jq -r '"conda-\(.platform).lock"')
conda create -n toise --file $PLATFORM_LOCKFILE
cat $PLATFORM_LOCKFILE | awk '/^# pip/ {print substr($0,7)}' > requirements.txt
conda run -n toise pip install -r requirements.txt -e .
micromamba create -n toise --file conda-lock.yml
conda run -n toise pip install -e .
```
This should be much faster, as it does not have to solve for compatible versions of all the dependencies. If you do not have `jq` installed, you can set `PLATFORM_LOCKFILE` by hand to e.g. `conda-osx-64.lock`.

If you have a Jupyter notebook installation from another conda environment, you should now be able to open this notebook in Jupyter and select the "Python [conda env:miniconda3-toise]" kernel.

Expand Down
151 changes: 0 additions & 151 deletions conda-linux-64.lock

This file was deleted.

Loading
Loading