Skip to content

examples: consolidate folders, remove redundant dirs, strip emojis#1244

Merged
SkBlaz merged 4 commits intomasterfrom
copilot/refine-and-simplify-folder-structure
Feb 22, 2026
Merged

examples: consolidate folders, remove redundant dirs, strip emojis#1244
SkBlaz merged 4 commits intomasterfrom
copilot/refine-and-simplify-folder-structure

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 22, 2026

  • Update scripts/generate_docs_outputs.py — change EXAMPLES_DIR from examples/docs to examples/getting_started
  • Update tests/test_docs_examples.py — change EXAMPLES_DIR from examples/docs to examples/getting_started; update docstring
  • Verified examples/getting_started/ contains 15 Python files (including the original 01_basic_query.py and 02_community_detection.py), so the generate script will no longer exit with code 1
  • Fix generate_docs_outputs.py to skip files with SKIP_CI marker — adds should_skip() helper and skips mcp_quickstart.py (and 3 other slow/external-dep files) instead of executing them and failing
  • Fix test_docs_examples.py to call pytest.skip() for files with SKIP_CI marker in test_individual_example

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

…, simplify README

Co-authored-by: SkBlaz <10035780+SkBlaz@users.noreply.github.com>
Copilot AI changed the title [WIP] Refine and simplify folder structure by removing redundancy examples: consolidate folders, remove redundant dirs, strip emojis Feb 22, 2026
Copilot AI requested a review from SkBlaz February 22, 2026 07:20
@SkBlaz
Copy link
Copy Markdown
Owner

SkBlaz commented Feb 22, 2026

@copilot The job failed because no examples were found in /home/runner/work/py3plex/py3plex/examples/docs, resulting in a process exit code 1. To fix this, ensure that the directory py3plex/examples/docs exists and contains example files as expected by the workflow. If these examples are missing, add relevant example files or update the workflow to target the correct directory. If the directory should be excluded, adjust the workflow definition to prevent it from looking for nonexistent files.

…moved

Co-authored-by: SkBlaz <10035780+SkBlaz@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Feb 22, 2026

@copilot The job failed because no examples were found in /home/runner/work/py3plex/py3plex/examples/docs, resulting in a process exit code 1. To fix this, ensure that the directory py3plex/examples/d...

Fixed in commit 519e5b4. The examples/docs/ directory was removed during folder consolidation, but scripts/generate_docs_outputs.py and tests/test_docs_examples.py still referenced it. Both files now point to examples/getting_started/ (where 01_basic_query.py and 02_community_detection.py were moved), so the generate script will find 15 examples instead of failing with exit code 1.

@SkBlaz
Copy link
Copy Markdown
Owner

SkBlaz commented Feb 22, 2026

@copilot The failure is in the mcp_quickstart example, specifically at /examples/getting_started/mcp_quickstart.py line 248. The logs do not provide the exact error message, but the job failed during this script's execution.

To resolve this:

  1. Review the code near line 248 in mcp_quickstart.py. Look for uncaught exceptions, invalid operations, or missing dependencies.
  2. Ensure that all required packages and files referenced in the script are available and imported correctly.
  3. Add detailed error handling around the logic at line 248 (try/except or assertions) to capture what’s wrong and output a clear error message.

Code suggestion for more robust error diagnostics:

try:
    # Code around line 248 that is failing
except Exception as e:
    print(f"Error at line 248: {e}")
    raise

If you provide the code from mcp_quickstart.py near line 248, I can give more precise recommendations.

Co-authored-by: SkBlaz <10035780+SkBlaz@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Feb 22, 2026

@copilot The failure is in the mcp_quickstart example, specifically at /examples/getting_started/mcp_quickstart.py line 248. The logs do not provide the exact error message, but the job failed during ...

Fixed in commit b8fa8bb. mcp_quickstart.py already declared SKIP_CI: true in its docstring (it's a documentation file with JSON pseudocode, not runnable Python), but generate_docs_outputs.py and test_docs_examples.py were not respecting that marker.

The fix adds a should_skip() helper to generate_docs_outputs.py that reads the first 20 lines of each file and skips any that contain SKIP_CI. The same check is added to test_individual_example in test_docs_examples.py using pytest.skip(). This correctly skips mcp_quickstart.py (and 3 other marked files: example_multilayer_functionality.py, example_nx_wrapper.py, tutorial_10min.py) without treating them as failures.

@SkBlaz SkBlaz marked this pull request as ready for review February 22, 2026 17:37
@SkBlaz SkBlaz merged commit 554f13a into master Feb 22, 2026
33 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