Skip to content

Commit

Permalink
Remove lock file creation from pre release workflow (#2432)
Browse files Browse the repository at this point in the history
* Install latest version of mamba

* Unpin conda lock installatiion

* Split lockfilee creation to separate workflow

* change docs installation- put a warning for conda forge installation and comment out install from package

* fix

* delete create lockfiles

* download llock file
  • Loading branch information
atharva-2001 authored Oct 20, 2023
1 parent d32f323 commit 4b7d92f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 42 deletions.
40 changes: 5 additions & 35 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,36 +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=1.0.5

- 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:
Expand All @@ -58,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:
Expand All @@ -80,7 +53,7 @@ jobs:
path: .zenodo.json

pull_request:
needs: [lock, zenodo]
needs: zenodo
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -89,11 +62,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
Expand Down
24 changes: 17 additions & 7 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,16 @@ 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/[email protected]`

::

$ conda install tardis-sn --channel conda-forge --no-deps
Expand Down Expand Up @@ -82,16 +92,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 <https://anaconda.org/conda-forge/tardis-sn>`_
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 <https://anaconda.org/conda-forge/tardis-sn>`_
.. 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
Expand Down

0 comments on commit 4b7d92f

Please sign in to comment.