Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to src layout #271

Merged
merged 2 commits into from
Mar 21, 2024
Merged

Switch to src layout #271

merged 2 commits into from
Mar 21, 2024

Conversation

SeanBryan51
Copy link
Collaborator

@SeanBryan51 SeanBryan51 commented Mar 20, 2024

Currently we are not testing the installed version of the package in our CI workflow. This is one of the major disadvantages in using a flat layout. This change switches the source code to use a src layout and reproduces the error described in #267 (see logs).

This pull request should be merged once #272 is merged so that we can verify the CI passes.

Fixes #270

@SeanBryan51 SeanBryan51 linked an issue Mar 20, 2024 that may be closed by this pull request
@SeanBryan51 SeanBryan51 marked this pull request as ready for review March 20, 2024 05:37
Copy link

codecov bot commented Mar 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 72.81%. Comparing base (ac2cb1f) to head (59910ed).
Report is 8 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #271      +/-   ##
==========================================
+ Coverage   63.84%   72.81%   +8.96%     
==========================================
  Files          35       18      -17     
  Lines        2597      982    -1615     
==========================================
- Hits         1658      715     -943     
+ Misses        939      267     -672     

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

@SeanBryan51 SeanBryan51 requested review from a team and abhaasgoyal and removed request for a team March 20, 2024 23:31
@abhaasgoyal
Copy link

abhaasgoyal commented Mar 21, 2024

Wouldn't the actual src files clash with the current folders created by runs of benchcab (this could further be a problem when we run benchcab clean).

└── src
    ├── benchcab <- Work on this PR
    ├── <realisation-0>
    └── <realisation-1>

For example , running benchcab clean would delete benchcab as well. Also, I believe src is holding folders for 2 different things here.

@SeanBryan51
Copy link
Collaborator Author

@abhaasgoyal I think you might be confusing the benchcab source with bench_example. The src directory you mentioned is only generated when running benchcab and will not contain the benchcab source files.

@abhaasgoyal
Copy link

Oh yeah, my mistake.. Looks good to me! (I ran the integration tests as well)

@SeanBryan51
Copy link
Collaborator Author

I've noticed the code coverage reports seem to differ when I have hardly changed the source code or the unit tests. Looking into this now.

@SeanBryan51
Copy link
Collaborator Author

@abhaasgoyal I've made some new changes regarding the unit test coverage reports as coverage reports do not seem to be properly generated unless we run pytest against an editable install of benchcab. I've also restricted the coverage to measure only the source files under the src directory as files like versioneer.py were getting picked up by the coverage report.

Also please hit approve once you are happy with the changes.

Copy link

@abhaasgoyal abhaasgoyal left a comment

Choose a reason for hiding this comment

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

LGTM

@SeanBryan51 SeanBryan51 added priority:medium Medium priority issues to become high priority issues after a release. and removed priority:medium Medium priority issues to become high priority issues after a release. labels Mar 21, 2024
@SeanBryan51 SeanBryan51 merged commit ef0dc85 into main Mar 21, 2024
4 checks passed
@SeanBryan51 SeanBryan51 deleted the 270-switch-to-src-layout branch March 21, 2024 23:56
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.

Switch to src layout
2 participants