Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mdbnomics
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DBnomics
mdbnomics
Commits
55d67f12
Commit
55d67f12
authored
Apr 06, 2020
by
Dóra Kocsis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix test suite, reorganize folder structure
parent
2dbbf501
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
10 additions
and
12 deletions
+10
-12
.gitignore
.gitignore
+0
-1
Makefile
Makefile
+3
-5
archive/template.m
archive/template.m
+1
-1
src/fetch_series.m
src/fetch_series.m
+0
-0
src/fetch_series_by_api_link.m
src/fetch_series_by_api_link.m
+1
-1
src/initialize_mdbnomics.m
src/initialize_mdbnomics.m
+2
-2
src/utils/fetch_series_page.m
src/utils/fetch_series_page.m
+0
-0
src/utils/filter_series.m
src/utils/filter_series.m
+0
-0
src/utils/flatten_dbnomics_series.m
src/utils/flatten_dbnomics_series.m
+0
-0
src/utils/flatten_editor_series.m
src/utils/flatten_editor_series.m
+0
-0
src/utils/iter_filtered_series.m
src/utils/iter_filtered_series.m
+0
-0
src/utils/iter_series_info.m
src/utils/iter_series_info.m
+0
-0
src/utils/normalize_period.m
src/utils/normalize_period.m
+0
-0
src/utils/normalize_value.m
src/utils/normalize_value.m
+0
-0
tests/runalltests.m
tests/runalltests.m
+3
-2
No files found.
.gitignore
View file @
55d67f12
...
...
@@ -14,6 +14,5 @@
src/subroutines/git.info
src/subroutines/git.last-commit-hash
/tests
/missing_dbnomics
/utils
\ No newline at end of file
Makefile
View file @
55d67f12
OCTAVE
?=
octave-cli
MATLAB
?=
$(
shell
which matlab
)
all
:
check-octave check-matlab
m-unit-tests/src/mtest.m
:
git clone https://git.dynare.org/Dynare/m-unit-tests
check-octave
:
m-unit-tests/src/mtest.m
@
cd
src/subroutines
;
\
$(OCTAVE)
--no-init-file
--silent
--no-history
--eval
"addpath([pwd() '/../
../
m-unit-tests/src']); runalltests"
&&
[
!
-f
./failed
]
&&
[
-f
./pass
]
@
cd
tests
;
\
$(OCTAVE)
--no-init-file
--silent
--no-history
--eval
"addpath([pwd() '/../m-unit-tests/src']); runalltests"
&&
[
!
-f
./failed
]
&&
[
-f
./pass
]
check-matlab
:
m-unit-tests/src/mtest.m
@
$(MATLAB)
-nosplash
-nodisplay
-r
"addpath([pwd '/m-unit-tests/src']); cd
src/subroutine
s; runalltests; quit"
&&
[
!
-f
./tests/failed
]
&&
[
-f
./tests/pass
]
@
$(MATLAB)
-nosplash
-nodisplay
-r
"addpath([pwd '/m-unit-tests/src']); cd
test
s; runalltests; quit"
&&
[
!
-f
./tests/failed
]
&&
[
-f
./tests/pass
]
check-clean
:
rm
-f
tests/
*
_test_
*
.m tests/
*
.csv tests/
*
.xls tests/
*
.xlsx tests/
*
.mat tests/failed tests/datafile_for_test
...
...
archive/template.m
View file @
55d67f12
% fetch series by provider code and dataset code
df
=
fetch_series
(
'provider_code'
,
'AMECO'
,
'dataset_code'
,
'UVGD'
,
'max_nb_series'
,
500
);
test
=
fetch_series
(
'provider_code'
,
'AMECO'
,
'dataset_code'
,
'UVGD'
,
'max_nb_series'
,
500
);
ds
=
to_dseries
(
df
);
% fetch one series by ID
...
...
src/
subroutines/
fetch_series.m
→
src/fetch_series.m
View file @
55d67f12
File moved
src/
subroutines/
fetch_series_by_api_link.m
→
src/fetch_series_by_api_link.m
View file @
55d67f12
...
...
@@ -166,7 +166,7 @@ else
end
end
series_length
=
series_length
+
length
(
flat_series
.
value
);
end
end
end
end
...
...
src/initialize_mdbnomics.m
View file @
55d67f12
...
...
@@ -21,10 +21,10 @@ function initialize_mdbnomics()
mdbnomics_src_root
=
strrep
(
which
(
'initialize_mdbnomics'
),
'initialize_mdbnomics.m'
,
''
);
% Set the subfolders to be added in the path.
p
=
{
'
subroutine
s'
};
p
=
{
'
util
s'
};
% Add missing routines if dynare is not in the path
if
~
exist
(
'contains'
,
'builtin'
)
if
~
exist
(
'
OCTAVE_VERSION'
,
'builtin'
)
||
~
exist
(
'
contains'
,
'builtin'
)
p
{
end
+
1
}
=
'missing/contains'
;
end
...
...
src/
subroutine
s/fetch_series_page.m
→
src/
util
s/fetch_series_page.m
View file @
55d67f12
File moved
src/
subroutine
s/filter_series.m
→
src/
util
s/filter_series.m
View file @
55d67f12
File moved
src/
subroutine
s/flatten_dbnomics_series.m
→
src/
util
s/flatten_dbnomics_series.m
View file @
55d67f12
File moved
src/
subroutine
s/flatten_editor_series.m
→
src/
util
s/flatten_editor_series.m
View file @
55d67f12
File moved
src/
subroutine
s/iter_filtered_series.m
→
src/
util
s/iter_filtered_series.m
View file @
55d67f12
File moved
src/
subroutine
s/iter_series_info.m
→
src/
util
s/iter_series_info.m
View file @
55d67f12
File moved
src/
subroutine
s/normalize_period.m
→
src/
util
s/normalize_period.m
View file @
55d67f12
File moved
src/
subroutine
s/normalize_value.m
→
src/
util
s/normalize_value.m
View file @
55d67f12
File moved
src/subroutine
s/runalltests.m
→
test
s/runalltests.m
View file @
55d67f12
...
...
@@ -14,6 +14,7 @@ function runalltests()
%
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
mdbnomics_src_root
=
[];
% Will be updated by calling initialize_dseries_class().
opath
=
path
();
...
...
@@ -34,7 +35,7 @@ unit_tests_root = strrep(which('runalltests'),'runalltests.m','');
try
initialize_mdbnomics
();
catch
addpath
([
unit_tests_root
'../'
]);
addpath
([
unit_tests_root
'../
src
'
]);
initialize_mdbnomics
();
end
...
...
@@ -47,7 +48,7 @@ if isoctave()
more
off
;
end
r
=
run_unitary_tests_in_directory
(
unit_tests
_root
(
1
:
end
-
1
));
r
=
run_unitary_tests_in_directory
(
mdbnomics_src
_root
(
1
:
end
-
1
));
delete
(
'*.log'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment