feat: Add support for passing URLs to the CLI - #65
Open
Adrian Freund (freundTech) wants to merge 2 commits into
Open
Adrian Freund (freundTech) wants to merge 2 commits into
Adrian Freund (freundTech) wants to merge 2 commits into
Conversation
Adrian Freund (freundTech)
requested review from
EgeKaraismailogluQC,
Marius Merkle (MariusMerkleQC) and
Oliver Borchert (borchero)
as code owners
September 19, 2026 15:49
Copilot started reviewing on behalf of
Adrian Freund (freundTech)
September 19, 2026 15:50
View session
Contributor
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
Declare boto3 explicitly as a test dependency; also update CLI help to mention URLs.
Review effort: Lite
Findings: None
What changed in this PR
Adds CLI support for comparing Parquet files from URLs, including S3 locations, while preserving URL schemes.
Changes:
- Accepts CLI inputs as strings instead of
Pathobjects. - Adds S3-backed integration test coverage.
- Adds Moto and boto3-related test dependencies.
| File | Summary |
|---|---|
tests/cli/test_cli.py |
Tests comparing Parquet files stored on S3. |
pixi.toml |
Adds dependencies for S3 test infrastructure. |
diffly/cli.py |
Accepts local paths and URL strings. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This enables passing URLs such as `s3://` to directly compare parquet files stored on network storage. `pathlib.Path` collapses the double slash into a single slash, which breaks the URL.
We add `moto` as a new test dependency to create a mock S3 server. This allows us to test that passing `s3://` URLs to the cli works.
Adrian Freund (freundTech)
force-pushed
the
add-uri-support
branch
from
September 19, 2026 16:47
e591c72 to
cdc5d48
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.
Motivation
This allows enables passing URLs, such as S3 URLs to the diffly CLI, which enables comparing parquet files on network storage without manually downloading them first. The previously used
pathlib.Pathtype converts double slashes in the protocol part of a URL, such ass3://to a single slash, which breaks the URL.Changes
Changed the type of the command line arguments
leftandrightfrompathlib.Pathtostr.Additionally I added a test to test this behaviour. Sadly this requires adding a new test dependency:
motois used to mock an S3 server. Using the moto@mock_awsdecorator is not enough, as Polars doesn't useboto3to access S3. Instead we useThreadedMotoServerand set the AWS environment variables to point to it. I also considered using ahttp://URL withhttp.server, but that doesn't support range requests, which Polars depends on.This is quite a lot of complexity for a single line change, so it might not be worth it, so I put it into a separate commit.