Skip to content

Prepare repo for initial release#5

Merged
horgh merged 9 commits into
mainfrom
greg/eng-4103
Feb 10, 2026
Merged

Prepare repo for initial release#5
horgh merged 9 commits into
mainfrom
greg/eng-4103

Conversation

@oschwald
Copy link
Copy Markdown
Member

Summary

  • Dual-license under Apache-2.0 OR MIT, matching other MaxMind Python libraries
  • Add mise configuration for consistent tooling (uv)
  • Add GitHub Actions workflows: CI test matrix, CodeQL, zizmor, PyPI release, Dependabot
  • Set version to 0.1.0, fix HISTORY.rst date, and use __version__ in tests
  • Update README with missing Path import, error handling docs, bug reports, and versioning sections

Test plan

  • uv run pytest tests/test_cli.py -x -q -k test_version passes
  • uv run ruff check src/ tests/ passes
  • CI workflows pass on GitHub

🤖 Generated with Claude Code

oschwald and others added 5 commits February 10, 2026 08:18
Match the Go geoipupdate project's licensing. Rename LICENSE to
LICENSE-APACHE, add LICENSE-MIT, and update pyproject.toml and
README.md accordingly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Configures mise to provide uv with strict lockfile enforcement
(locked = true) and SHA-256 checksums for all platforms. Python
deps remain managed by uv, not mise.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add CI workflows matching GeoIP2-python conventions:
- test.yml: matrix across Python 3.11-3.14 and 4 OS targets
- release.yml: build sdist/wheel, publish to PyPI on release
- codeql-analysis.yml: CodeQL security scanning
- zizmor.yml: GitHub Actions workflow security analysis
- dependabot.yml: automated updates for uv deps and Actions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Set version to 0.1.0, update HISTORY.rst to match, and use
__version__ import in version tests to prevent breakage on
future version bumps.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add missing Path import to from_file example, document the
exception hierarchy for library users, and add Bug Reports
and Versioning sections to match sibling MaxMind projects.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-advanced-security
Copy link
Copy Markdown

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @oschwald, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request prepares the repository for its initial release by establishing foundational elements for project management, licensing, and continuous integration. It standardizes tooling, clarifies versioning, and enhances documentation to ensure a robust and maintainable codebase from the outset.

Highlights

  • Dual-Licensing: The repository is now dual-licensed under Apache-2.0 OR MIT, aligning with other MaxMind Python libraries. This involved renaming the existing Apache license file and adding a new MIT license file.
  • Tooling Configuration: Mise configuration has been added to ensure consistent tooling, specifically for managing uv (a Python package installer and resolver), including a lockfile and hooks.
  • GitHub Actions Workflows: New GitHub Actions workflows have been introduced for continuous integration (CI) test matrix, CodeQL for security analysis, zizmor, PyPI release, and Dependabot for automated dependency updates.
  • Versioning Updates: The project version has been set to 0.1.0, the HISTORY.rst date was updated, and the __version__ in tests now dynamically retrieves the version using importlib.metadata.
  • README Enhancements: The README.md file has been updated to include a missing Path import in a code example, detailed error handling documentation, sections for bug reports and versioning, and revised license information.
Changelog
  • .github/dependabot.yml
    • Added Dependabot configuration for uv and GitHub Actions dependencies.
  • HISTORY.rst
    • Updated the initial release version from 1.0.0 to 0.1.0 and adjusted the release date.
  • LICENSE-APACHE
    • Renamed the original LICENSE file to LICENSE-APACHE.
  • LICENSE-MIT
    • Added a new MIT license file.
  • README.md
    • Added Path import to a code example.
    • Added a new section detailing error handling exceptions.
    • Updated license information to reflect dual-licensing and added sections for bug reports and versioning.
  • mise.lock
    • Added a lock file for mise tool, specifically for uv with platform-specific checksums and URLs.
  • mise.toml
    • Added mise configuration to manage uv, including lockfile enforcement, disabling certain backends, and defining hooks for installation.
  • pyproject.toml
    • Updated the project version from 1.0.0 to 0.1.0.
    • Modified license declaration to 'Apache-2.0 OR MIT' and updated license-files to 'LICENSE-*'.
    • Updated the uv_build requirement version.
  • src/pygeoipupdate/init.py
    • Modified version handling to dynamically retrieve __version__ from importlib.metadata.
  • tests/test_cli.py
    • Updated version assertion in CLI tests to use the dynamically retrieved __version__ instead of a hardcoded string.
  • uv.lock
    • Updated the pygeoipupdate package version within the uv lock file from 1.0.0 to 0.1.0.
Ignored Files
  • Ignored by pattern: .github/workflows/** (4)
    • .github/workflows/codeql-analysis.yml
    • .github/workflows/release.yml
    • .github/workflows/test.yml
    • .github/workflows/zizmor.yml
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request effectively prepares the repository for its initial release. The changes, including updating the version to 0.1.0, implementing a dual-license model, adding mise configuration, and improving documentation, are well-executed and enhance the project's structure and maintainability. The move to dynamically determine the version from package metadata is a particularly good improvement. I have one minor suggestion to correct a date in the changelog.

Comment thread HISTORY.rst
-------

1.0.0 (2024-12-05)
0.1.0 (2026-02-10)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The date for version 0.1.0 appears to be a typo, as it is set to a future date (2026-02-10). Please correct this to the actual release date to avoid confusion for users.

oschwald and others added 4 commits February 10, 2026 09:06
Bump ruff minimum to 0.15.0 which correctly handles except* clauses
(no longer triggers BLE001), and add ASYNC240 to test per-file-ignores
since pathlib.glob() in synchronous test assertions is harmless.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
os.getuid() does not exist on Windows, causing an AttributeError at
collection time that prevents all tests from running. Use hasattr()
short-circuit so the skipif condition evaluates safely on all platforms.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Skip test_write_sets_644_permissions on Windows where Unix permission
bits are not supported (os.chmod sets read-only vs read-write only).

Remove racy assertion in test_parallel_error_cancels_siblings that
Edition3.mmdb must not exist after cancellation. On Windows the sibling
task completes before cancellation propagates. The important behavior
(AuthenticationError surfaces in the ExceptionGroup) is still verified.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Same release workflow as GeoIP2-python: validates tooling and branch
state, parses version and notes from HISTORY.rst, runs the full tox
matrix, then commits, pushes, and creates a GitHub release (which
triggers the PyPI upload workflow).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@horgh horgh merged commit eaaf8bb into main Feb 10, 2026
57 checks passed
@horgh horgh deleted the greg/eng-4103 branch February 10, 2026 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants