Add dynamics and embed commands to CLI tool - #1428
Conversation
|
@copilot proceed |
- Supports 5 algorithms: node2vec, deepwalk, netmf, line, metapath2vec - Algorithm-specific parameters (p/q for node2vec, metapath for metapath2vec) - JSON and CSV output formats - 7 test cases covering all algorithms and validation
- Add dynamics command example (SIR epidemic simulation) - Add embed command example (Node2Vec embeddings) - Both examples in Advanced Features section
Completed Phase 1 of CLI coverage improvements. Added two high-priority commands: dynamics command - Epidemic simulations (SIS, SIR, SEIR models) Both commands include:
Ready for review. See CLI_COVERAGE_PLAN.md for the complete gap analysis and next phases (temporal, uq, nullmodel commands). |
|
@copilot The failure is caused by a missing import in Root causeThe job log shows:
At that location, the new description=textwrap.dedent(but FixAdd the missing import near the other standard-library imports in import argparse
import json
import random
import shutil
import sys
import tempfile
import textwrap
import tracebackSuggested patchdiff --git a/py3plex/cli.py b/py3plex/cli.py
@@
import argparse
import json
import random
import shutil
import sys
import tempfile
+import textwrap
import traceback
from pathlib import Path
from typing import Any, Dict, List, OptionalWhy this fixes the jobThe workflow’s test job runs the CLI entrypoint from
Because Optional cleanupI also noticed a duplicate command handler entry: "embed": cmd_embed,
"embed": cmd_embed,in |
... Fixed in commit 3f7a8e1:
The CLI parser will now create successfully without the |
This PR improves CLI tool coverage by adding two high-priority commands identified through a comprehensive gap analysis of the py3plex library.
Changes Made
Gap Analysis
New Commands
1. dynamics - Epidemic simulations on multilayer networks
Q.dynamics()2. embed - Node embeddings for representation learning
Documentation
Testing
Summary
Total additions: ~650 lines of implementation and tests across 3 files (cli.py, test_cli.py, AGENTS.md). Both commands follow existing CLI patterns and integrate seamlessly with py3plex's DSL v2 builder API.