Skip to content

ci: add a windows runner#111

Merged
avsm merged 11 commits intoucam-eo:mainfrom
avsm:windows-ci
Dec 2, 2025
Merged

ci: add a windows runner#111
avsm merged 11 commits intoucam-eo:mainfrom
avsm:windows-ci

Conversation

@avsm
Copy link
Contributor

@avsm avsm commented Nov 22, 2025

this will fail until #110 but checking it gets as far as the build

@avsm
Copy link
Contributor Author

avsm commented Nov 22, 2025

@copilot look at the windows failure and figure out why the cram binary cannot be found on windows

@avsm avsm marked this pull request as draft November 22, 2025 19:14
@avsm avsm requested a review from Copilot November 22, 2025 19:14
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds Windows support to the CI pipeline by including windows-latest in the test matrix and adapting the workflow to handle platform-specific requirements for GDAL installation and test execution.

  • Added Windows runner to the CI matrix alongside existing Ubuntu and macOS runners
  • Modified GDAL installation for Windows to use a third-party GitHub Action instead of Chocolatey
  • Split test execution into separate Unix and Windows steps to accommodate PowerShell syntax differences

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
pyproject.toml Added pip to build-system requirements (though this may not be necessary)
.github/workflows/ci.yml Added Windows runner to matrix, reorganized setup steps, implemented Windows-specific GDAL installation and test execution

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

run: choco install gdal
- name: install pip (Windows)
if: runner.os == 'Windows'
run: uv pip install pip cram
Copy link

Copilot AI Nov 22, 2025

Choose a reason for hiding this comment

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

cram is being installed twice in the Windows workflow: once in this step (line 37) and again in the "Test (Windows)" step (line 56). The installation here is redundant since uv sync --locked --all-extras --dev in the Build step should install all development dependencies including cram. Consider removing the cram installation from this line.

Suggested change
run: uv pip install pip cram
run: uv pip install pip

Copilot uses AI. Check for mistakes.
run: |
$env:TERM = "dumb"
$env:TTY_INTERACTIVE = "0"
uv pip install cram
Copy link

Copilot AI Nov 22, 2025

Choose a reason for hiding this comment

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

cram is being installed again here, but it should already be available from the uv sync --locked --all-extras --dev command in the Build step (line 46). This redundant installation should be removed. If cram is not being installed by uv sync, it suggests it's not properly declared in the project's dev dependencies, which should be fixed there instead.

Suggested change
uv pip install cram

Copilot uses AI. Check for mistakes.
@avsm
Copy link
Contributor Author

avsm commented Nov 22, 2025

@copilot look at the test failures; cram is not being found

@dra27
Copy link
Contributor

dra27 commented Nov 28, 2025

The main error is the regexp in _parse_npy_filename, I think - it's matching on forward slashes only (around L486 in geotessera/tiles.py)

@avsm avsm marked this pull request as ready for review December 1, 2025 07:19
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +687 to 690
tmp.close()
country_gdf.to_file(tmp.name, driver="GeoJSON")
country_geojson_file = tmp.name

Copy link

Copilot AI Dec 1, 2025

Choose a reason for hiding this comment

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

Calling tmp.close() explicitly inside the context manager is problematic. The file will be closed twice - once by the explicit close() call and again when exiting the with block. Instead, use the context manager's file handle and close it naturally, or restructure to close and open outside the context manager. Consider using delete=False with the context manager exiting naturally, then calling to_file() after the with block.

Suggested change
tmp.close()
country_gdf.to_file(tmp.name, driver="GeoJSON")
country_geojson_file = tmp.name
tmp_name = tmp.name
country_gdf.to_file(tmp_name, driver="GeoJSON")
country_geojson_file = tmp_name

Copilot uses AI. Check for mistakes.
Write-Host "$($item.Name)/" -ForegroundColor Cyan
}

$children = Get-ChildItem -Path $Path -ErrorAction SilentlyContinue | Sort-Object { -not $_.PSIsContainer }, Name
Copy link

Copilot AI Dec 1, 2025

Choose a reason for hiding this comment

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

The property PSIsContainer is deprecated in PowerShell 7+. Consider using the PSIsDirectory property instead for future compatibility. This should be: Sort-Object { -not $_.PSIsDirectory }, Name

Copilot uses AI. Check for mistakes.
avsm and others added 3 commits December 1, 2025 15:41
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@avsm avsm merged commit d2fae94 into ucam-eo:main Dec 2, 2025
12 checks passed
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.

2 participants