You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

ltcodecs

Package Overview
Dependencies
Maintainers
2
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ltcodecs - pypi Package Compare versions

Comparing version
4.2.0
to
4.2.1
+28
docker/auto-docs.Dockerfile
FROM ros:noetic-ros-core
RUN apt-get update && apt-get upgrade -y
RUN apt install python3-pip -y
RUN apt-get install --no-install-recommends -y \
graphviz \
imagemagick \
make \
\
latexmk \
lmodern \
fonts-freefont-otf \
texlive-latex-recommended \
texlive-latex-extra \
texlive-fonts-recommended \
texlive-fonts-extra \
texlive-lang-cjk \
texlive-lang-chinese \
texlive-lang-japanese \
texlive-luatex \
texlive-xetex \
xindy \
tex-gyre \
git \
&& apt-get autoremove \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN pip install -U sphinx sphinx-book-theme myst_parser pytest

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

+115
-32

@@ -1,2 +0,41 @@

build_test_image:
workflow:
rules:
- when: always
stages:
- build
- test
- combine_coverage
- deploy
variables:
# Requires two additional vars, REGISTRY_URL and REGISTRY_REPO to be defined
# in CI/CD variables on gitlab
# dockerfile locations
ROS1_DOCKERFILE_PATH: "docker/tests.Dockerfile.ros1"
ROS2_DOCKERFILE_PATH: "docker/tests.Dockerfile.ros2"
DOCKERFILE_AUTODOCS_PATH: "docker/auto-docs.Dockerfile"
# version based configurations
ROS1_DISTRO: "noetic"
ROS2_DISTRO: "jazzy"
ROS1_BASE_IMAGE: "ros:${ROS1_DISTRO}-ros-base"
ROS2_BASE_IMAGE: "ros:${ROS2_DISTRO}-ros-base"
ROS_TEST_IMAGE_NAME: "ltcodec_tests"
ROS1_TAG: "ros1-test-pipeline-${CI_PIPELINE_ID}"
ROS2_TAG: "ros2-test-pipeline-${CI_PIPELINE_ID}"
DOCS_IMAGE_NAME: "ltcodec_auto_docs"
DOCS_TAG: "auto-doc-pipeline-${CI_PIPELINE_ID}"
ARMW_BRANCH: ""
PYACOMMS_BRANCH: ""
LTCODEC_BRANCH: ""
ROS_ACOMMS_BRANCH: "devel"
ROS_ACOMMS_NET_BRANCH: "devel"
.build_image_template:
image: docker:stable

@@ -9,5 +48,21 @@ stage: build

script:
- docker build --rm -t ltcodecs-tests:latest -f tests/tests.Dockerfile .
- docker build --rm --build-arg ROS_DISTRO=${ROS_DISTRO} --build-arg BASE_IMAGE=${ROS_BASE_IMAGE} -t $ROS_TEST_IMAGE_NAME:${IMAGE_TAG} -f $ROS_DOCKERFILE_PATH .
- docker tag ${ROS_TEST_IMAGE_NAME}:${IMAGE_TAG} ${REGISTRY_URL}/${REGISTRY_REPO}/${ROS_TEST_IMAGE_NAME}:${IMAGE_TAG}
- docker push ${REGISTRY_URL}/${REGISTRY_REPO}/${ROS_TEST_IMAGE_NAME}:${IMAGE_TAG}
build_auto-doc_image:
build_ros_test_image_ros1:
extends: .build_image_template
variables:
IMAGE_TAG: "${ROS1_TAG}"
ROS_BASE_IMAGE: $ROS1_BASE_IMAGE
ROS_DOCKERFILE_PATH: $ROS1_DOCKERFILE_PATH
build_ros_test_image_ros2:
extends: .build_image_template
variables:
IMAGE_TAG: "${ROS2_TAG}"
ROS_DOCKERFILE_PATH: $ROS2_DOCKERFILE_PATH
ROS_BASE_IMAGE: $ROS2_BASE_IMAGE
build_auto_doc_image:
image: docker:stable

@@ -20,23 +75,29 @@ stage: build

script:
- docker build --rm -t ltcodecs-docs:latest -f docs/auto-docs.Dockerfile .
- docker build --rm -t ${DOCS_IMAGE_NAME}:${DOCS_TAG} -f $DOCKERFILE_AUTODOCS_PATH .
- docker tag ${DOCS_IMAGE_NAME}:${DOCS_TAG} ${REGISTRY_URL}/${REGISTRY_REPO}/${DOCS_IMAGE_NAME}:${DOCS_TAG}
- docker push ${REGISTRY_URL}/${REGISTRY_REPO}/${DOCS_IMAGE_NAME}:${DOCS_TAG}
trigger-ros_acomms-master-pipeline:
trigger-ros_acomms-pipeline:
stage: test
trigger:
project: acomms/ros_acomms
branch: master
branch: $ROS_ACOMMS_BRANCH
strategy: depend
variables:
LTCODEC_BRANCH: $LTCODEC_BRANCH
PYACOMMS_BRANCH: $PYACOMMS_BRANCH
ARMW_BRANCH: $ARMW_BRANCH
rules:
- if: '$CI_PIPELINE_SOURCE != "pipeline"'
trigger-ros_acomms-devel-pipeline:
trigger:
project: acomms/ros_acomms
branch: devel
strategy: depend
test:
image: ltcodecs-tests:latest
.test_template:
stage: test
script:
- source /ros_entrypoint.sh
- pip install -r requirements.txt
- pip install .
- |
if [[ "$ARMW_BRANCH" != "" ]]; then
git clone -b "$ARMW_BRANCH" "https://gitlab-ci-token:$CI_JOB_TOKEN@git.whoi.edu/ros/armw.git" /armw && \
pip install /armw/.;
fi
- pytest --capture=no --junitxml=results.xml --cov=ltcodecs --cov-report=term --cov-report=xml --cov-report=html tests/

@@ -54,26 +115,48 @@ artifacts:

test-gitlab:
image: ltcodecs-tests:latest
stage: test
.ros_version_selector:
variables:
ROS_DISTRO: $ROS1_DISTRO
ROS_WORKSPACE_OUTPUT_DIR: "devel"
IMAGE_FULL_NAME: "$REGISTRY_URL/$REGISTRY_REPO/$ROS_TEST_IMAGE_NAME:$ROS1_TAG"
rules:
- if: $ROS_VERSION == "ros2"
variables:
ROS_DISTRO: $ROS2_DISTRO
ROS_WORKSPACE_OUTPUT_DIR: "install"
IMAGE_FULL_NAME: "$REGISTRY_URL/$REGISTRY_REPO/$ROS_TEST_IMAGE_NAME:$ROS2_TAG"
- when: on_success
image: $IMAGE_FULL_NAME
test:
extends:
- .test_template
- .ros_version_selector
parallel:
matrix:
- ROS_VERSION: [ros1, ros2]
test_coverage:
image: "$REGISTRY_URL/$REGISTRY_REPO/$ROS_TEST_IMAGE_NAME:$ROS1_TAG"
stage: combine_coverage
script:
- source /ros_entrypoint.sh
- pip install -r requirements.txt
- git clone https://gitlab-ci-token:$CI_JOB_TOKEN@git.whoi.edu/ros/armw.git ~/armw
- cd ~/armw && pip install .
- cd $CI_PROJECT_DIR
- pip install .
- pytest --capture=no --junitxml=results.xml --cov=ltcodecs --cov-report=term --cov-report=xml --cov-report=html tests/
- ls *.coverage
- coverage combine --keep *.${ROS1_DISTRO}.coverage
- coverage xml
- coverage html
- coverage report --omit=*__init__.py
coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+)%/'
artifacts:
paths:
- 'coverage.xml'
- 'htmlcov/'
- ".coverage"
- "htmlcov/"
- "coverage.xml"
reports:
junit: 'results.xml'
coverage_report:
coverage_format: cobertura
path: coverage.xml
coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+)%/'
except:
- dev/autodocs
auto-docs:
image: ltcodecs-docs:latest
image: "$REGISTRY_URL/$REGISTRY_REPO/$DOCS_IMAGE_NAME:$DOCS_TAG"
stage: deploy

@@ -91,3 +174,3 @@ script:

pages:
image: ltcodecs-docs:latest
image: "$REGISTRY_URL/$REGISTRY_REPO/$DOCS_IMAGE_NAME:$DOCS_TAG"
stage: deploy

@@ -94,0 +177,0 @@ script:

Metadata-Version: 2.4
Name: ltcodecs
Version: 4.2.0
Version: 4.2.1
Summary: LT Codecs: Lightweight codecs for use over low-throughput links

@@ -5,0 +5,0 @@ Author: Woods Hole Oceanographic Institution, Acoustic Communications Group

Metadata-Version: 2.4
Name: ltcodecs
Version: 4.2.0
Version: 4.2.1
Summary: LT Codecs: Lightweight codecs for use over low-throughput links

@@ -5,0 +5,0 @@ Author: Woods Hole Oceanographic Institution, Acoustic Communications Group

@@ -9,4 +9,6 @@ .gitignore

.gitlab/merge_request_templates/Default.md
docker/auto-docs.Dockerfile
docker/tests.Dockerfile.ros1
docker/tests.Dockerfile.ros2
docs/Makefile
docs/auto-docs.Dockerfile
docs/conf.py

@@ -47,3 +49,2 @@ docs/index.rst

tests/string_msg_codec.yaml
tests/test_codecs.py
tests/tests.Dockerfile
tests/test_codecs.py

@@ -44,2 +44,3 @@ from .varint_codec import VarintCodec

"bool": BoolCodec,
"boolean": BoolCodec,
"string": AsciiStringCodec,

@@ -46,0 +47,0 @@ "ascii": AsciiStringCodec,

@@ -12,5 +12,7 @@ #!/usr/bin/env python3

import rospy
from std_msgs.msg import String, ColorRGBA
import armw
String = armw.import_message("std_msgs", "String")
ColorRGBA = armw.import_message("std_msgs", "ColorRGBA")
import ltcodecs

@@ -341,3 +343,3 @@

message_dict = {}
for field in msg.__slots__:
for field in ['r', 'g', 'b', 'a']:
message_dict[field] = getattr(msg, field)

@@ -386,3 +388,3 @@

input_time = rospy.Time.from_sec(time.time())
input_time = armw.Time().from_sec(time.time())

@@ -394,4 +396,3 @@ codec = ltcodecs.rostime_codec.RosTimeCodec(precision=20)

decoded_time = codec.decode(bit_stream)
decoded_time = armw.get_time_object(codec.decode(bit_stream))
assert decoded_time == input_time, "Decoded time does not match input time"

@@ -398,0 +399,0 @@

FROM ros:noetic-ros-core
RUN apt-get update && apt-get upgrade -y
RUN apt install python3-pip -y
RUN apt-get install --no-install-recommends -y \
graphviz \
imagemagick \
make \
\
latexmk \
lmodern \
fonts-freefont-otf \
texlive-latex-recommended \
texlive-latex-extra \
texlive-fonts-recommended \
texlive-fonts-extra \
texlive-lang-cjk \
texlive-lang-chinese \
texlive-lang-japanese \
texlive-luatex \
texlive-xetex \
xindy \
tex-gyre \
git \
&& apt-get autoremove \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN pip install -U sphinx sphinx-book-theme myst_parser pytest
FROM ros:noetic-ros-core
# install ros package
RUN apt-get update && apt-get upgrade -y
RUN apt install python3-pip git ros-noetic-dynamic-reconfigure -y
RUN pip install -U pytest pytest-cov