Skip to content
Open
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
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# SCM syntax highlighting & preventing 3-way merges
pixi.lock merge=binary linguist-language=YAML linguist-generated=true -diff
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@ ENV/
env.bak/
venv.bak/

# pixi environments
.pixi/*
!.pixi/config.toml

# Spyder project settings
.spyderproject
.spyproject
Expand Down
36 changes: 22 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ important, interesting, helpful, or just cool.

Please feel free to contribute your knowledge to existing notebooks,
or add new ones.
For the moment this is just a single directory to keep things simple;
perhaps we will categorize things into sub-directories if things get unweildy.
There a bunch of general interest notebooks in the top level directory.
Notebooks on specific topics have been categorized into sub-directories.

The notebooks will probably render just fine if you click on them in the
GitHub web interface.
Expand All @@ -27,24 +27,32 @@ Issue notifications will also appear in the Slack channel.
If you want to run the notebooks in this repo locally:

1. Clone the repo
2. Create a conda environment (called `moad-python-notes`) containing the Python packages
that the notebooks use with:
2. Ensure that you have [Pixi](https://pixi.prefix.dev/latest/) installed
3. Install the dependency packages to set up the `default` environment with:

cd PythonNotes
conda env create -f environment.yaml
```bash
pixi install
```

3. Activate the conda environment with `conda activate moad-python-notes`
4. Launch `jupyter lab` or `jupyter notebook`
4. Launch `jupyter lab` or `jupyter notebook` with:

If you are adding a new notebook that requires one or more Python packages that
are not already in the conda environment:
```bash
pixi run jupyter lab
```

or

1. Add the package(s) to the `dependencies:` list in `environment.yaml`
2. Update your activated conda environment with:
```bash
pixi run jupyter notebook
```

conda env update -f environment.yaml
Or open a notebook in VS Code and select `.pixi/envs/default/bin/python` as the kernel

If you are adding a new notebook that requires one or more Python packages that
are not already in the conda environment:

3. Commit your change to `environment.yaml` (separately, or with your new notebook),
1. Add the package(s) to the Pixi manifest with `pixi add package1 package2 ...`
2. Commit updated `pixi.toml` and `pixi.lock` files (separately, or with your new notebook),
and push the changes to GitHub


Expand Down
32 changes: 0 additions & 32 deletions environment.yaml

This file was deleted.

Loading