-
Notifications
You must be signed in to change notification settings - Fork 2
45 lines (38 loc) · 1.2 KB
/
build_python_package.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Build and Test Package
on:
push:
branches:
- master
pull_request:
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
# Checkout the repository
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history to ensure tags are available
# Set up Python
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.12 # Change to the desired Python version
# Install dependencies
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
# Build the package
- name: Build the package
run: |
python -m build
# Test importing the package
- name: Test the package import
run: |
python -m pip install dist/*.whl
python -c "import pynemaiqpet; print('pynemaiqpet version:', pynemaiqpet.__version__)"
pynemaiqpet_wb_nema_iq -h
pynemaiqpet_wb_nema_iq data/pet_recon_1 --verbose
pynemaiqpet_wb_nema_iq data/pet_recon_1 --fwhm_mm 3.5 --verbose
pynemaiqpet_wb_nema_iq data/pet_recon_2 --fwhm_mm 5.0 --verbose