Skip to content

Support python -m dargs from source checkouts - #151

Open
njzjz-bot wants to merge 1 commit into
deepmodeling:masterfrom
njzjz-bot:codex/issue-116
Open

Support python -m dargs from source checkouts#151
njzjz-bot wants to merge 1 commit into
deepmodeling:masterfrom
njzjz-bot:codex/issue-116

Conversation

@njzjz-bot

Copy link
Copy Markdown
Contributor

Summary

  • fall back to an optional setuptools-scm lookup when the generated _version module is absent
  • load the optional SCM helper dynamically so runtime and type-check environments do not require it
  • degrade to 0+unknown when source metadata tooling is unavailable

Fixes #116.

Validation

  • Focused source-checkout CLI unittests
  • python -m dargs --version
  • Ruff checks on changed files

AI attribution

Coding agent: Codex
Codex version: codex-cli 0.149.0
Model: gpt-5.6-sol
Reasoning effort: xhigh

Coding-Agent: Codex
Codex-Version: codex-cli 0.149.0
Model: gpt-5.6-sol
Reasoning-Effort: xhigh
@coderabbitai

coderabbitai Bot commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 99879afb-fec0-4139-84e1-150304977666


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Aug 23, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.10%. Comparing base (66c7d8b) to head (99a8c94).

Files with missing lines Patch % Lines
dargs/cli.py 0.00% 13 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #151      +/-   ##
==========================================
- Coverage   75.14%   74.10%   -1.05%     
==========================================
  Files           9        9              
  Lines         853      865      +12     
==========================================
  Hits          641      641              
- Misses        212      224      +12     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@njzjz-bot njzjz-bot left a comment

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.

Review result: no blocking issues found.

The version fallback handles raw VCS checkouts, Git archives, and environments without setuptools_scm, while avoiding suppression of unrelated transitive import failures. Focused source-checkout and fallback probes passed, and CI is green.

Coding agent: Codex
Codex version: codex-cli 0.149.0
Model: gpt-5.6-sol
Reasoning effort: xhigh

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.

[Code scan] python -m dargs fails from a source checkout without generated _version.py

1 participant