Skip to content

docs: align contributor lint guide with current CI - #2398

Open
Runqi Wang (Allen) (runqiwang777) wants to merge 1 commit into
microsoft:mainfrom
runqiwang777:docs-refresh-ci-guide
Open

Runqi Wang (Allen) (runqiwang777) wants to merge 1 commit into
microsoft:mainfrom
runqiwang777:docs-refresh-ci-guide

Conversation

@runqiwang777

Copy link
Copy Markdown

Description

  • In docs/developer/code_standard_and_dev_guide.rst, replace the two references to the historical .github/workflows/test.yml at commit 0e8b94a with a link to the current .github/workflows/test_qlib_from_source.yml.
  • Replace pip install black and python -m black . -l 120 with python -m pip install -e ".[lint]" and make black. Explain that black <file> -l 120 formats a changed file, while make black checks the repository.
  • Replace the historical pylint workflow pointer with make pylint, and replace the copied flake8 command with make flake8. These are the targets invoked by the current workflow.
  • Keep the pre-commit section unchanged.

Motivation and Context

The guide still points to an older test.yml workflow. The link works, but the flake8 anchor at #L73 lands on “Test workflow by config (install from pip)” instead of a flake8 check. The current source-test workflow runs make black, make pylint, and make flake8.

The copied flake8 command also ignores F401, F821, and F841 globally. The current Makefile target does not ignore F821 or F841 and only makes F401/F403 exceptions for __init__.py. Using the Makefile targets should help contributors get the same results locally as they do in CI. Thanks for taking a look!

How Has This Been Tested?

  • Pass the test by running: pytest qlib/tests/test_all_pipeline.py under upper directory of qlib.
  • If you are adding a new feature, test on your own test scripts.

Compared the updated guide with the current source-test workflow, Makefile, and pyproject.toml. git diff --check and git apply --check passed against the verified upstream file baseline. The updated RST parsed with docutils 0.23 without warnings, and the new workflow URL was recognized as a link. A full Sphinx build was not run because Sphinx was unavailable locally.

Screenshots of Test Results (if appropriate):

  1. Pipeline test: Not run; this is a documentation-only change.
  2. Your own tests: The diff, patch, and docutils checks described above passed. No screenshots apply.

Types of changes

  • Fix bugs
  • Add new feature
  • Update documentation

@runqiwang777

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

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.

1 participant