Skip to content

Allow downloading a single file by project name without a local checkout - #318

Merged
MarcelGeo merged 2 commits into
developfrom
single_file_download
Sep 10, 2026
Merged

Allow downloading a single file by project name without a local checkout#318
MarcelGeo merged 2 commits into
developfrom
single_file_download

Conversation

@varmar05

@varmar05 varmar05 commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Existing download files interface is extended to support both local checkout folder or just destination. In the latter case no project checkout is needed to download single file in particular version.

Closes #210

@varmar05
varmar05 requested a review from MarcelGeo September 3, 2026 06:06
@coveralls

coveralls commented Sep 4, 2026

Copy link
Copy Markdown

Coverage Report for CI Build 34454243055

Coverage decreased (-0.02%) to 83.351%

Details

  • Coverage decreased (-0.02%) from the base build.
  • Patch coverage: 11 uncovered changes across 2 files (48 of 59 lines covered, 81.36%).
  • No coverage regressions found.

Uncovered Changes

File Changed Covered %
mergin/cli.py 10 0 0.0%
mergin/client_pull.py 23 22 95.65%
Total (4 files) 59 48 81.36%

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 5724
Covered Lines: 4771
Line Coverage: 83.35%
Coverage Strength: 0.83 hits per line

💛 - Coveralls

Comment thread mergin/client.py Outdated
Download project files at specified version. Get the latest if no version specified.

:param project_dir: project local directory
:param project_dir: project local directory or a full project name ("<workspace>/<project>")

@MarcelGeo MarcelGeo Sep 4, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We can probably use same pattern as project name in cli. This is like mix of multiple behaviours in one arg. We could probably use also separated method in client.py download_project_file or similar.

This could be in future path like type.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ok, new download now uses dedicated methods to avoid confusion

@varmar05
varmar05 changed the base branch from master to develop September 8, 2026 07:36
@MarcelGeo
MarcelGeo merged commit d75a967 into develop Sep 10, 2026
5 checks passed
@MarcelGeo
MarcelGeo deleted the single_file_download branch September 10, 2026 08:58
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.

Add API call to download one file

3 participants