UV modernization#8
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR modernizes the URLPath project by migrating from setuptools to UV/hatchling build system, restructuring from a single file to a proper package directory, and updating the development toolchain to use modern Python practices.
Key changes include:
- Migration to UV/hatchling build system with centralized pyproject.toml configuration
- Package restructuring from single file (
urlpath.py) to package directory (urlpath/__init__.py) - Test framework conversion from unittest to pytest with README example testing
Reviewed Changes
Copilot reviewed 18 out of 21 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| urlpath/init.py | Restructured main module with modernized formatting and type annotations |
| tests/test_url.py | New pytest-style test suite converted from unittest |
| test/test_url.py | Removed old unittest test file |
| pyproject.toml | New centralized project configuration with modern tooling setup |
| setup.py | Removed legacy setuptools configuration |
| README.md | New Markdown format with executable code examples |
| README.rst | Removed old reStructuredText documentation |
| Makefile | Added development workflow automation |
| conftest.py | Added pytest configuration for module imports |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| @cached_property | ||
| def hostname(self): | ||
| """The hostname of url.""" | ||
| import contextlib |
There was a problem hiding this comment.
Import statement should be moved to the top of the file with other imports rather than being placed inside a method.
616c06d to
8f7084e
Compare
8f7084e to
f264760
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changed
python -m doctest README.rstwith pytest-markdown-docs for testing examplesurlpath.py) to proper package directory (urlpath/__init__.py)test/totests/(following pytest conventions).gitignorefile with modern Python tooling patternspyproject.toml(removed from module docstring)Added
.python-versionfile for Python version managementconftest.pyfor pytest sys.path configurationrelease.yml).pre-commit-config.yaml)pyproject.tomlfor better PyPI discoverability.github/copilot-instructions.mdfor AI-assisted developmentuv.lockfor reproducible dependency resolutionRemoved
setup.py(replaced bypyproject.toml)MANIFESTfile (replaced by hatchling configuration)README.rst(replaced byREADME.md)deploy.ymlworkflow (replaced byrelease.yml)