openrois-adapter-mmdagent-ex 0.1.0.dev1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- openrois_adapter_mmdagent_ex-0.1.0.dev1/.github/scripts/release_notes.py +62 -0
- openrois_adapter_mmdagent_ex-0.1.0.dev1/.github/workflows/ci.yml +27 -0
- openrois_adapter_mmdagent_ex-0.1.0.dev1/.github/workflows/release.yml +148 -0
- openrois_adapter_mmdagent_ex-0.1.0.dev1/.gitignore +226 -0
- openrois_adapter_mmdagent_ex-0.1.0.dev1/CHANGELOG.md +32 -0
- openrois_adapter_mmdagent_ex-0.1.0.dev1/CONTRIBUTING.md +69 -0
- openrois_adapter_mmdagent_ex-0.1.0.dev1/LICENSE +201 -0
- openrois_adapter_mmdagent_ex-0.1.0.dev1/NOTICE +10 -0
- openrois_adapter_mmdagent_ex-0.1.0.dev1/PKG-INFO +168 -0
- openrois_adapter_mmdagent_ex-0.1.0.dev1/README.md +146 -0
- openrois_adapter_mmdagent_ex-0.1.0.dev1/adapter.example.yaml +44 -0
- openrois_adapter_mmdagent_ex-0.1.0.dev1/pyproject.toml +42 -0
- openrois_adapter_mmdagent_ex-0.1.0.dev1/src/openrois_adapter_mmdagent_ex/__init__.py +5 -0
- openrois_adapter_mmdagent_ex-0.1.0.dev1/src/openrois_adapter_mmdagent_ex/__main__.py +4 -0
- openrois_adapter_mmdagent_ex-0.1.0.dev1/src/openrois_adapter_mmdagent_ex/cli.py +195 -0
- openrois_adapter_mmdagent_ex-0.1.0.dev1/src/openrois_adapter_mmdagent_ex/components/__init__.py +44 -0
- openrois_adapter_mmdagent_ex-0.1.0.dev1/src/openrois_adapter_mmdagent_ex/components/_command.py +96 -0
- openrois_adapter_mmdagent_ex-0.1.0.dev1/src/openrois_adapter_mmdagent_ex/components/connection.py +197 -0
- openrois_adapter_mmdagent_ex-0.1.0.dev1/src/openrois_adapter_mmdagent_ex/components/reaction.py +113 -0
- openrois_adapter_mmdagent_ex-0.1.0.dev1/src/openrois_adapter_mmdagent_ex/components/speech_synthesis.py +134 -0
- openrois_adapter_mmdagent_ex-0.1.0.dev1/src/openrois_adapter_mmdagent_ex/components/system_information.py +37 -0
- openrois_adapter_mmdagent_ex-0.1.0.dev1/src/openrois_adapter_mmdagent_ex/py.typed +0 -0
- openrois_adapter_mmdagent_ex-0.1.0.dev1/tests/__init__.py +0 -0
- openrois_adapter_mmdagent_ex-0.1.0.dev1/tests/conftest.py +141 -0
- openrois_adapter_mmdagent_ex-0.1.0.dev1/tests/integration/__init__.py +0 -0
- openrois_adapter_mmdagent_ex-0.1.0.dev1/tests/integration/conftest.py +113 -0
- openrois_adapter_mmdagent_ex-0.1.0.dev1/tests/integration/test_mmdagent_ex.py +179 -0
- openrois_adapter_mmdagent_ex-0.1.0.dev1/tests/remote.py +107 -0
- openrois_adapter_mmdagent_ex-0.1.0.dev1/tests/test_adapter.py +70 -0
- openrois_adapter_mmdagent_ex-0.1.0.dev1/tests/test_connection.py +78 -0
- openrois_adapter_mmdagent_ex-0.1.0.dev1/tests/test_reaction.py +72 -0
- openrois_adapter_mmdagent_ex-0.1.0.dev1/tests/test_speech_synthesis.py +136 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Print the notes of a GitHub release: the CHANGELOG section of one version.
|
|
3
|
+
|
|
4
|
+
The version heading is left out, because the release title already says it, and so are
|
|
5
|
+
the link references that close the file. A missing or empty section exits non-zero, so
|
|
6
|
+
that a release cannot go out without its notes.
|
|
7
|
+
|
|
8
|
+
Usage:
|
|
9
|
+
python3 .github/scripts/release_notes.py CHANGELOG.md 0.1.0a1
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
from __future__ import annotations
|
|
13
|
+
|
|
14
|
+
import argparse
|
|
15
|
+
import re
|
|
16
|
+
import sys
|
|
17
|
+
from pathlib import Path
|
|
18
|
+
|
|
19
|
+
LINK_REFERENCE = re.compile(r"^\[[^\]]+\]:\s")
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def section(path: Path, version: str) -> str:
|
|
23
|
+
"""Return the body of the section of ``version``, without its heading."""
|
|
24
|
+
try:
|
|
25
|
+
text = path.read_text(encoding="utf-8")
|
|
26
|
+
except OSError as error:
|
|
27
|
+
sys.exit(f"::error::{path}: {error.strerror}")
|
|
28
|
+
|
|
29
|
+
heading = re.compile(rf"^## (?:\[{re.escape(version)}\]|{re.escape(version)})(?:\s|$)")
|
|
30
|
+
lines = text.splitlines()
|
|
31
|
+
start = next((i for i, line in enumerate(lines) if heading.match(line)), None)
|
|
32
|
+
if start is None:
|
|
33
|
+
sys.exit(f"::error::{path} has no section for {version}")
|
|
34
|
+
end = next(
|
|
35
|
+
(i for i in range(start + 1, len(lines)) if lines[i].startswith("## ")),
|
|
36
|
+
len(lines),
|
|
37
|
+
)
|
|
38
|
+
body = lines[start + 1 : end]
|
|
39
|
+
|
|
40
|
+
# The link references close the file, so they follow the last section with no heading
|
|
41
|
+
# of their own to stop at.
|
|
42
|
+
while body and (not body[-1].strip() or LINK_REFERENCE.match(body[-1])):
|
|
43
|
+
body.pop()
|
|
44
|
+
while body and not body[0].strip():
|
|
45
|
+
body.pop(0)
|
|
46
|
+
|
|
47
|
+
# A section with only category headings left has nothing for a reader either.
|
|
48
|
+
if not any(line.strip() and not line.startswith("#") for line in body):
|
|
49
|
+
sys.exit(f"::error::{path} has an empty section for {version}")
|
|
50
|
+
return "\n".join(body)
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def main() -> None:
|
|
54
|
+
parser = argparse.ArgumentParser(description=__doc__.splitlines()[0])
|
|
55
|
+
parser.add_argument("changelog", type=Path, help="the CHANGELOG")
|
|
56
|
+
parser.add_argument("version", help="the version as the CHANGELOG spells it")
|
|
57
|
+
args = parser.parse_args()
|
|
58
|
+
print(section(args.changelog, args.version))
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
if __name__ == "__main__":
|
|
62
|
+
main()
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
check:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v4
|
|
13
|
+
- uses: actions/setup-python@v5
|
|
14
|
+
with:
|
|
15
|
+
python-version: "3.12"
|
|
16
|
+
cache: pip
|
|
17
|
+
- name: Install
|
|
18
|
+
# The OpenRoIS packages come from PyPI.
|
|
19
|
+
run: |
|
|
20
|
+
python -m pip install --upgrade pip
|
|
21
|
+
pip install -e ".[dev]"
|
|
22
|
+
- name: Lint
|
|
23
|
+
run: |
|
|
24
|
+
ruff check .
|
|
25
|
+
ruff format --check .
|
|
26
|
+
- name: Unit tests (the real MMDAgent-EX tests skip without a display)
|
|
27
|
+
run: pytest -q
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
# Publishes openrois-adapter-mmdagent-ex to PyPI when a v* tag is pushed, such as
|
|
4
|
+
# v0.1.0-dev.1 or v0.1.0-alpha.1, then creates the GitHub release with the wheel and the
|
|
5
|
+
# CHANGELOG section. PyPI trusts this workflow in the pypi environment (trusted
|
|
6
|
+
# publishing), so the repository stores no token.
|
|
7
|
+
|
|
8
|
+
on:
|
|
9
|
+
push:
|
|
10
|
+
tags: ["v*"]
|
|
11
|
+
|
|
12
|
+
permissions:
|
|
13
|
+
contents: read
|
|
14
|
+
|
|
15
|
+
concurrency:
|
|
16
|
+
group: release-${{ github.ref }}
|
|
17
|
+
cancel-in-progress: false
|
|
18
|
+
|
|
19
|
+
jobs:
|
|
20
|
+
check-version:
|
|
21
|
+
name: Tag matches the package version
|
|
22
|
+
runs-on: ubuntu-latest
|
|
23
|
+
outputs:
|
|
24
|
+
version: ${{ steps.versions.outputs.version }}
|
|
25
|
+
steps:
|
|
26
|
+
- uses: actions/checkout@v4
|
|
27
|
+
|
|
28
|
+
- name: Compare the tag with pyproject.toml
|
|
29
|
+
id: versions
|
|
30
|
+
# Tags use the npm form (0.1.0-dev.1, 0.1.0-alpha.1), which PyPI spells 0.1.0.dev1
|
|
31
|
+
# and 0.1.0a1. Any other form is refused, so a pre-release is never published as a
|
|
32
|
+
# full GitHub release.
|
|
33
|
+
run: |
|
|
34
|
+
tag="${GITHUB_REF_NAME#v}"
|
|
35
|
+
if [[ ! "$tag" =~ ^[0-9]+\.[0-9]+\.[0-9]+(-(dev|alpha|beta|rc)\.[0-9]+)?$ ]]; then
|
|
36
|
+
echo "::error::Tag $tag is not in the npm form, for example 0.1.0-alpha.1"
|
|
37
|
+
exit 1
|
|
38
|
+
fi
|
|
39
|
+
py_version=$(python3 -c "import tomllib;print(tomllib.load(open('pyproject.toml','rb'))['project']['version'])")
|
|
40
|
+
py_expected=$(sed -E -e 's/-dev\./.dev/' -e 's/-alpha\./a/' -e 's/-beta\./b/' -e 's/-rc\./rc/' <<< "$tag")
|
|
41
|
+
if [ "$py_version" != "$py_expected" ]; then
|
|
42
|
+
echo "::error::Tag $tag, PyPI $py_version (expected $py_expected)"
|
|
43
|
+
exit 1
|
|
44
|
+
fi
|
|
45
|
+
echo "version=$tag" >> "$GITHUB_OUTPUT"
|
|
46
|
+
echo "pypi=$py_version" >> "$GITHUB_OUTPUT"
|
|
47
|
+
|
|
48
|
+
- name: Write the release notes
|
|
49
|
+
# Dev releases have no CHANGELOG section: their notes point to Unreleased. Alpha,
|
|
50
|
+
# beta and later releases take their section, and stop here if it is missing,
|
|
51
|
+
# before any upload, while the version is still free on PyPI.
|
|
52
|
+
env:
|
|
53
|
+
TAG: ${{ steps.versions.outputs.version }}
|
|
54
|
+
PY_VERSION: ${{ steps.versions.outputs.pypi }}
|
|
55
|
+
run: |
|
|
56
|
+
if [[ "$TAG" == *-dev.* ]]; then
|
|
57
|
+
echo "Development snapshot of ${GITHUB_SHA::7}. Its changes are listed under" > release-notes.md
|
|
58
|
+
echo "Unreleased in [CHANGELOG.md](CHANGELOG.md)." >> release-notes.md
|
|
59
|
+
else
|
|
60
|
+
python3 .github/scripts/release_notes.py CHANGELOG.md "$PY_VERSION" > release-notes.md
|
|
61
|
+
fi
|
|
62
|
+
|
|
63
|
+
- uses: actions/upload-artifact@v4
|
|
64
|
+
with:
|
|
65
|
+
name: release-notes
|
|
66
|
+
path: release-notes.md
|
|
67
|
+
if-no-files-found: error
|
|
68
|
+
|
|
69
|
+
pypi:
|
|
70
|
+
name: PyPI
|
|
71
|
+
needs: check-version
|
|
72
|
+
runs-on: ubuntu-latest
|
|
73
|
+
environment: pypi
|
|
74
|
+
permissions:
|
|
75
|
+
id-token: write
|
|
76
|
+
steps:
|
|
77
|
+
- uses: actions/checkout@v4
|
|
78
|
+
|
|
79
|
+
- uses: actions/setup-python@v5
|
|
80
|
+
with:
|
|
81
|
+
python-version: "3.12"
|
|
82
|
+
|
|
83
|
+
- name: Install
|
|
84
|
+
run: python -m pip install -e ".[dev]"
|
|
85
|
+
|
|
86
|
+
- name: Lint
|
|
87
|
+
run: |
|
|
88
|
+
ruff check .
|
|
89
|
+
ruff format --check .
|
|
90
|
+
|
|
91
|
+
- name: Unit tests
|
|
92
|
+
run: pytest -q
|
|
93
|
+
|
|
94
|
+
- name: Build
|
|
95
|
+
run: |
|
|
96
|
+
python -m pip install build
|
|
97
|
+
python -m build
|
|
98
|
+
|
|
99
|
+
- name: The wheel installs from PyPI
|
|
100
|
+
# Resolves the OpenRoIS packages from the registry, so a dependency PyPI cannot
|
|
101
|
+
# satisfy stops the release before anything is uploaded.
|
|
102
|
+
run: |
|
|
103
|
+
python -m venv /tmp/clean
|
|
104
|
+
/tmp/clean/bin/pip install dist/*.whl
|
|
105
|
+
/tmp/clean/bin/python -c "import openrois_adapter_mmdagent_ex.components"
|
|
106
|
+
/tmp/clean/bin/openrois-adapter-mmdagent-ex --help
|
|
107
|
+
|
|
108
|
+
- uses: actions/upload-artifact@v4
|
|
109
|
+
with:
|
|
110
|
+
name: wheel
|
|
111
|
+
path: dist/*.whl
|
|
112
|
+
if-no-files-found: error
|
|
113
|
+
|
|
114
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
115
|
+
|
|
116
|
+
github-release:
|
|
117
|
+
name: GitHub release
|
|
118
|
+
needs: [check-version, pypi]
|
|
119
|
+
runs-on: ubuntu-latest
|
|
120
|
+
permissions:
|
|
121
|
+
contents: write
|
|
122
|
+
steps:
|
|
123
|
+
- uses: actions/download-artifact@v4
|
|
124
|
+
with:
|
|
125
|
+
path: artifacts
|
|
126
|
+
|
|
127
|
+
- name: Create or update the release
|
|
128
|
+
# A version with a hyphen, such as 0.1.0-dev.1, is a pre-release.
|
|
129
|
+
env:
|
|
130
|
+
GH_TOKEN: ${{ github.token }}
|
|
131
|
+
GH_REPO: ${{ github.repository }}
|
|
132
|
+
TITLE: MMDAgent-EX adapter ${{ needs.check-version.outputs.version }}
|
|
133
|
+
run: |
|
|
134
|
+
version="${GITHUB_REF_NAME#v}"
|
|
135
|
+
case "$version" in
|
|
136
|
+
*-*) prerelease=true ;;
|
|
137
|
+
*) prerelease=false ;;
|
|
138
|
+
esac
|
|
139
|
+
notes=artifacts/release-notes/release-notes.md
|
|
140
|
+
wheels=(artifacts/wheel/*.whl)
|
|
141
|
+
if gh release view "$GITHUB_REF_NAME" > /dev/null 2>&1; then
|
|
142
|
+
gh release edit "$GITHUB_REF_NAME" --title "$TITLE" \
|
|
143
|
+
--notes-file "$notes" --prerelease="$prerelease"
|
|
144
|
+
gh release upload "$GITHUB_REF_NAME" "${wheels[@]}" --clobber
|
|
145
|
+
else
|
|
146
|
+
gh release create "$GITHUB_REF_NAME" "${wheels[@]}" --verify-tag \
|
|
147
|
+
--title "$TITLE" --notes-file "$notes" --prerelease="$prerelease"
|
|
148
|
+
fi
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[codz]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py.cover
|
|
50
|
+
*.lcov
|
|
51
|
+
.hypothesis/
|
|
52
|
+
.pytest_cache/
|
|
53
|
+
cover/
|
|
54
|
+
|
|
55
|
+
# Translations
|
|
56
|
+
*.mo
|
|
57
|
+
*.pot
|
|
58
|
+
|
|
59
|
+
# Django stuff:
|
|
60
|
+
*.log
|
|
61
|
+
local_settings.py
|
|
62
|
+
db.sqlite3
|
|
63
|
+
db.sqlite3-journal
|
|
64
|
+
|
|
65
|
+
# Flask stuff:
|
|
66
|
+
instance/
|
|
67
|
+
.webassets-cache
|
|
68
|
+
|
|
69
|
+
# Scrapy stuff:
|
|
70
|
+
.scrapy
|
|
71
|
+
|
|
72
|
+
# Sphinx documentation
|
|
73
|
+
docs/_build/
|
|
74
|
+
|
|
75
|
+
# PyBuilder
|
|
76
|
+
.pybuilder/
|
|
77
|
+
target/
|
|
78
|
+
|
|
79
|
+
# Jupyter Notebook
|
|
80
|
+
.ipynb_checkpoints
|
|
81
|
+
|
|
82
|
+
# IPython
|
|
83
|
+
profile_default/
|
|
84
|
+
ipython_config.py
|
|
85
|
+
|
|
86
|
+
# pyenv
|
|
87
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
88
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
89
|
+
# .python-version
|
|
90
|
+
|
|
91
|
+
# pipenv
|
|
92
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
93
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
94
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
95
|
+
# install all needed dependencies.
|
|
96
|
+
# Pipfile.lock
|
|
97
|
+
|
|
98
|
+
# uv
|
|
99
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
100
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
101
|
+
# commonly ignored for libraries.
|
|
102
|
+
# uv.lock
|
|
103
|
+
|
|
104
|
+
# poetry
|
|
105
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
106
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
107
|
+
# commonly ignored for libraries.
|
|
108
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
109
|
+
# poetry.lock
|
|
110
|
+
# poetry.toml
|
|
111
|
+
|
|
112
|
+
# pdm
|
|
113
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
114
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
115
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
116
|
+
# pdm.lock
|
|
117
|
+
# pdm.toml
|
|
118
|
+
.pdm-python
|
|
119
|
+
.pdm-build/
|
|
120
|
+
|
|
121
|
+
# pixi
|
|
122
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
123
|
+
# pixi.lock
|
|
124
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
125
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
126
|
+
.pixi/*
|
|
127
|
+
!.pixi/config.toml
|
|
128
|
+
|
|
129
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
130
|
+
__pypackages__/
|
|
131
|
+
|
|
132
|
+
# Celery stuff
|
|
133
|
+
celerybeat-schedule*
|
|
134
|
+
celerybeat.pid
|
|
135
|
+
|
|
136
|
+
# Redis
|
|
137
|
+
*.rdb
|
|
138
|
+
*.aof
|
|
139
|
+
*.pid
|
|
140
|
+
|
|
141
|
+
# RabbitMQ
|
|
142
|
+
mnesia/
|
|
143
|
+
rabbitmq/
|
|
144
|
+
rabbitmq-data/
|
|
145
|
+
|
|
146
|
+
# ActiveMQ
|
|
147
|
+
activemq-data/
|
|
148
|
+
|
|
149
|
+
# SageMath parsed files
|
|
150
|
+
*.sage.py
|
|
151
|
+
|
|
152
|
+
# Environments
|
|
153
|
+
.env
|
|
154
|
+
.envrc
|
|
155
|
+
.venv
|
|
156
|
+
env/
|
|
157
|
+
venv/
|
|
158
|
+
ENV/
|
|
159
|
+
env.bak/
|
|
160
|
+
venv.bak/
|
|
161
|
+
|
|
162
|
+
# Conda environments
|
|
163
|
+
conda-meta/
|
|
164
|
+
|
|
165
|
+
# Spyder project settings
|
|
166
|
+
.spyderproject
|
|
167
|
+
.spyproject
|
|
168
|
+
|
|
169
|
+
# Rope project settings
|
|
170
|
+
.ropeproject
|
|
171
|
+
|
|
172
|
+
# mkdocs/Zensical documentation
|
|
173
|
+
/site
|
|
174
|
+
|
|
175
|
+
# mypy
|
|
176
|
+
.mypy_cache/
|
|
177
|
+
.dmypy.json
|
|
178
|
+
dmypy.json
|
|
179
|
+
|
|
180
|
+
# Pyre type checker
|
|
181
|
+
.pyre/
|
|
182
|
+
|
|
183
|
+
# pytype static type analyzer
|
|
184
|
+
.pytype/
|
|
185
|
+
|
|
186
|
+
# Cython debug symbols
|
|
187
|
+
cython_debug/
|
|
188
|
+
|
|
189
|
+
# PyCharm
|
|
190
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
191
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
192
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
193
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
194
|
+
# .idea/
|
|
195
|
+
|
|
196
|
+
# Abstra
|
|
197
|
+
# Abstra is an AI-powered process automation framework.
|
|
198
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
199
|
+
# Learn more at https://abstra.io/docs
|
|
200
|
+
.abstra/
|
|
201
|
+
|
|
202
|
+
# Visual Studio Code
|
|
203
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore that
|
|
204
|
+
# can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
205
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer, you
|
|
206
|
+
# could uncomment the following to ignore the entire vscode folder
|
|
207
|
+
# .vscode/
|
|
208
|
+
# Temporary file for partial code execution
|
|
209
|
+
tempCodeRunnerFile.py
|
|
210
|
+
|
|
211
|
+
# Ruff stuff:
|
|
212
|
+
.ruff_cache/
|
|
213
|
+
|
|
214
|
+
# PyPI configuration file
|
|
215
|
+
.pypirc
|
|
216
|
+
|
|
217
|
+
# Marimo
|
|
218
|
+
marimo/_static/
|
|
219
|
+
marimo/_lsp/
|
|
220
|
+
__marimo__/
|
|
221
|
+
|
|
222
|
+
# Streamlit
|
|
223
|
+
.streamlit/secrets.toml
|
|
224
|
+
|
|
225
|
+
# Your settings, copied from adapter.example.yaml.
|
|
226
|
+
adapter.yaml
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- Connection to a running MMDAgent-EX through its Plugin_Remote TCP server, shared by
|
|
13
|
+
all components. It reports ERROR while MMDAgent-EX does not answer and reconnects on
|
|
14
|
+
its own.
|
|
15
|
+
- SystemInformation component: serves `engine_status`.
|
|
16
|
+
- SpeechSynthesis component: speaks `speech_text` with lip sync in a voice of the
|
|
17
|
+
content, chosen by `character` or `language`, and lists them in `available_voices` and
|
|
18
|
+
`synthesizable_languages`. `stop`, or a new `start`, ends the speech with ABORT.
|
|
19
|
+
- Reaction component: plays the motion named by `reaction_ref` once, from the motions
|
|
20
|
+
set in the settings, and lists them in `available_reactions`. `stop`, or a new
|
|
21
|
+
`start`, ends the motion with ABORT.
|
|
22
|
+
- A start whose voice or motion file the content lacks ends with ERROR after
|
|
23
|
+
`connection.start_timeout`.
|
|
24
|
+
- `adapter.example.yaml`, with settings for the MMDAgent-EX Example content.
|
|
25
|
+
|
|
26
|
+
### Known Issues
|
|
27
|
+
|
|
28
|
+
- On Linux, MMDAgent-EX exits when the adapter disconnects, so stopping or restarting
|
|
29
|
+
the adapter stops MMDAgent-EX too. Start MMDAgent-EX again after the adapter.
|
|
30
|
+
- MMDAgent-EX has no volume per speech, so SpeechSynthesis accepts `volume` but does not
|
|
31
|
+
apply it.
|
|
32
|
+
- Tried on Linux with the Example content only, not yet on Windows or macOS.
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Thank you for helping with the OpenRoIS adapter for MMDAgent-EX. This repository follows
|
|
4
|
+
the [contributing guide of the OpenRoIS monorepo](https://github.com/openrois/openrois/blob/main/CONTRIBUTING.md)
|
|
5
|
+
for commits, branches, reviews and the changelog. This page adds what is particular to
|
|
6
|
+
the adapter: the license of contributions, the checks, and where code goes.
|
|
7
|
+
|
|
8
|
+
## License of Contributions
|
|
9
|
+
|
|
10
|
+
The adapter is licensed under the [Apache License, Version 2.0](LICENSE). By sending a
|
|
11
|
+
contribution, you license it under the same terms, as section 5 of the license says.
|
|
12
|
+
You keep the copyright in your contribution: there is no contributor license agreement
|
|
13
|
+
and no copyright assignment.
|
|
14
|
+
|
|
15
|
+
If you contribute as part of your job, make sure your employer allows you to contribute
|
|
16
|
+
under these terms: in many countries, Japan included, the employer owns code written at
|
|
17
|
+
work.
|
|
18
|
+
|
|
19
|
+
## Workflow
|
|
20
|
+
|
|
21
|
+
- Base your branch on `main` and open the pull request against it.
|
|
22
|
+
- Name the branch and write the commits as the monorepo's guide says:
|
|
23
|
+
`feat/reaction-loop`, `fix(speech): keep the quotes in the text`.
|
|
24
|
+
- Add an entry under `## [Unreleased]` in [CHANGELOG.md](CHANGELOG.md) for any change
|
|
25
|
+
a user would notice.
|
|
26
|
+
- Fill in the pull request description with the monorepo's template (What, Why, How,
|
|
27
|
+
Testing).
|
|
28
|
+
|
|
29
|
+
## Checks
|
|
30
|
+
|
|
31
|
+
Run these before you open a pull request. CI runs the same on every pull request:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
uv pip install -e ".[dev]"
|
|
35
|
+
ruff check . && ruff format --check .
|
|
36
|
+
pytest
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
The unit tests run every component against a scripted Plugin_Remote server on a free
|
|
40
|
+
local port, with no MMDAgent-EX and no gateway. The server only sends back each line, as
|
|
41
|
+
MMDAgent-EX does, and the lines each test scripts, recorded from a real MMDAgent-EX. It
|
|
42
|
+
does not imitate MMDAgent-EX.
|
|
43
|
+
|
|
44
|
+
### Tests Against a Real MMDAgent-EX
|
|
45
|
+
|
|
46
|
+
When a change depends on how MMDAgent-EX behaves, run `tests/integration` too, and say in
|
|
47
|
+
the pull request which version and content you tried it with. These tests launch
|
|
48
|
+
MMDAgent-EX for each test, so they need a display and take a few minutes. They are
|
|
49
|
+
skipped unless two variables name the executable and the content:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
OPENROIS_TEST_MMDAGENT_EX=~/repos/mmdagent-ex/MMDAgent-EX/Release/MMDAgent-EX \
|
|
53
|
+
OPENROIS_TEST_MMDAGENT_EX_CONTENT=~/repos/mmdagent-ex/MMDAgent-EX/example/main.mdf \
|
|
54
|
+
pytest tests/integration
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
> [!CAUTION]
|
|
58
|
+
> On Linux, MMDAgent-EX exits when a Plugin_Remote client disconnects. Restart
|
|
59
|
+
> MMDAgent-EX after each run of the adapter, and never probe its port with `nc`.
|
|
60
|
+
|
|
61
|
+
## Where Code Goes
|
|
62
|
+
|
|
63
|
+
The components live in `openrois_adapter_mmdagent_ex.components`, which imports without
|
|
64
|
+
starting the adapter process, so an application can host them in an engine of its own.
|
|
65
|
+
`cli.py` holds the process: the settings, the engine and the gateway connection.
|
|
66
|
+
|
|
67
|
+
Code specific to MMDAgent-EX stays in this repository. A helper that a second adapter
|
|
68
|
+
also needs moves to `openrois-components-common`. A fix to the engine, the gateway or the
|
|
69
|
+
SDK goes to the [monorepo](https://github.com/openrois/openrois) as its own pull request.
|