Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Communications Backbone System
backbone-message-format
Commits
50f574f6
Verified
Commit
50f574f6
authored
7 months ago
by
Dan Jones
Browse files
Options
Download
Email Patches
Plain Diff
chore: lint changes with black
parent
0383a95b
dev
80-add-informational-type-primitive
87-remove-comment-for-platform-status-state
action-refactor-test
master
v2.0.0
v2.0.0-beta.11
v2.0.0-beta.10
v2.0.0-beta.9
v2.0.0-beta.8
v2.0.0-beta.7
v2.0.0-beta.6
v2.0.0-beta.5
v2.0.0-beta.4
v2.0.0-beta.3
v2.0.0-beta.2
v2.0.0-beta.1
3 merge requests
!59
Release v2.0.0
,
!39
Resolve "Refactor GeoJSON loading for serving from nucleus"
,
!36
Resolve "Create temporary mas-dt branch for initial schema refactor"
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
generate_schema_config.py
generate_schema_config.py
+8
-8
No files found.
generate_schema_config.py
View file @
50f574f6
...
@@ -205,16 +205,16 @@ def get_cached_ref(remote_ref):
...
@@ -205,16 +205,16 @@ def get_cached_ref(remote_ref):
ref
=
None
ref
=
None
if
os
.
path
.
exists
(
ref_path
):
if
os
.
path
.
exists
(
ref_path
):
print
(
f
"loading cached ref:
{
remote_ref
}
"
)
print
(
f
"loading cached ref:
{
remote_ref
}
"
)
with
open
(
ref_path
,
'r'
)
as
ref_file
:
with
open
(
ref_path
,
"r"
)
as
ref_file
:
ref
=
json
.
load
(
ref_file
)
ref
=
json
.
load
(
ref_file
)
return
ref
return
ref
def
store_cached_ref
(
remote_ref
,
definition
):
def
store_cached_ref
(
remote_ref
,
definition
):
ref_path
=
get_remote_ref_cache_path
(
remote_ref
)
ref_path
=
get_remote_ref_cache_path
(
remote_ref
)
ref_dirs
=
re
.
sub
(
r
'
\/[^\/]+$
'
,
''
,
ref_path
)
ref_dirs
=
re
.
sub
(
r
"
\/[^\/]+$
"
,
""
,
ref_path
)
os
.
makedirs
(
ref_dirs
,
0o775
,
True
)
os
.
makedirs
(
ref_dirs
,
0o775
,
True
)
with
open
(
ref_path
,
'w'
)
as
ref_file
:
with
open
(
ref_path
,
"w"
)
as
ref_file
:
json
.
dump
(
definition
,
ref_file
)
json
.
dump
(
definition
,
ref_file
)
...
@@ -393,7 +393,7 @@ if __name__ == "__main__":
...
@@ -393,7 +393,7 @@ if __name__ == "__main__":
# Parse script args
# Parse script args
config
=
get_options
()
config
=
get_options
()
swagger_config
=
get_swagger_config
(
config
.
get
(
'
reload_schemas
'
))
swagger_config
=
get_swagger_config
(
config
.
get
(
"
reload_schemas
"
))
# Output compiled schema
# Output compiled schema
if
config
.
get
(
"output_file"
):
if
config
.
get
(
"output_file"
):
...
...
This diff is collapsed.
Click to expand it.
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