-
Notifications
You must be signed in to change notification settings - Fork 2
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
Added variable existence check #9
base: develop
Are you sure you want to change the base?
Conversation
I don't know how the IPSL is planning to organize the project. Personally, I have followed the git conventional rules to name my commit (feat(scope): short description #id-issue) and create my feature branch. Let me know if you want to do things differently. |
|
||
results = check_variable_existence(ds, 'time') | ||
""" | ||
ctx = TestCtx(severity, f"{'' if check_id is None else f'[{check_id}] '}Variable Existence Check") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can add the check_id optionally on the TestCtx class, otherwise it will be lost. To discuss with the team.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a good suggestion. The only caveat I can think of is that this requires modifications in the all-shared code in base.py
. The interface should be not be a problem with a default valued argument though (check_id=None
). Also, that would enable using a single implementation of any type of additional formatting, like where I put check_id
in brackets.
compliance_checker/tests/checks/test_check_variable_existence.py
Outdated
Show resolved
Hide resolved
I like it, and I don't have any better ideas. In my experience such rules are hard to uphold when there are many contributors, and it has honestly sort-of left my daily practice :) But I think it is a good idea, and it should be clearly stated in some kind of contributor guidelines. Can it be enforced with an issue template on github? |
I'm including you @Ayoubnac1 in the discussion. There are a few open questions regarding structure/design still that need to be discussed (e.g. the threads above), and I/we need input from others. |
e250294
to
7a2a96e
Compare
Thanks for the comments @IlianaGhazali-Meteo @Ayoubnac1 I resolved most of the comments myself, to put focus on the remaining topics. Please do unresolve or add new comments if there is anything additional you'd like discussed. I've added To me there are a few things left to discuss:
|
yes, there are several strategies for enforcing the use of a git convention, whether on the local or server side. It depends on what is decided on the project. |
I also think we can remove .gitkeep files, even if the use of init.py is not equivalent and optional, we can use these files as already done on the project. [Edit] : |
I've made some minor changes to the tests, adding comments and moving the new
I second this 👍 |
Closes #8
Opening a PR to get feedback on base check:
check_variable_existance(...)
. I'm keeping it as draft for now.check_variable_existance
is implementedcheck_id
argument to the function, to allow for adding the check identifier from the qc-table to the test name string.checks
subfolder to thetests
folder, to follow the structure of thecompliance_checker/
folder.conftest.py
file, there is a fixture that creates a temporary nc-file used with the test.Please provide feedback.