File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1818 uses : actions/setup-python@v5
1919 with :
2020 python-version : ' 3.10'
21+ cache : ' pip' # speeds up installs
2122
2223 - name : Cache _data directory
2324 uses : actions/cache@v4
@@ -28,18 +29,39 @@ jobs:
2829 scape-data-${{ runner.os }}-
2930
3031 - name : Install package
31- run : pip install .
32+ run : |
33+ python -m pip install --upgrade pip
34+ pip install .
3235
3336 - name : Run test code
37+ shell : bash
3438 run : |
35- python -c "
36- import scape
37- scape.io.download_from_zenodo(target_dir = '.')
38- result = scape.api.train(
39- de_file='_data/de_train.parquet',
40- lfc_file='_data/lfc_train.parquet',
41- cv_drug='Belinostat',
42- n_genes=64
43- )
44- scape.util.plot_result(result._last_train_results)
45- "
39+ python - <<'PY'
40+ import matplotlib
41+ matplotlib.use('Agg') # headless for CI
42+ import matplotlib.pyplot as plt
43+
44+ import scape
45+
46+ # download data (cached in subsequent runs)
47+ scape.io.download_from_zenodo(target_dir='.')
48+
49+ # train
50+ result = scape.api.train(
51+ de_file='_data/de_train.parquet',
52+ lfc_file='_data/lfc_train.parquet',
53+ cv_drug='Belinostat',
54+ n_genes=64
55+ )
56+
57+ # plot and save so CI has an artifact, not a GUI
58+ scape.util.plot_result(result._last_train_results)
59+ plt.tight_layout()
60+ plt.savefig('results.png', dpi=150)
61+ PY
62+
63+ - name : Upload results
64+ uses : actions/upload-artifact@v4
65+ with :
66+ name : scape-results
67+ path : results.png
You can’t perform that action at this time.
0 commit comments