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

Loki: Turn test sub-directories into sub-pacakges #447

Merged
merged 3 commits into from
Nov 22, 2024

Conversation

mlange05
Copy link
Collaborator

@mlange05 mlange05 commented Nov 22, 2024

This make test integration cleaner and avoids eventual namespace clashes in the future. It also now runs the linter over tests, without exporting test symbols as part of from loki import * (please double-check this).

Note, the other half of this is hidden in PR #446 , where this was necessary to avoid namespace clashes in tests.

EDIT: Looks like I have to leave loki.lint.tests untouched, as the introduction of the test sub-packages makes the dynamic rules imports go haywire. I leave that for a follow-on PR.

@mlange05 mlange05 requested a review from reuterbal November 22, 2024 15:12
Copy link

Documentation for this branch can be viewed at https://sites.ecmwf.int/docs/loki/447/index.html

@mlange05 mlange05 force-pushed the naml-test-subpackages branch from 4730134 to 5a7ccae Compare November 22, 2024 15:58
Copy link
Collaborator

@reuterbal reuterbal left a comment

Choose a reason for hiding this comment

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

Many thanks for this, changes look good and the linter-compliance pass on the tests is very much appreciated!

Copy link

codecov bot commented Nov 22, 2024

Codecov Report

Attention: Patch coverage is 96.42857% with 2 lines in your changes missing coverage. Please review.

Project coverage is 93.19%. Comparing base (86a0f8d) to head (3e0e8ab).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
loki/build/tests/test_build.py 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #447      +/-   ##
==========================================
- Coverage   93.33%   93.19%   -0.14%     
==========================================
  Files         218      219       +1     
  Lines       40848    40908      +60     
==========================================
- Hits        38127    38126       -1     
- Misses       2721     2782      +61     
Flag Coverage Δ
lint_rules 96.39% <ø> (ø)
loki 93.15% <96.42%> (-0.15%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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


🚨 Try these New Features:

@mlange05 mlange05 force-pushed the naml-test-subpackages branch from 6f17408 to 3e0e8ab Compare November 22, 2024 19:35
@reuterbal reuterbal added the ready to merge This PR has been approved and is ready to be merged label Nov 22, 2024
@reuterbal reuterbal merged commit bcef931 into main Nov 22, 2024
12 of 13 checks passed
@reuterbal reuterbal deleted the naml-test-subpackages branch November 22, 2024 23:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to merge This PR has been approved and is ready to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants