Skip to content

Commit

Permalink
Merge pull request #1361 from anarkiwi/np22
Browse files Browse the repository at this point in the history
numpyv2 siupport
  • Loading branch information
anarkiwi authored Jul 24, 2024
2 parents dc4f162 + 1fa93aa commit d0d71f5
Show file tree
Hide file tree
Showing 5 changed files with 235 additions and 280 deletions.
66 changes: 5 additions & 61 deletions .github/workflows/ci-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,73 +23,17 @@ jobs:
- name: Get dependencies
run: |
sudo apt-get update && sudo apt-get install -y --no-install-recommends \
build-essential \
cmake \
g++ \
gcc \
git \
libboost-all-dev \
libev-dev \
libopencv-dev \
libuhd-dev \
libunwind-dev \
make \
pkg-config \
software-properties-common \
sox \
uhd-host \
wget \
yamllint \
&& grep -h 'git clone https' docker/*|grep -v pytorch|sed -E 's/RUN\s+git clone\s+//g'|sort|uniq|xargs -L1 git clone
- name: install gnuradio
run: |
sudo add-apt-repository ppa:gnuradio/gnuradio-releases && sudo apt-get update && \
sudo apt-get install -y --no-install-recommends gnuradio-dev python3-packaging
- name: Install dependencies
run: |
for repodir in flatbuffers json libsigmf gr-iqtlabs ; do \
mkdir -p ${repodir}/build && cd ${repodir}/build && \
cmake -DUSE_SYSTEM_JSON=ON -DUSE_SYSTEM_FLATBUFFERS=ON .. && make -j "$(nproc)" && sudo make install && cd ../.. ; \
done && \
sudo ldconfig -v && \
poetry config virtualenvs.create false && \
poetry install --no-interaction -C gamutrflib && \
poetry install --no-interaction -C gamutrfwaterfall && \
poetry install --no-interaction -C utils/mavlink-api && \
poetry install --no-interaction && \
sudo pip3 install -U pyserial requests && \
sudo dpkg -r --force-depends python3-numpy python3-requests
yamllint
- name: Code Quality - yamllint
run: |
yamllint -s *yml
- name: Install poetry dependencies
run: |
poetry config virtualenvs.create false && \
poetry run pip install black
- name: Code Quality - Black
run: |
poetry run black gamutrf --check
poetry run black gamutrflib --check
poetry run black gamutrfwaterfall --check
poetry run black utils --check
- name: Code Quality - Pylint
run: |
poetry run pylint --fail-under=6 gamutrf/ gamutrflib/ gamutrfwaterfall/
- name: Code Quality - Pytype
env:
PYTHONPATH: /usr/local/lib/python3.10/dist-packages:/usr/lib/python3/dist-packages
run: |
sudo pip3 install pytype=="$(grep -E "pytype = " pyproject.toml | grep -Eo "[0-9\.]+")" && \
pytype -k gamutrf/ && \
pytype -k gamutrflib/ && \
pytype -k utils/mavlink-api
- name: Test with pytest
env:
PYTHONPATH: /usr/local/lib/python3.10/dist-packages:/usr/lib/python3/dist-packages
run: |
ldconfig -p|grep iqtlabs
poetry run pytest --cov-report term-missing --cov=. --cov-report=xml tests/ gamutrfwaterfall/tests
- name: Upload coverage
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
verbose: false # optional (default = false)
fail_ci_if_error: false
if: github.repository == 'iqtlabs/gamutrf'
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,20 @@ RUN if [ "$(arch)" = "x86_64" ] ; then /root/install-nv.sh ; fi && \
libzmq5 \
mesa-vulkan-drivers \
python3 \
python3-pytest \
python3-zmq \
uhd-host \
wget \
zstd && \
apt-get -y -q clean && rm -rf /var/lib/apt/lists/*
WORKDIR /
COPY --from=iqtlabs/gnuradio:3.10.10.0 /usr/share/uhd/images /usr/share/uhd/images
COPY --from=installer /usr/local /usr/local
COPY --from=installer /gamutrf /gamutrf
COPY tests /tests
COPY --from=installer /root/.local /root/.local
RUN ldconfig -v
RUN pytest tests
WORKDIR /gamutrf
RUN echo "$(find /gamutrf/gamutrf -type f -name \*py -print)"|xargs grep -Eh "^(import|from)\s"|grep -Ev "gamutrf"|sort|uniq|python3
# nosemgrep:github.workflows.config.missing-user
Expand Down
4 changes: 1 addition & 3 deletions docker/Dockerfile.base
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
libspdlog-dev \
libuhd-dev \
libvulkan-dev \
pybind11-dev \
python3-numpy
pybind11-dev
WORKDIR /root
RUN git clone https://github.com/iqtlabs/gr-iqtlabs -b 1.0.113
COPY --from=iqtlabs/gamutrf-vkfft:latest /root /root/gr-iqtlabs
Expand All @@ -37,7 +36,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
libunwind8 \
libvulkan1 \
python3 \
python3-numpy \
&& apt-get -y -q clean && rm -rf /var/lib/apt/lists/*
COPY --from=iqtlabs/gnuradio:3.10.10.0 /usr/local /usr/local
COPY --from=iqtlabs/gamutrf-driver /usr/local /usr/local
Expand Down
Loading

0 comments on commit d0d71f5

Please sign in to comment.