Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-pylib
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
caosdb-pylib
Commits
484ebadf
Commit
484ebadf
authored
3 years ago
by
florian
Browse files
Options
Downloads
Patches
Plain Diff
MAINT: Disable warning
parent
48496e4e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!33
MAINT: change arguments of create_user
,
!32
MAINT: change arguments of create_user
Pipeline
#15097
passed
3 years ago
Stage: code_style
Stage: linting
Stage: test
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/caosdb/configuration.py
+10
-8
10 additions, 8 deletions
src/caosdb/configuration.py
with
10 additions
and
8 deletions
src/caosdb/configuration.py
+
10
−
8
View file @
484ebadf
...
...
@@ -84,14 +84,16 @@ def config_to_yaml(config):
def
validate_yaml_schema
(
valobj
):
if
optional_jsonschema_validate
:
with
open
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
"
schema-pycaosdb-ini.yml
"
))
as
f
:
schema
=
yaml
.
load
(
f
,
Loader
=
yaml
.
SafeLoader
)
optional_jsonschema_validate
(
instance
=
valobj
,
schema
=
schema
[
"
schema-pycaosdb-ini
"
])
else
:
warnings
.
warn
(
"""
Warning: The validation could not be performed because `jsonschema` is not installed.
"""
)
# TODO: Re-enable warning once the schema has been extended to also cover
# SSS pycaosdb.inis and integration tests.
# if optional_jsonschema_validate:
with
open
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
"
schema-pycaosdb-ini.yml
"
))
as
f
:
schema
=
yaml
.
load
(
f
,
Loader
=
yaml
.
SafeLoader
)
optional_jsonschema_validate
(
instance
=
valobj
,
schema
=
schema
[
"
schema-pycaosdb-ini
"
])
# else:
# warnings.warn("""
# Warning: The validation could not be performed because `jsonschema` is not installed.
# """)
def
_read_config_files
():
...
...
This diff is collapsed.
Click to expand it.
Daniel Hornung
@daniel
mentioned in commit
d667370e
·
3 years ago
mentioned in commit
d667370e
mentioned in commit d667370e714e011e9a35170e2e95b48666ba470a
Toggle commit list
Preview
0%
Loading
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