mirror of
https://github.com/nqrduck/LimeDriverBindings.git
synced 2024-06-22 05:43:20 +00:00
Updated CI and package import system
Refactored the CI workflows to include package installation and import testing. Ensured package is importable after installation by creating a new '__main__.py' module to check imports. This adds an extra validation step to the CI process, catching potential import issues early. Import statements in '__init__.py' have also been updated to use 'as' for clarity and namespace control.
This commit is contained in:
parent
fb296e1ecd
commit
853457de78
8
.github/workflows/python-package-ubuntu.yml
vendored
8
.github/workflows/python-package-ubuntu.yml
vendored
|
@ -33,6 +33,10 @@ jobs:
|
|||
run: |
|
||||
sudo apt-get install -y libhdf5-dev limesuite liblimesuite-dev automake gcc pkg-config build-essential python-is-python3
|
||||
|
||||
- name: Build the package
|
||||
- name: Install the package
|
||||
run: |
|
||||
python -m build
|
||||
pip install .
|
||||
|
||||
- name: Test if the package can be imported
|
||||
run: |
|
||||
python -m limedriver
|
10
.github/workflows/python-package.yml
vendored
10
.github/workflows/python-package.yml
vendored
|
@ -24,6 +24,14 @@ jobs:
|
|||
run: |
|
||||
yes | pacman -S python python-pip hdf5 limesuite python-build automake gcc pkgconf base-devel
|
||||
|
||||
- name: Install the package
|
||||
run: |
|
||||
pip install .
|
||||
|
||||
- name: Test if the package can be imported
|
||||
run: |
|
||||
python -m limedriver
|
||||
|
||||
- name: Build the package
|
||||
run: |
|
||||
python -m build
|
||||
|
@ -32,4 +40,4 @@ jobs:
|
|||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: built-package
|
||||
path: dist/
|
||||
path: dist/
|
|
@ -1,2 +1,2 @@
|
|||
import limedriver.binding
|
||||
import limedriver.hdf_reader
|
||||
import limedriver.binding as binding
|
||||
import limedriver.hdf_reader as hdf_reader
|
1
src/limedriver/__main__.py
Normal file
1
src/limedriver/__main__.py
Normal file
|
@ -0,0 +1 @@
|
|||
from limedriver import binding, hdf_reader
|
Loading…
Reference in a new issue