From 3ba64184bb4eeba4b8151f6cbb5434fe8e15686e Mon Sep 17 00:00:00 2001 From: Kris Thielemans Date: Fri, 1 Nov 2024 22:30:33 +0000 Subject: [PATCH 1/3] update PETSIRD to v0.2.0 --- PETSIRD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PETSIRD b/PETSIRD index 8f0531d..ae3a048 160000 --- a/PETSIRD +++ b/PETSIRD @@ -1 +1 @@ -Subproject commit 8f0531d2a873a667fe6839d71484af52c80a1b9e +Subproject commit ae3a0484a128f805a2143cc0d010d01557cf902f From 3f0927434934e2eaac07286c23aa994a0821fbc3 Mon Sep 17 00:00:00 2001 From: Kris Thielemans Date: Fri, 1 Nov 2024 22:30:49 +0000 Subject: [PATCH 2/3] Document pip install etc --- .github/workflows/ci.yml | 1 + python/README.md | 9 ++++++--- python/start.py | 3 +-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 216429d..b5c1f4d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -51,6 +51,7 @@ jobs: - name: Python run: | cd python + pip install . python start.py - name: Cpp diff --git a/python/README.md b/python/README.md index ed4b962..b5d6ff5 100644 --- a/python/README.md +++ b/python/README.md @@ -1,6 +1,9 @@ # PETSIRD basic Python example -This directory contains some instructions to wrote Python code to read/write PETSIRD data. You need to `yardl generate` in the `model` directory first. +As you can now install the `petsird` package from PyPI, you likely no longer +need this repository and can just use `pip install petsird`. +You can of course use the Python package generated from the local PETSIRD +clone (`cd python; pip install .`). See +https://github.com/ETSInitiative/PETSIRD/tree/main/python#readme +for more information. -As we currently do not have a `set_up.py` for PETSIRD yet, the example file hard-codes the path to the generated files. -Alternatives would be to use the `PYTHONPATH` environment variable or symbolic links. \ No newline at end of file diff --git a/python/start.py b/python/start.py index d8aa21e..1e22e08 100644 --- a/python/start.py +++ b/python/start.py @@ -1,5 +1,4 @@ import sys -# Currently hard-wire location of generated files. This will need to change! -sys.path.append('../PETSIRD/python/') import petsird +help(petsird.BinaryPETSIRDReader) From 08b88d31589517c2778f9c431d7ff1cd86f9f2b5 Mon Sep 17 00:00:00 2001 From: Kris Thielemans Date: Fri, 1 Nov 2024 23:38:14 +0000 Subject: [PATCH 3/3] fix CI pip install --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b5c1f4d..0784801 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,8 +50,8 @@ jobs: - name: Python run: | + pip install ./PETSIRD/python cd python - pip install . python start.py - name: Cpp