Skip to content

feat: add download_examples command#87

Merged
J1awei-Yang merged 8 commits intoMemTensor:devfrom
Ki-Seki:Ki-Seki/issue52
Jul 16, 2025
Merged

feat: add download_examples command#87
J1awei-Yang merged 8 commits intoMemTensor:devfrom
Ki-Seki:Ki-Seki/issue52

Conversation

@Ki-Seki
Copy link
Member

@Ki-Seki Ki-Seki commented Jul 15, 2025

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 exit

Fix: #52

Reviewer: @J1awei-Yang

Checklist:

  • I have performed a self-review of my own code | 我已自行检查了自己的代码
  • I have commented my code in hard-to-understand areas | 我已在难以理解的地方对代码进行了注释
  • I have added tests that prove my fix is effective or that my feature works | 我已添加测试以证明我的修复有效或功能正常
  • I have added necessary documentation (if applicable) | 我已添加必要的文档(如果适用)
  • I have linked the issue to this PR (if applicable) | 我已将 issue 链接到此 PR(如果适用)
  • I have mentioned the person who will review this PR | 我已提及将审查此 PR 的人

Copilot AI review requested due to automatic review settings July 15, 2025 09:16

This comment was marked as outdated.

@Ki-Seki Ki-Seki marked this pull request as draft July 15, 2025 09:19
@Ki-Seki Ki-Seki requested a review from J1awei-Yang July 15, 2025 09:59
@Ki-Seki Ki-Seki marked this pull request as ready for review July 15, 2025 10:44
@Ki-Seki Ki-Seki requested a review from Copilot July 15, 2025 11:46
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_examples in src/memos/cli.py and updates tests accordingly
  • Removes the standalone scripts/export_openapi.py and registers the memos script in pyproject.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_examples is placed after the import statement, so it won't be recognized as the function's docstring. Move it immediately after the def download_examples line 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.makedirs and open calls (or on the extracted_files list) to fully cover the extraction logic.
        assert result is True

README.md:177

  • The README documents the download_examples command but doesn’t include an example for export_openapi. Adding a brief usage snippet for memos export_openapi --output <path> will keep the CLI documentation complete.
#### Download Examples

Ki-Seki and others added 2 commits July 15, 2025 19:48
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@J1awei-Yang J1awei-Yang merged commit a6b1574 into MemTensor:dev Jul 16, 2025
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants