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

C unit test #51

Closed
wants to merge 6 commits into from
Closed

Conversation

ARibecaJob
Copy link
Contributor

Hi,

a simple test on how to use utest.h unit test library with ONEflux working C code.
Please note that it use custom functions derived from original utest.h header.

Alessio

+ added vc++ 2008 solution (was missing!)
+ created Makefile for gf_mds
- removed common_pi.c (not used)

common:
# changed internal defines \ enums \struct for new gf_mds code
# some funcs now using timeres enum instead of hourly bool var
# gf_mds is now an unique func and it has new parameters (QC thresholds, symmetrical mean, max MDV window, ...)
- removed gf_mds_with_qc, gf_mds_with_bounds, temp_gf_mds (see above)
+ added some new funcs: get_rows_count_by_timeres, check_timestamp, timestamp_difference_in_seconds
# mystrcat renamed in string_concat

qc_auto:
# upgraded to v1.01
# minor fixes to reflect changes in common func

ustar_mp:
# upgraded to v1.01
# minor fixes to reflect changes in common func

meteo_proc:
# upgraded to v1.01
# minor fixes to reflect changes in common func

nee_proc:
# upgraded to v1.01
# minor fixes to reflect changes in common func

energy_proc:
# upgraded to v1.01
# minor fixes to reflect changes in common func

gf_mds:
# upgraded to v3.0
# big fixes to reflect changes in common func
# now using "driver" instead of fluxes name
+ each driver now has a min and max tolerance customizable value
+ added driver QC threshold change
+ added symmentrical mean computation
+ added max MDV window parameter

SW_IN_POT_Calculator:
# upgraded to v1.01
# minor fixes to reflect changes in common func

shift_solar_noon:
# upgraded to v1.01
# minor fixes to reflect changes in common func

ure:
# upgraded to v1.01
# minor fixes to reflect changes in common funcs
# fixed gf computation
# changed comments

qc_auto:
# replaced 'founded' with 'found'

meteo_proc:
# replaced 'founded' with 'found'

nee_proc:
# fixed meteo import
# fixed outputs computation
# memory will be freed per site to prevent out of memory
# replaced 'founded' with 'found'

energy_proc:
# fixed meteo import
# fixed outputs computation
# replaced 'founded' with 'found'

ure:
# replaced 'founded' with 'found'

ustar_mp:
# replaced 'founded' with 'found'
… tools:

qc_auto
ustar_mp
meteo_proc
nee_proc
energy_proc
gf_mds
SW_IN_POT_Calculator
shift_solar_noon
ure
@ma595 ma595 self-requested a review April 11, 2023 11:03
@ma595
Copy link

ma595 commented Apr 11, 2023

Hi @ARibecaJob
Thanks for the PR, the testing changes look great, but it looks like there are also many minor fixes to the C files as well as a minor version bump. Could you put these changes in a separate PR so that the uTest framework and testing files are the only things added to this one. Generally PRs should have a single purpose - and in terms of the C testing, we should only add one or two test files, the changes to makefiles, github workflows and the uTest header.

I would branch from main and cherry pick the last three commits you made here and resubmit the PR. I'm happy to help with this if needed.

@ma595
Copy link

ma595 commented Apr 11, 2023

Could you also add a little more content to the PR description as done with the Python PR. It makes it a little clearer to reviewers what the purpose of the PR is and what's been changed. Again, I'm happy to help with this if needed.

@gilbertozp
Copy link
Contributor

Replaced with new PR #53

@gilbertozp gilbertozp closed this Apr 12, 2023
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.

3 participants