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
Open sidebar
IPSL
E
ESPRI
ESPRI-Mod
catalog
Commits
ea1e2257
Commit
ea1e2257
authored
Feb 04, 2022
by
Guillaume
Browse files
Fix catalog ext.
parent
4154ebc7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
utils.py
utils.py
+3
-3
No files found.
utils.py
View file @
ea1e2257
...
...
@@ -36,7 +36,7 @@ def make_json(catdir, project, header):
print
(
f
'Writing JSON catalog...'
)
# Get catalog name.
catpath
=
os
.
path
.
join
(
catdir
,
f
'
{
project
}{
JSON_EXTENSION
}
{
COMPRESS_EXTENSION
}
'
)
catpath
=
os
.
path
.
join
(
catdir
,
f
'
{
project
}{
JSON_EXTENSION
}
'
)
# Load Jinja2 template for ESM catalogs.
with
open
(
'ESMCollectionTemplate.json'
)
as
file
:
...
...
@@ -45,9 +45,9 @@ def make_json(catdir, project, header):
# Set template content.
content
=
dict
()
content
[
'esmcat_version'
]
=
'0.1.0'
content
[
'id'
]
=
os
.
path
.
splitext
(
catpath
)[
0
]
content
[
'id'
]
=
project
content
[
'description'
]
=
CATALOG_DESCRIPTION_TEMPLATE
.
format
(
project
)
content
[
'catalog_file'
]
=
os
.
path
.
splitext
(
catpath
)[
0
]
+
CSV_EXTENSION
content
[
'catalog_file'
]
=
os
.
path
.
splitext
(
catpath
)[
0
]
+
CSV_EXTENSION
+
COMPRESS_EXTENSION
content
[
'attributes'
]
=
list
()
for
facet
in
header
[
2
:]:
attr
=
dict
()
...
...
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