Sébastien Villemot (009fadab) at 30 May 15:24
CI: adapt for new location of MATLAB binaries
Sébastien Villemot (80224c91) at 25 Apr 09:02
Testsuite: use older version of m-unit-tests for compatibility
These fixes apply for instance to some IMF/WEO series eg: IMF/WEOAGG:2021-04/1.NGDPD.us_dollars Forcing an "A" to labels starting with scalars. Force replace "-" with "_" as separators.
@MichelJuillard Do you think that issue is closed by your commit 8fe81617?
If yes, we should consider adding a GitLab CI job for Octave (and, by the way, investigate the new failures on MATLAB).
MichelJuillard (8fe81617) at 14 Oct 07:46
fix compatibility with Octave v7.2
when trying to fecth 'IMF/WEOAGG:2021-04/1.NGDPD.us_dollars', I encountered two issues:
To make mdbnomics work I had to modify fetch_series_by_api_link.m and iter_series_info.m using try/catch/end statements to preserve the original behavior.
For the first problem I force an "A" in the label before the scalar. For the second, I force a replacement of "-" with a "_".
The quick fixes are as follows.
In fetch_series_by_api_link.m:
line 71 has been replaced by:
try
dimensions_labels_columns_names_dataset{jj} = dataset_dimensions.dimensions_labels.(dataset_dimensions.dimensions_codes_order{jj});
catch
dataset_dimensions.dimensions_codes_order{jj} = regexprep(dataset_dimensions.dimensions_codes_order{jj},'[^a-zA-Z0-9]','');
dimensions_labels_columns_names_dataset{jj} = dataset_dimensions.dimensions_labels.(dataset_dimensions.dimensions_codes_order{jj});
end
lines 120-123 have been replaced by:
try
series_code = regexprep(flat_series.series_code,'[^a-zA-Z0-9]','');
dimension_label = dataset_dimensions_labels.(dimension_codes{jj});
flat_series.labels{jj, 1} = dimension_label;
dimension_value_code = regexprep(series_dims_by_dataset_code.(complete_dataset_code).(series_code).(dimension_codes{jj}),'[^a-zA-Z0-9]','');
catch
% Avoid structure fieldnames to start with scalars (Massimo)
series_code_temp = regexprep(series_code(1),'[0-9]','A');
series_code = [series_code_temp series_code];
dimension_label = dataset_dimensions_labels.(dimension_codes{jj});
flat_series.labels{jj, 1} = dimension_label;
dimension_value_code = regexprep(series_dims_by_dataset_code.(complete_dataset_code).(series_code).(dimension_codes{jj}),'[^a-zA-Z0-9]','');
end
In iter_series_info.m: line 86 has been replaced by: try series_dims_by_dataset_code.(complete_dataset_code).(series_code) = series.dimensions; catch % Avoid structure fieldnames to start with scalars (Massimo) series_code_temp = regexprep(series_code(1),'[0-9]','A'); series_code = [series_code_temp series_code]; series_dims_by_dataset_code.(complete_dataset_code).(series_code) = series.dimensions; end
When I try to use Mdbnomics I receive the following error message:
'Could not establish a secure connection to "api.db.nomics.world". The reason is "error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed". Check your certificate file (C:\Program Files\MATLAB\R2019a\sys\certificates\ca\rootcerts.pem) for expired, missing or invalid certificates.'
To circumvent the problem I added to the file ‘fetch_series_page.m’ which is in ‘mdbnomics-master\src\utils’ below row 39 [options = weboptions('ContentType','json');] the following instruction:
options.CertificateFilename=('');
This occurred both on Windows 10 and MacOS machines respectively with MATLAB2019a and MATLAB2017b.