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

extendended the time-capsule example #262

Merged
merged 1 commit into from
Mar 19, 2024
Merged
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
41 changes: 37 additions & 4 deletions content/dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -269,19 +269,52 @@ information?

`````{tabs}
````{group-tab} Conda
Try this either with your own project or inside the "coderefinery" conda
environment:
We start from an existing conda environment. Try this either with your own project or inside the "coderefinery" conda
environment. For demonstration puprposes, you can also create an environment with:

```console
$ conda env create -f myenv.yml
```
Where the file `myenv.yml` could have some python libraries with unspecified versions:

```
name: myenv
channels:
- conda-forge
- defaults
dependencies:
- python=3.10
- numpy
- pandas
- seaborn
```

After creating the environment we can activate it with

```
conda activate myenv
```

Now we can freeze the environment into a new YAML file with:

```console
$ conda env export > environment.yml
```

Have a look at the generated file and discuss what you see.

In future you can re-create this environment with:
In the future — or on a different computer — we can re-create this environment with:

```console
$ conda env create -f environment.yml
```

What happens instead when you run the following command?

```console
$ conda env export --from-history > environment_fromhistory.yml
```

More information: <https://docs.conda.io/en/latest/>

See also: <https://github.com/mamba-org/mamba>
Expand Down Expand Up @@ -323,4 +356,4 @@ information?
```{keypoints}
- Recording dependencies with versions can make it easier for the next person to execute your code
- There are many tools to record dependencies
```
```
Loading