Skip to content

Commit

Permalink
add some instructions to use pip install
Browse files Browse the repository at this point in the history
  • Loading branch information
KrisThielemans committed Nov 1, 2024
1 parent 8f0531d commit 6307fb9
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
/cpp/build/
/python/petsird/
__pycache__/
build/
petsird.egg-info/

# Common editor backups
/.vscode/
Expand Down
29 changes: 28 additions & 1 deletion python/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,33 @@
# PETSIRD basic Python example

This directory contains some Python example code to read/write PETSIRD data. You need to `yardl generate` in the `model` directory first.
This directory contains some Python example code to read/write PETSIRD data.

## Pre-installation

You will need the Python files generated by yardl. You have a few options.

### Use PyPI

```sh
python3 -m venv ~/petsirdenv
source ~/petsirdenv/bin/activate
pip install petsird
```

### Use the model files from your local clone

(This option needs the `yardl` binary, either download it, or use our devcontainer or GitHub CodeSpace.)

You need to `yardl generate` in the `model` directory first. This will create the Python package files in a `petsird`
subfolder. Optionally install those into your venv
```sh
python3 -m venv ~/petsirdenv
source ~/petsirdenv/bin/activate
cd python
pip install .
```

## Usage

The Python code shows piping the compact binary format to standard out and
reading it from standard in. This can be used as follows:
Expand Down

0 comments on commit 6307fb9

Please sign in to comment.