diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 73af754..9db777f 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,34 +1,29 @@ ## Summary -- What changed? -- Why was it needed? + -## Scope +## Type of change -- [ ] `training-py` -- [ ] `nan-python-engineering-labs` -- [ ] Both repos +- [ ] Documentation +- [ ] Bug fix +- [ ] New or updated learning content +- [ ] Repository tooling +- [ ] Other -## Validation +## How Has This Been Tested? -- [ ] `scripts/validate_all_modules.py` -- [ ] `scripts/run_topic_tests.py ` -- [ ] Relevant examples executed when applicable + -Paste key outputs: +- [ ] `uv run scripts/validate_all_modules.py` +- [ ] `uv run scripts/validate_ci_gate.py` +- [ ] `uv run scripts/run_topic_tests.py TARGET` +- [ ] Manual validation (describe below) -```text -SUMMARY: ... -``` + ## Checklist -- [ ] Commit messages are in English -- [ ] No TODO placeholders introduced -- [ ] `exercise/exercise_01.py` remains English-only -- [ ] No unrelated files were modified - -## Risks / Notes - -- Potential impact: -- Follow-up tasks (if any): +- [ ] I followed the contribution guidelines. +- [ ] I kept the change focused and used English throughout. +- [ ] I added or updated tests and documentation where applicable. +- [ ] I did not introduce TODO placeholders or unrelated changes. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c1fd558..3435dea 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,35 +1,68 @@ # Contributing -## Branches +Thank you for helping improve Python Engineering Labs. Keep contributions focused, +beginner-friendly, and written in English. -- Work from `main` using short-lived feature branches. -- Keep one logical change per branch. +## Prerequisites -## Commits +- [Git](https://git-scm.com/) +- Python 3.12 or newer +- [uv](https://docs.astral.sh/uv/) -- Use English commit messages. -- Keep commits focused and small. -- Avoid mixing infra and content changes in the same commit when possible. +You can also use the repository's Dev Container. See +[Getting Started](GETTING_STARTED.md) for the complete setup options. -## Validation Before Commit +## Local setup -Run from repo root: +Fork the repository on GitHub, then clone your fork: ```bash +git clone https://github.com/YOUR_GITHUB_USERNAME/nan-python-engineering-labs.git +cd nan-python-engineering-labs +uv venv +``` + +Activate the virtual environment: + +```bash +# macOS or Linux source .venv/bin/activate -python scripts/validate_all_modules.py -python scripts/run_topic_tests.py 01_python_fundamentals/advanced_strings + +# Windows PowerShell +.venv\Scripts\Activate.ps1 ``` -Or using `uv run`: +Install the development dependencies: + +```bash +uv pip install -e ".[dev]" +pre-commit install +``` + +Install all optional dependencies with `uv pip install -e ".[all]"` when your +change needs the full curriculum validation used in CI. + +## Validate your change + +Run the checks that match your change from the repository root: ```bash uv run scripts/validate_all_modules.py +uv run scripts/validate_ci_gate.py uv run scripts/run_topic_tests.py 01_python_fundamentals/advanced_strings ``` -## Pull Requests +Run all topic tests with `uv run scripts/run_topic_tests.py`. For documentation-only +changes, preview the rendered Markdown and state in the pull request when automated +tests do not apply. + +## Submit a pull request + +1. Create a short-lived branch from `main` for one logical change. +1. Use focused commits with English messages. +1. Push the branch to your fork and open a pull request against `main`. +1. Complete the pull request template with the related issue, validation evidence, + and any risks or follow-up work. -- Use the PR template. -- Include scope, validation evidence, and risks. -- Do not include unrelated changes. +Before submitting, review the repository conventions in [AGENTS.md](AGENTS.md) and +keep unrelated changes out of the pull request.