Skip to content

Commit c171c9e

Browse files
committed
All python examples runnable
1 parent 6ad953e commit c171c9e

10 files changed

Lines changed: 24 additions & 139 deletions

.github/workflows/python-examples.yml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ jobs:
3333
python -m pip install --upgrade pip
3434
cd $GITHUB_WORKSPACE/python
3535
pip install --editable .
36+
pip install jsonpickle # for writing object example
3637
3738
# - name: Download HallD SQLite snapshot
3839
# run: |
@@ -45,12 +46,27 @@ jobs:
4546
# continue-on-error keeps the workflow green while showing which
4647
# script had problems (yellow badge instead of silent swallow).
4748

48-
- name: "Example 01: select_values_simple"
49+
- name: "Example: 01_select_values_simple"
4950
run: python $GITHUB_WORKSPACE/python/examples/01_select_values_simple.py
5051
# Script must read RCDB_CONNECTION env var (see updated examples)
5152

52-
- name: "Example 02: select_values_extended"
53+
- name: "Example: 02_select_values_extended"
5354
run: python $GITHUB_WORKSPACE/python/examples/02_select_values_extended.py
5455

55-
- name: "Example 03: select_values_custom_runs"
56-
run: python $GITHUB_WORKSPACE/python/examples/03_select_values_custom_runs.py
56+
- name: "Example: 03_select_values_custom_runs"
57+
run: python $GITHUB_WORKSPACE/python/examples/03_select_values_custom_runs.py
58+
59+
- name: "Example: 04_select_cdc_gas_pressure"
60+
run: python $GITHUB_WORKSPACE/python/examples/04_select_cdc_gas_pressure.py
61+
62+
- name: "Example: 10_create_conditions_basic"
63+
run: python $GITHUB_WORKSPACE/python/examples/10_create_conditions_basic.py
64+
65+
- name: "Example: 11_crete_conditions_store_array"
66+
run: python $GITHUB_WORKSPACE/python/examples/11_crete_conditions_store_array.py
67+
68+
- name: "Example: 12_create_conditions_store_object"
69+
run: python $GITHUB_WORKSPACE/python/examples/12_create_conditions_store_object.py
70+
71+
- name: "Example: 90_advanced_sqlalchemy_query"
72+
run: python $GITHUB_WORKSPACE/python/examples/90_advanced_sqlalchemy_query.py
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

python/examples/example_runs_by_date.py

Lines changed: 0 additions & 93 deletions
This file was deleted.

python/examples/example_select_halld_values.py

Lines changed: 0 additions & 5 deletions
This file was deleted.

python/examples/example_simple_queries.py

Lines changed: 0 additions & 37 deletions
This file was deleted.

python/pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ dependencies = [
4545
"rich"
4646
]
4747

48+
[project.optional-dependencies]
49+
examples = ["jsonpickle"]
50+
51+
4852
# If you want a console script, define it in [project.scripts]
4953
[project.scripts]
5054
rcdb = "rcdb.cli.app:rcdb_cli"

0 commit comments

Comments
 (0)