From 8925a4878585e0ab13f611b220dd95a78d502ef4 Mon Sep 17 00:00:00 2001 From: atharva-2001 Date: Fri, 6 Oct 2023 18:24:33 +0530 Subject: [PATCH 1/7] Install latest version of mamba --- .github/workflows/pre-release.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index b79a2eed2b3..88f17d149e0 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -31,6 +31,9 @@ jobs: - name: Install conda-lock run: mamba install -c conda-forge conda-lock=1.0.5 + + - name: Update Mamba # see https://github.com/conda-incubator/setup-miniconda/issues/288 + run: mamba update mamba - name: Generate lockfiles run: | From 1ae1731eaeb66d475456f57867c885c6dc505e4d Mon Sep 17 00:00:00 2001 From: atharva-2001 Date: Fri, 6 Oct 2023 18:35:26 +0530 Subject: [PATCH 2/7] Unpin conda lock installatiion --- .github/workflows/pre-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index 88f17d149e0..89bab7083fb 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -30,7 +30,7 @@ jobs: use-mamba: true - name: Install conda-lock - run: mamba install -c conda-forge conda-lock=1.0.5 + run: mamba install -c conda-forge conda-lock - name: Update Mamba # see https://github.com/conda-incubator/setup-miniconda/issues/288 run: mamba update mamba From 4c8d8f45d7fc46ac1b58593b1f47aa3b16dd8db2 Mon Sep 17 00:00:00 2001 From: atharva-2001 Date: Fri, 6 Oct 2023 19:04:00 +0530 Subject: [PATCH 3/7] Split lockfilee creation to separate workflow --- .github/workflows/create-lockfiles.yml | 43 ++++++++++++++++++++++++++ .github/workflows/pre-release.yml | 40 ++---------------------- 2 files changed, 45 insertions(+), 38 deletions(-) create mode 100644 .github/workflows/create-lockfiles.yml diff --git a/.github/workflows/create-lockfiles.yml b/.github/workflows/create-lockfiles.yml new file mode 100644 index 00000000000..1188781c798 --- /dev/null +++ b/.github/workflows/create-lockfiles.yml @@ -0,0 +1,43 @@ +name: create-lockfiles + +on: + workflow_dispatch: # manual trigger + +defaults: + run: + shell: bash -l {0} + + +jobs: + lock: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Setup environment + uses: conda-incubator/setup-miniconda@v2 + with: + miniforge-variant: Mambaforge + miniforge-version: latest + auto-activate-base: true + activate-environment: "" + use-mamba: true + + - name: Install conda-lock + run: mamba install -c conda-forge conda-lock + + - name: Update Mamba # see https://github.com/conda-incubator/setup-miniconda/issues/288 + run: mamba update mamba + + - name: Generate lockfiles + run: | + conda-lock -f tardis_env3.yml -p linux-64 -p osx-64 + conda lock render conda-lock.yml + + - uses: actions/upload-artifact@v3 + with: + name: lockfiles + path: | + conda-linux-64.lock + conda-osx-64.lock + conda-lock.yml \ No newline at end of file diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index 89bab7083fb..22e68052f89 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -15,39 +15,6 @@ defaults: shell: bash -l {0} jobs: - lock: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - - name: Setup environment - uses: conda-incubator/setup-miniconda@v2 - with: - miniforge-variant: Mambaforge - miniforge-version: latest - auto-activate-base: true - activate-environment: "" - use-mamba: true - - - name: Install conda-lock - run: mamba install -c conda-forge conda-lock - - - name: Update Mamba # see https://github.com/conda-incubator/setup-miniconda/issues/288 - run: mamba update mamba - - - name: Generate lockfiles - run: | - conda-lock -f tardis_env3.yml -p linux-64 -p osx-64 - conda lock render conda-lock.yml - - - uses: actions/upload-artifact@v3 - with: - name: lockfiles - path: | - conda-linux-64.lock - conda-osx-64.lock - conda-lock.yml - zenodo: runs-on: ubuntu-latest steps: @@ -83,7 +50,7 @@ jobs: path: .zenodo.json pull_request: - needs: [lock, zenodo] + needs: zenodo runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -92,11 +59,8 @@ jobs: with: path: /tmp - - name: Copy files to repository + - name: Copy zenodo.json to repository run: | - cp /tmp/lockfiles/conda-linux-64.lock . - cp /tmp/lockfiles/conda-osx-64.lock . - cp /tmp/lockfiles/conda-lock.yml . cp /tmp/zenodo_json/.zenodo.json . - name: Get current date From e7dcb90a4a5e950b8088fc7706bb97025b76fb12 Mon Sep 17 00:00:00 2001 From: atharva-2001 Date: Mon, 9 Oct 2023 16:21:17 +0530 Subject: [PATCH 4/7] change docs installation- put a warning for conda forge installation and comment out install from package --- docs/installation.rst | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/docs/installation.rst b/docs/installation.rst index ed998c3c067..8fe7d5586f3 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -41,6 +41,12 @@ this method by following the steps described below. 3. a. Non-developers can install the latest release from ``conda-forge`` with the ``--no-deps`` flag, + .. warning:: + + Currently the conda forge installation doesn't work. It's recommended to install from the specific releases using pip- + $ pip install git+https://github.com/tardis-sn/tardis.git@{tag} + For example- `pip install git+https://github.com/tardis-sn/tardis.git@release-2023.09.17` + :: $ conda install tardis-sn --channel conda-forge --no-deps @@ -82,16 +88,16 @@ You have successfully installed TARDIS! 🎉 Please refer to `Quickstart for TAR to start running simulations. -Install from package -==================== +.. Install from package +.. ==================== -It's also possible to install TARDIS by pulling the `conda-forge package `_ -into a clean environment. However, we still encourage using lockfiles to ensure -reproducibility of scientific results. +.. It's also possible to install TARDIS by pulling the `conda-forge package `_ +.. into a clean environment. However, we still encourage using lockfiles to ensure +.. reproducibility of scientific results. -:: +.. :: - $ conda create --name tardis-forge tardis-sn --channel conda-forge +.. $ conda create --name tardis-forge tardis-sn --channel conda-forge Environment update From b85c39c2caeffe67c73b857345f6beb322596100 Mon Sep 17 00:00:00 2001 From: atharva-2001 Date: Mon, 9 Oct 2023 16:51:32 +0530 Subject: [PATCH 5/7] fix --- docs/installation.rst | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/installation.rst b/docs/installation.rst index 8fe7d5586f3..8c2c54a956b 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -44,8 +44,12 @@ this method by following the steps described below. .. warning:: Currently the conda forge installation doesn't work. It's recommended to install from the specific releases using pip- - $ pip install git+https://github.com/tardis-sn/tardis.git@{tag} - For example- `pip install git+https://github.com/tardis-sn/tardis.git@release-2023.09.17` + + `$ pip install git+https://github.com/tardis-sn/tardis.git@{tag}` + + For example- + + `pip install git+https://github.com/tardis-sn/tardis.git@release-2023.09.17` :: From d498abce7b6e8c993f0536eec4e47680e1aca78e Mon Sep 17 00:00:00 2001 From: atharva-2001 Date: Tue, 17 Oct 2023 16:44:57 +0530 Subject: [PATCH 6/7] delete create lockfiles --- .github/workflows/create-lockfiles.yml | 43 -------------------------- 1 file changed, 43 deletions(-) delete mode 100644 .github/workflows/create-lockfiles.yml diff --git a/.github/workflows/create-lockfiles.yml b/.github/workflows/create-lockfiles.yml deleted file mode 100644 index 1188781c798..00000000000 --- a/.github/workflows/create-lockfiles.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: create-lockfiles - -on: - workflow_dispatch: # manual trigger - -defaults: - run: - shell: bash -l {0} - - -jobs: - lock: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - - name: Setup environment - uses: conda-incubator/setup-miniconda@v2 - with: - miniforge-variant: Mambaforge - miniforge-version: latest - auto-activate-base: true - activate-environment: "" - use-mamba: true - - - name: Install conda-lock - run: mamba install -c conda-forge conda-lock - - - name: Update Mamba # see https://github.com/conda-incubator/setup-miniconda/issues/288 - run: mamba update mamba - - - name: Generate lockfiles - run: | - conda-lock -f tardis_env3.yml -p linux-64 -p osx-64 - conda lock render conda-lock.yml - - - uses: actions/upload-artifact@v3 - with: - name: lockfiles - path: | - conda-linux-64.lock - conda-osx-64.lock - conda-lock.yml \ No newline at end of file From a048ff6b00f1a46ba35957df4607d06e456a5da7 Mon Sep 17 00:00:00 2001 From: atharva-2001 Date: Tue, 17 Oct 2023 16:50:15 +0530 Subject: [PATCH 7/7] download llock file --- .github/workflows/pre-release.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index 22e68052f89..600076e9994 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -28,6 +28,9 @@ jobs: env: KEY_SECRET_JSON: ${{ secrets.ZENODO_KEY_SECRET_JSON }} + - name: Download Lock File + run: wget -q https://raw.githubusercontent.com/tardis-sn/tardis/master/conda-linux-64.lock + - name: Setup environment uses: conda-incubator/setup-miniconda@v2 with: