Classification of functions
Open
Classification of functions
Hello,
Dave (@dyb) pointed out that it will be good to come up with a classification of functions from this package repository that:
-
Are only use in ICOADS-R-HOSTACE processing (use only by @eck data processing workflow)
-
Might be good to put them into a common group r-package (functions to deal with ICOADS that other people might benefit)
-
Might be able to be tested by writing a simple r-script (the test most be able to run fast and use little resources).
I will try to make a classification for these 3 categories in the comments below... Please I dont know if my understanding of the data/data processing of ICOADS its the best so feel free to re-arrange the list and post your suggestions below.
added testing label
Some functions have links that you can just click.
1.Are only use in ICOADS-R-HOSTACE processing (use only by @eck data processing workflow)
- add_ID_class
- add_shipnames
- add_dck_priority
- find_gap_func
- flag_id_dups
- get_dflag2
- get_dflag3
- get_gap_pos
- get_gap_pos_end
- get_gap_pos_start
- get_groups
- get_id_class
- get_itu_country
- get_matched_ids
- get_mis
- get_prec
- id_group_func
- new_add_match_id
- new_homog_ids
- print_id_match_info
- var_diff
- write_fun2
- write_fun3
2.Might be good to put them into a common group r-package (functions to deal with ICOADS that other people might benefit)
- add_date2
- calc_bearing
- calc_dist
- calc_dt
- calc_speed
- deg2rad
- gcd_slc
- getmode
- is_leapyear
- liz_merge
- rad2deg
- rbind_all_columns
- rbind_files
- rbind_files_addname
- read_datmonth
- read_rdsfiles
- read_trackmonth
- read_txt_comma
3.Might be able to be tested by writing a simple r-script (the test most be able to run fast and use little resources). Checked means a test has been written.
- add_date2
- add_ID_class
- add_shipnames
- add_dck_priority
- calc_bearing
- calc_dist
- calc_dt
- calc_speed
- deg2rad
- gcd_slc These highlighted functions seem to be the same? is there a difference between cal_dist and gcd_slc @eck?
- getmode
- get_gap_pos
- get_gap_pos_end
- get_gap_pos_start
- get_groups
- get_id_class
- get_itu_country
- is_leapyear
- liz_merge
- rad2deg
- rbind_all_columns
- rbind_files
- rbind_files_addname
- read_datmonth
- read_rdsfiles
- read_trackmonth
- read_txt_comma
I think I could write a test for most of the functions on the check list but it will take me a few days, since some external data is needed (e.g PUB47, other .txt files) and the nature of workflow makes testing a bit challenging (as @eck pointed out and after trying myself I think it will be hard!).
However, here is no need to test everything only important code that we think we want to preserve and it might have a risk to be alter with other changes made in the future. Specially something related to dates for example. I would need some description in some of the functions in order to write simple test for the most trivial functions.
Will raise a #documentation issue for functions which are not clear still to me (most functions have now being documented or were previous documented by liz).
Edited by brivasassigned to @ricorne and unassigned @brecinosrivas