feat: add download_examples command#87
Merged
J1awei-Yang merged 8 commits intoMemTensor:devfrom Jul 16, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
Adds a unified CLI entry point under memos and introduces a new download_examples command alongside the existing export_openapi functionality.
- Implements
download_examplesinsrc/memos/cli.pyand updates tests accordingly - Removes the standalone
scripts/export_openapi.pyand registers thememosscript inpyproject.toml - Updates documentation and Makefile to reflect the new CLI usage
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/test_cli.py | Added tests for download_examples and export_openapi commands |
| src/memos/cli.py | Implemented new download_examples command and centralized CLI |
| scripts/export_openapi.py | Removed legacy standalone export script |
| pyproject.toml | Registered memos entry point under Poetry scripts |
| README.md | Added documentation for download_examples command |
| Makefile | Updated openapi target to use memos export_openapi |
Comments suppressed due to low confidence (3)
src/memos/cli.py:33
- The docstring in
download_examplesis placed after theimportstatement, so it won't be recognized as the function's docstring. Move it immediately after thedef download_examplesline to properly document the function.
"""Download examples from the MemOS repository."""
tests/test_cli.py:67
- This test checks the return value but doesn't verify that directories and files are actually created. Consider adding assertions on
os.makedirsandopencalls (or on theextracted_fileslist) to fully cover the extraction logic.
assert result is True
README.md:177
- The README documents the
download_examplescommand but doesn’t include an example forexport_openapi. Adding a brief usage snippet formemos export_openapi --output <path>will keep the CLI documentation complete.
#### Download Examples
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
J1awei-Yang
approved these changes
Jul 16, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Summary: Create unified CLI endpoints and add a download examples command. Now we have two commands available as below.
memoryos-py3.10(base) ➜ MemOS git:(Ki-Seki/issue52) ✗ memos --help usage: memos [-h] {download_examples,export_openapi} ... MemOS Command Line Interface positional arguments: {download_examples,export_openapi} Available commands download_examples Download example files export_openapi Export OpenAPI schema to JSON file options: -h, --help show this help message and exitFix: #52
Reviewer: @J1awei-Yang
Checklist: