Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
eurostat-fetcher
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dbnomics-fetchers
eurostat-fetcher
Commits
8cd26603
Commit
8cd26603
authored
2 years ago
by
Christophe Benz
Browse files
Options
Downloads
Patches
Plain Diff
Add datasets with data URL to category tree only
parent
5f992778
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#360312
passed with stages
in 4 minutes and 54 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
convert.py
+5
-7
5 additions, 7 deletions
convert.py
with
5 additions
and
7 deletions
convert.py
+
5
−
7
View file @
8cd26603
...
...
@@ -378,12 +378,6 @@ def toc_element_to_category_tree(xml_element, dataset_json_stubs, dataset_codes_
)
)
elif
xml_element_tag
==
"
branch
"
:
code
=
xml_element
.
findtext
(
"
{*}code
"
)
if
code
==
"
DS-1062396
"
:
# Remove "International trade in goods - detailed data" branch from category tree
# as it doesn't contains any data here.
# https://git.nomics.world/dbnomics-fetchers/management/issues/435
return
None
children
=
list
(
filter
(
None
,
...
...
@@ -396,7 +390,7 @@ def toc_element_to_category_tree(xml_element, dataset_json_stubs, dataset_codes_
return
(
without_falsy_values
(
{
"
code
"
:
code
,
"
code
"
:
xml_element
.
findtext
(
"
{*}
code
"
)
,
"
name
"
:
xml_element
.
findtext
(
"
{*}title[@language=
'
en
'
]
"
),
"
children
"
:
children
,
}
...
...
@@ -412,6 +406,10 @@ def toc_element_to_category_tree(xml_element, dataset_json_stubs, dataset_codes_
if
dataset_code
not
in
dataset_codes_to_convert
:
return
None
dataset_url
=
xml_element
.
findtext
(
"
{*}downloadLink[@format=
'
sdmx
'
]
"
)
if
not
dataset_url
:
return
None
dataset_name
=
xml_element
.
findtext
(
"
{*}title[@language=
'
en
'
]
"
)
if
dataset_code
not
in
dataset_json_stubs
:
dataset_json_stubs
[
dataset_code
]
=
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment