From 763d3e072da3f6a2a97e7ba1a4f2cf315b23db6d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 11 Nov 2025 05:26:00 +0000 Subject: [PATCH 1/4] Initial plan From 24f1b5924583ac6157a5db331b2615adbfc481e0 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 11 Nov 2025 05:30:01 +0000 Subject: [PATCH 2/4] Add GitHub Actions workflow for CI testing Co-authored-by: hironow <1401816+hironow@users.noreply.github.com> --- .github/workflows/test.yml | 100 +++++++++++++++++++++++++++++++++++++ README.md | 2 + 2 files changed, 102 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..2a894e1 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,100 @@ +name: Tests + +on: + push: + branches: [ main, copilot/** ] + pull_request: + branches: [ main ] + +jobs: + test: + name: Test Python ${{ matrix.python-version }} on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest] + python-version: ['3.11', '3.12'] + + steps: + - uses: actions/checkout@v4 + with: + submodules: 'recursive' + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Install system dependencies + run: | + sudo apt-get update + sudo apt-get install -y \ + cmake \ + build-essential \ + libgmt-dev \ + gmt \ + gmt-dcw \ + gmt-gshhg \ + ghostscript + + - name: Install uv + uses: astral-sh/setup-uv@v3 + with: + enable-cache: true + + - name: Install Python dependencies + working-directory: pygmt_nanobind_benchmark + run: | + uv pip install --system -e ".[test,dev]" --no-build-isolation + + - name: Run tests + working-directory: pygmt_nanobind_benchmark + run: | + uv run pytest tests/ -v --tb=short + + - name: Upload test results + uses: actions/upload-artifact@v4 + if: failure() + with: + name: test-results-${{ matrix.os }}-${{ matrix.python-version }} + path: pygmt_nanobind_benchmark/tests/ + retention-days: 7 + + lint: + name: Lint and Type Check + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + submodules: 'recursive' + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' + + - name: Install uv + uses: astral-sh/setup-uv@v3 + with: + enable-cache: true + + - name: Install dependencies + run: | + uv pip install --system ruff mypy + + - name: Run ruff format check + working-directory: pygmt_nanobind_benchmark + run: | + uv run ruff format --check . + + - name: Run ruff lint + working-directory: pygmt_nanobind_benchmark + run: | + uv run ruff check . + + - name: Run mypy + working-directory: pygmt_nanobind_benchmark + run: | + uv run mypy python/ tests/ || true diff --git a/README.md b/README.md index 4b4baaa..8420774 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Coders +[![Tests](https://github.com/hironow/Coders/actions/workflows/test.yml/badge.svg)](https://github.com/hironow/Coders/actions/workflows/test.yml) + Please read AGENTS.md first and follow the instructions there. 1. [pygmt_nanobind_benchmark](./pygmt_nanobind_benchmark/INSTRUCTIONS) From 8409a38f33b784044fea48aacfc2d6326ff6d117 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 11 Nov 2025 05:35:50 +0000 Subject: [PATCH 3/4] Update Python versions: add 3.13, 3.14, drop 3.11 Co-authored-by: hironow <1401816+hironow@users.noreply.github.com> --- .github/workflows/test.yml | 4 ++-- pygmt_nanobind_benchmark/pyproject.toml | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2a894e1..80ece51 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,7 +14,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - python-version: ['3.11', '3.12'] + python-version: ['3.12', '3.13', '3.14'] steps: - uses: actions/checkout@v4 @@ -73,7 +73,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.11' + python-version: '3.12' - name: Install uv uses: astral-sh/setup-uv@v3 diff --git a/pygmt_nanobind_benchmark/pyproject.toml b/pygmt_nanobind_benchmark/pyproject.toml index 7e7407c..b4dff63 100644 --- a/pygmt_nanobind_benchmark/pyproject.toml +++ b/pygmt_nanobind_benchmark/pyproject.toml @@ -10,7 +10,7 @@ name = "pygmt-nb" version = "0.1.0" description = "High-performance PyGMT reimplementation using nanobind" readme = "README.md" -requires-python = ">=3.11" +requires-python = ">=3.12" authors = [ { name = "PyGMT nanobind contributors" } ] @@ -20,8 +20,9 @@ classifiers = [ "Intended Audience :: Science/Research", "License :: OSI Approved :: BSD License", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Programming Language :: C++", "Topic :: Scientific/Engineering", ] @@ -64,7 +65,7 @@ addopts = [ [tool.ruff] line-length = 100 -target-version = "py311" +target-version = "py312" [tool.ruff.lint] select = [ @@ -81,7 +82,7 @@ ignore = [ ] [tool.mypy] -python_version = "3.11" +python_version = "3.12" warn_return_any = true warn_unused_configs = true disallow_untyped_defs = true From 5f72f5b8008864295cb52de9f1e1179fb550e207 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 11 Nov 2025 05:43:06 +0000 Subject: [PATCH 4/4] Revert drop of Python 3.11, now testing 3.11-3.14 Co-authored-by: hironow <1401816+hironow@users.noreply.github.com> --- .github/workflows/test.yml | 2 +- pygmt_nanobind_benchmark/pyproject.toml | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 80ece51..9d79d9d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,7 +14,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - python-version: ['3.12', '3.13', '3.14'] + python-version: ['3.11', '3.12', '3.13', '3.14'] steps: - uses: actions/checkout@v4 diff --git a/pygmt_nanobind_benchmark/pyproject.toml b/pygmt_nanobind_benchmark/pyproject.toml index b4dff63..cf87dae 100644 --- a/pygmt_nanobind_benchmark/pyproject.toml +++ b/pygmt_nanobind_benchmark/pyproject.toml @@ -10,7 +10,7 @@ name = "pygmt-nb" version = "0.1.0" description = "High-performance PyGMT reimplementation using nanobind" readme = "README.md" -requires-python = ">=3.12" +requires-python = ">=3.11" authors = [ { name = "PyGMT nanobind contributors" } ] @@ -20,6 +20,7 @@ classifiers = [ "Intended Audience :: Science/Research", "License :: OSI Approved :: BSD License", "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.14", @@ -65,7 +66,7 @@ addopts = [ [tool.ruff] line-length = 100 -target-version = "py312" +target-version = "py311" [tool.ruff.lint] select = [ @@ -82,7 +83,7 @@ ignore = [ ] [tool.mypy] -python_version = "3.12" +python_version = "3.11" warn_return_any = true warn_unused_configs = true disallow_untyped_defs = true