mirror of
https://github.com/ZGCA-Forge/MsgCenterPy.git
synced 2026-03-24 16:09:14 +00:00
Compare commits
3 Commits
0.1.6
...
dependabot
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a5edd436ec | ||
|
|
97c76708cd | ||
|
|
05d33086a9 |
16
.github/workflows/ci.yml
vendored
16
.github/workflows/ci.yml
vendored
@@ -21,7 +21,7 @@ jobs:
|
|||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v6
|
uses: actions/setup-python@v6
|
||||||
with:
|
with:
|
||||||
python-version: "3.10" # Use minimum version for consistency
|
python-version: "3.10"
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
@@ -33,27 +33,27 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
extra_args: --all-files
|
extra_args: --all-files
|
||||||
|
|
||||||
# Step 2: Basic build and test with minimum Python version (3.10)
|
# Step 2: Basic build and test
|
||||||
basic-build:
|
basic-build:
|
||||||
name: Basic build (Python 3.10, Ubuntu)
|
name: Basic build (Python 3.11, Ubuntu)
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [code-format] # Only run after code formatting passes
|
needs: [code-format] # Only run after code formatting passes
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Set up Python 3.10
|
- name: Set up Python 3.11
|
||||||
uses: actions/setup-python@v6
|
uses: actions/setup-python@v6
|
||||||
with:
|
with:
|
||||||
python-version: "3.10"
|
python-version: "3.11"
|
||||||
|
|
||||||
- name: Cache pip dependencies
|
- name: Cache pip dependencies
|
||||||
uses: actions/cache@v5
|
uses: actions/cache@v5
|
||||||
with:
|
with:
|
||||||
path: ~/.cache/pip
|
path: ~/.cache/pip
|
||||||
key: ubuntu-pip-3.10-${{ hashFiles('**/pyproject.toml') }}
|
key: ubuntu-pip-3.11-${{ hashFiles('**/pyproject.toml') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
ubuntu-pip-3.10-
|
ubuntu-pip-3.11-
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
@@ -173,7 +173,7 @@ jobs:
|
|||||||
exclude:
|
exclude:
|
||||||
# Skip the combination we already tested in basic-build
|
# Skip the combination we already tested in basic-build
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
python-version: "3.10"
|
python-version: "3.11"
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v6
|
||||||
|
|||||||
22
.github/workflows/publish.yml
vendored
22
.github/workflows/publish.yml
vendored
@@ -34,7 +34,7 @@ jobs:
|
|||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v6
|
uses: actions/setup-python@v6
|
||||||
with:
|
with:
|
||||||
python-version: "3.10" # Use minimum version for consistency
|
python-version: "3.10"
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
@@ -46,27 +46,27 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
extra_args: --all-files
|
extra_args: --all-files
|
||||||
|
|
||||||
# Step 2: Basic build and test with minimum Python version (3.10)
|
# Step 2: Basic build and test
|
||||||
basic-build:
|
basic-build:
|
||||||
name: Basic build (Python 3.10, Ubuntu)
|
name: Basic build (Python 3.11, Ubuntu)
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [code-format] # Only run after code formatting passes
|
needs: [code-format] # Only run after code formatting passes
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Set up Python 3.10
|
- name: Set up Python 3.11
|
||||||
uses: actions/setup-python@v6
|
uses: actions/setup-python@v6
|
||||||
with:
|
with:
|
||||||
python-version: "3.10"
|
python-version: "3.11"
|
||||||
|
|
||||||
- name: Cache pip dependencies
|
- name: Cache pip dependencies
|
||||||
uses: actions/cache@v5
|
uses: actions/cache@v5
|
||||||
with:
|
with:
|
||||||
path: ~/.cache/pip
|
path: ~/.cache/pip
|
||||||
key: ubuntu-pip-3.10-${{ hashFiles('**/pyproject.toml') }}
|
key: ubuntu-pip-3.11-${{ hashFiles('**/pyproject.toml') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
ubuntu-pip-3.10-
|
ubuntu-pip-3.11-
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
@@ -78,7 +78,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
pytest -v
|
pytest -v
|
||||||
|
|
||||||
# Step 3: ROS2 integration test
|
# Step 3: ROS2 integration test
|
||||||
test-with-ros2:
|
test-with-ros2:
|
||||||
name: ROS2 integration test
|
name: ROS2 integration test
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -217,7 +217,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Retrieve release distributions
|
- name: Retrieve release distributions
|
||||||
uses: actions/download-artifact@v7
|
uses: actions/download-artifact@v8
|
||||||
with:
|
with:
|
||||||
name: release-dists
|
name: release-dists
|
||||||
path: dist/
|
path: dist/
|
||||||
@@ -240,7 +240,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Retrieve release distributions
|
- name: Retrieve release distributions
|
||||||
uses: actions/download-artifact@v7
|
uses: actions/download-artifact@v8
|
||||||
with:
|
with:
|
||||||
name: release-dists
|
name: release-dists
|
||||||
path: dist/
|
path: dist/
|
||||||
@@ -260,7 +260,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Retrieve release distributions
|
- name: Retrieve release distributions
|
||||||
uses: actions/download-artifact@v7
|
uses: actions/download-artifact@v8
|
||||||
with:
|
with:
|
||||||
name: release-dists
|
name: release-dists
|
||||||
path: dist/
|
path: dist/
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ A multi-format message conversion system supporting seamless conversion
|
|||||||
between ROS2, Pydantic, Dataclass, JSON, Dict, YAML and JSON Schema.
|
between ROS2, Pydantic, Dataclass, JSON, Dict, YAML and JSON Schema.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__version__ = "0.1.6"
|
__version__ = "0.1.7"
|
||||||
__license__ = "Apache-2.0"
|
__license__ = "Apache-2.0"
|
||||||
|
|
||||||
from msgcenterpy.core.envelope import MessageEnvelope, create_envelope
|
from msgcenterpy.core.envelope import MessageEnvelope, create_envelope
|
||||||
|
|||||||
@@ -40,11 +40,7 @@ class ROS2MessageInstance(MessageInstance[Any]):
|
|||||||
interface = (
|
interface = (
|
||||||
"msg"
|
"msg"
|
||||||
if ".msg" in module_name
|
if ".msg" in module_name
|
||||||
else "srv"
|
else "srv" if ".srv" in module_name else "action" if ".action" in module_name else "msg"
|
||||||
if ".srv" in module_name
|
|
||||||
else "action"
|
|
||||||
if ".action" in module_name
|
|
||||||
else "msg"
|
|
||||||
)
|
)
|
||||||
return f"{package}/{interface}/{class_name}" if package and class_name else f"{module_name}.{class_name}"
|
return f"{package}/{interface}/{class_name}" if package and class_name else f"{module_name}.{class_name}"
|
||||||
|
|
||||||
|
|||||||
@@ -128,9 +128,10 @@ skips = ["B101", "B601"]
|
|||||||
# ── Version management ────────────────────────────────────────
|
# ── Version management ────────────────────────────────────────
|
||||||
|
|
||||||
[tool.bumpversion]
|
[tool.bumpversion]
|
||||||
current_version = "0.1.6"
|
current_version = "0.1.7"
|
||||||
commit = true
|
commit = true
|
||||||
tag = true
|
tag = true
|
||||||
|
push = true
|
||||||
tag_name = "v{new_version}"
|
tag_name = "v{new_version}"
|
||||||
message = "release: bump version {current_version} → {new_version}"
|
message = "release: bump version {current_version} → {new_version}"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user