From 7c4cd3742a2dd79304a59b5579bc97a25c8eba74 Mon Sep 17 00:00:00 2001 From: harryswift01 Date: Wed, 10 Dec 2025 13:30:32 +0000 Subject: [PATCH 1/3] include `.github/workflows/example_package_project-ci.yaml` to setup GitHub actions for Python template --- .../workflows/example_package_project-ci.yaml | 71 +++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 .github/workflows/example_package_project-ci.yaml diff --git a/.github/workflows/example_package_project-ci.yaml b/.github/workflows/example_package_project-ci.yaml new file mode 100644 index 0000000..b333e26 --- /dev/null +++ b/.github/workflows/example_package_project-ci.yaml @@ -0,0 +1,71 @@ +name: example_package_YOUR_USERNAME_HERE CI + +on: + push: + branches: [main] + pull_request: + schedule: + - cron: '0 8 * * 1-5' + workflow_dispatch: + +jobs: + tests: + name: Run tests + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-24.04, windows-2025, macos-15] + python-version: ["3.12", "3.13", "3.14"] + steps: + - name: Checkout repo + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0 + with: + python-version: ${{ matrix.python-version }} + + - name: Install example_package_YOUR_USERNAME_HERE and its testing dependencies + run: pip install -e .[testing] + + - name: Run test suite + run: pytest --cov example_package_YOUR_USERNAME_HERE --cov-report term-missing --cov-append . + + - name: Coveralls GitHub Action + uses: coverallsapp/github-action@5cbfd81b66ca5d10c19b062c04de0199c215fb6e # v2.3.7 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + + docs: + runs-on: ubuntu-latest + timeout-minutes: 15 + steps: + - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 + - name: Set up Python 3.14 + uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0 + with: + python-version: 3.14.0 + - name: Install python dependencies + run: | + pip install --upgrade pip + pip install -e .[docs] + - name: Build docs + run: cd docs && make + + pre-commit: + runs-on: ubuntu-24.04 + timeout-minutes: 15 + steps: + - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 + - name: Set up Python 3.14 + uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0 + with: + python-version: 3.14.0 + - name: Install python dependencies + run: | + pip install --upgrade pip + pip install -e .[pre-commit,docs,testing] + - name: Run pre-commit + run: | + pre-commit install + pre-commit run --all-files || ( git status --short ; git diff ; exit 1 ) From 1388bbd42e32fa9b8dc6db1bca30a6d57a84cb75 Mon Sep 17 00:00:00 2001 From: harryswift01 Date: Wed, 10 Dec 2025 16:05:33 +0000 Subject: [PATCH 2/3] temporarily disable building of docs until `Sphinx` is used --- .github/workflows/example_package_project-ci.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/example_package_project-ci.yaml b/.github/workflows/example_package_project-ci.yaml index b333e26..b926b48 100644 --- a/.github/workflows/example_package_project-ci.yaml +++ b/.github/workflows/example_package_project-ci.yaml @@ -49,8 +49,8 @@ jobs: run: | pip install --upgrade pip pip install -e .[docs] - - name: Build docs - run: cd docs && make + # - name: Build docs + # run: cd docs && make pre-commit: runs-on: ubuntu-24.04 From b3f4a9190bbd71ec413d39a48e3bb83069a1ba6f Mon Sep 17 00:00:00 2001 From: harryswift01 Date: Wed, 10 Dec 2025 16:10:02 +0000 Subject: [PATCH 3/3] apply `pre-commit` hooks to entire repository --- .github/CONTRIBUTING.md | 32 ++++++++++++++++---------------- .github/pull_request_template.md | 8 ++++---- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 438acb7..a85a556 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -10,7 +10,7 @@ This guide explains how to set up your environment, make changes, and submit the ## Getting Started -Before contributing, please review the [Developer Guide](). +Before contributing, please review the [Developer Guide](). It covers REPO-NAME’s architecture, setup instructions, and contribution workflow. If you’re new to the project, we also recommend: @@ -23,19 +23,19 @@ If you’re new to the project, we also recommend: When you’re ready to submit your work: -1. **Push your branch** to GitHub. -2. **Open a [pull request](https://help.github.com/articles/using-pull-requests/)** against the `main` branch. +1. **Push your branch** to GitHub. +2. **Open a [pull request](https://help.github.com/articles/using-pull-requests/)** against the `main` branch. 3. **Fill out the PR template**, including: - - A concise summary of what your PR does - - A list of all changes introduced - - Details on how these changes affect the repository (features, tests, documentation, etc.) + - A concise summary of what your PR does + - A list of all changes introduced + - Details on how these changes affect the repository (features, tests, documentation, etc.) 4. **Verify before submission**: - - All tests pass - - Pre-commit checks succeed - - Documentation is updated where applicable + - All tests pass + - Pre-commit checks succeed + - Documentation is updated where applicable 5. **Review process**: - - Your PR will be reviewed by the core development team. - - At least **one approval** is required before merging. + - Your PR will be reviewed by the core development team. + - At least **one approval** is required before merging. We aim to provide constructive feedback quickly and appreciate your patience during the review process. @@ -45,12 +45,12 @@ We aim to provide constructive feedback quickly and appreciate your patience dur Found a bug or have a feature request? -1. **Open a new issue** on GitHub. -2. Provide a **clear and descriptive title**. +1. **Open a new issue** on GitHub. +2. Provide a **clear and descriptive title**. 3. Include: - - Steps to reproduce the issue (if applicable) - - Expected vs. actual behavior - - Relevant logs, screenshots, or input files + - Steps to reproduce the issue (if applicable) + - Expected vs. actual behavior + - Relevant logs, screenshots, or input files Well-documented issues help us address problems faster and keep REPO-NAME stable and robust. diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 9fca430..6b7db57 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -5,16 +5,16 @@ ### Change 1 : - -- +- ### Change 2 : - -- +- ### Change 3 : - -- +- ## Impact - -- +-