Skip to content

ci: execute workflow_by_code.ipynb in GitHub Actions (closes #1278)#2241

Open
anupddas wants to merge 2 commits into
microsoft:mainfrom
anupddas:feat/ci-notebook-workflow-by-code
Open

ci: execute workflow_by_code.ipynb in GitHub Actions (closes #1278)#2241
anupddas wants to merge 2 commits into
microsoft:mainfrom
anupddas:feat/ci-notebook-workflow-by-code

Conversation

@anupddas
Copy link
Copy Markdown

Summary

Closes #1278

Adds a dedicated GitHub Actions workflow that executes examples/workflow_by_code.ipynb
end-to-end on every push/PR that touches the notebook or core qlib code.

Changes

  • .github/workflows/test_notebook.yml — new workflow using pytest-nbmake
  • Makefile — new nbmake target (mirrors CI, runnable locally via make nbmake)
  • examples/workflow_by_code.ipynb — add CI environment detection cell
  • tests/test_workflow_notebook.py — fast structural tests for the notebook
  • .pre-commit-config.yaml — add nbstripout hook to keep outputs stripped

How to test locally

make dev
pip install "nbmake>=1.3.5" ipykernel numba
python scripts/get_data.py qlib_data --name qlib_data_simple \
    --target_dir ~/.qlib/qlib_data/cn_data --interval 1d --region cn
make nbmake

Checklist

  • CI passes on this PR
  • Follows existing test_qlib_from_source.yml patterns
  • Signed-off-by included (DCO)

anupddas added 2 commits May 30, 2026 13:07
ci: add GitHub Actions job to execute workflow_by_code.ipynb
Renamed 'lint' target to 'install-lint' to avoid collision with the lint check-runner target. Added new 'nbmake' target for executing notebook tests.
@anupddas
Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

Copy link
Copy Markdown

@CHGY003 CHGY003 left a comment

Choose a reason for hiding this comment

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

感谢帮忙修改bug

@anupddas
Copy link
Copy Markdown
Author

anupddas commented Jun 1, 2026

感谢帮忙修改bug

You're welcome! Glad I could help fix the issue. Let me know if any changes are needed once the workflows finish running.

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.

Add CI for jupyter notebook example workflow_by_code.ipynb

2 participants