Skip to content

Use a build backed when creating a new pyproject.toml file#383

Merged
nathanjmcdougall merged 7 commits into
mainfrom
347-pytest-test-discovery-doesnt-work-well-with-a-src-layout-without-a-build-backend
Mar 5, 2025
Merged

Use a build backed when creating a new pyproject.toml file#383
nathanjmcdougall merged 7 commits into
mainfrom
347-pytest-test-discovery-doesnt-work-well-with-a-src-layout-without-a-build-backend

Conversation

@nathanjmcdougall

Copy link
Copy Markdown
Collaborator

No description provided.

@codspeed-hq

codspeed-hq Bot commented Mar 5, 2025

Copy link
Copy Markdown

CodSpeed Performance Report

Merging #383 will not alter performance

Comparing 347-pytest-test-discovery-doesnt-work-well-with-a-src-layout-without-a-build-backend (8944a9d) with main (40c7ff8)

Summary

✅ 1 untouched benchmarks

@codecov-commenter

codecov-commenter commented Mar 5, 2025

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.16%. Comparing base (758d204) to head (8944a9d).
Report is 4 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #383      +/-   ##
==========================================
+ Coverage   98.10%   98.16%   +0.06%     
==========================================
  Files          70       71       +1     
  Lines        3008     3053      +45     
==========================================
+ Hits         2951     2997      +46     
+ Misses         57       56       -1     

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

@nathanjmcdougall

Copy link
Copy Markdown
Collaborator Author

This is making things significantly slower - it's not obvious to me why yet.

Comment thread src/usethis/_integrations/uv/init.py Outdated
id_keys=["tool", "hatch", "build", "targets", "wheel"],
value={"packages": ["."]},
)
PyprojectTOMLManager().write_file()

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Ah, the slowdown would be because of this line.

@nathanjmcdougall

nathanjmcdougall commented Mar 5, 2025

Copy link
Copy Markdown
Collaborator Author

This is still slower; I think it's because we need to write an extra time to the pyproject.toml before the first uv subprocess with the hatch information. To keep the benchmark fair I reckon we should stick with a case where the package build doesn't need TOML config.

@nathanjmcdougall nathanjmcdougall merged commit 03c0216 into main Mar 5, 2025
@nathanjmcdougall nathanjmcdougall deleted the 347-pytest-test-discovery-doesnt-work-well-with-a-src-layout-without-a-build-backend branch March 5, 2025 04:14
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.

pytest test discovery doesn't work well with a src layout without a build backend

2 participants