Skip to content

v4.5a (alpha version)#483

Merged
ajfriend merged 14 commits intomasterfrom
v4.5a
Feb 26, 2026
Merged

v4.5a (alpha version)#483
ajfriend merged 14 commits intomasterfrom
v4.5a

Conversation

@ajfriend
Copy link
Collaborator

@ajfriend ajfriend commented Feb 25, 2026

Motivated by #482, I was thinking of making an alpha release to provide early access to the new cells-to-poly functionality.

This would also have the benefit of testing out upstream C library changes in at least one binding ahead of the final release.

This change ended up focusing on modernizing the library tooling. To isolate any issues due to that modernization, I'll add the cellsToMultiPolygon in a separate alpha release.

Summary

Alpha release to prepare for testing h3lib draft v4.5 changes (like cellsToMultiPolygon). This PR focuses on modernizing the build and CI tooling.

h3lib update

Bumps h3lib to an unreleased commit with changes planned for v4.5. The h3-py version is set to 4.5.0a1 to reflect this, and the version check test is relaxed for prerelease versions.

Drop Python 3.8 and 3.9

Both reached end-of-life (3.8 in Oct 2024, 3.9 in Oct 2025). Dropping them also unblocks, for example, sphinx>=7.3.3 (which requires Python 3.9). Since uv resolves dependencies across all supported Python versions, keeping 3.8 in requires-python made it impossible to resolve the docs dependencies alongside dev dependencies.

In general, going forward, dropping EOL Python versions will make it easier to support and develop h3-py.

Python 3.14 is now documented as supported in pyproject.toml.

Migrate to uv and justfile

Replaces the pip and makefile workflow with uv and a justfile:

  • uv speeds up build time significantly over the previous pip workflow
  • justfile for common dev commands (just test, just lint, just docs)

CI modernization

  • actions/setup-python to astral-sh/setup-uv
  • CI workflows reuse justfile commands rather than duplicating test/lint logic
  • pipx run to uvx
  • Removed Python 3.8/3.9 from test matrix and wheel builds

if v_p.is_prerelease:
# For alpha releases, only major version must match
assert v_c.release[0] == v_p.release[0]
else: # pragma: no cover
Copy link
Collaborator

Choose a reason for hiding this comment

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

shouldn't the no cover comment be on the prerelease branch, so when we switch back to that the coverage goes back up?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Well, the tricky part is that we fail on anything less than 100% coverage. Let me try another approach.

Copy link
Collaborator Author

@ajfriend ajfriend Feb 26, 2026

Choose a reason for hiding this comment

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

Just updated. What do you think of this approach? We always at least test the major version and that's included in coverage.

For full releases, we also always check the minor version for mismatch (which is what we want this test for), but we just have this branch not contribute to coverage, which I think is OK.

CI still fails if we fall below 100% coverage.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I see, if we enforce 100% does that mean that CI would have required you to adjust the no cover comment in order to release? If so then the original approach is fine since there is no risk of forgetting to cover those lines upon release.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, with the previous version, we would have had to switch.

With the current version, we don't have to switch. We pay for it by skipping coverage on that line (for release builds), but I think that's OK. We're still running the test, and we don't get much benefit from computing coverage for that specific line.

'src/h3lib',
'docs',
'dev_notes.md',
'makefile',
Copy link
Collaborator

Choose a reason for hiding this comment

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

do we need to exclude justfile here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes. I'll fix.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

...and found a few others that would clean up the sdist.

@ajfriend ajfriend merged commit 9a7d6df into master Feb 26, 2026
41 checks passed
@ajfriend ajfriend deleted the v4.5a branch February 26, 2026 22:12
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.

3 participants