diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 216429d..0784801 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,6 +50,7 @@ jobs: - name: Python run: | + pip install ./PETSIRD/python cd python python start.py diff --git a/PETSIRD b/PETSIRD index 8f0531d..ae3a048 160000 --- a/PETSIRD +++ b/PETSIRD @@ -1 +1 @@ -Subproject commit 8f0531d2a873a667fe6839d71484af52c80a1b9e +Subproject commit ae3a0484a128f805a2143cc0d010d01557cf902f 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)