Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mednet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository 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
medai
software
mednet
Commits
e77f58bb
Commit
e77f58bb
authored
5 months ago
by
André Anjos
Browse files
Options
Downloads
Patches
Plain Diff
[scripts.config] Adapt to verbosity being eager
parent
5f1c86d1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!64
Add object detection
Pipeline
#92192
passed
5 months ago
Stage: qa
Stage: doc
Stage: dist
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/mednet/scripts/config.py
+6
-4
6 additions, 4 deletions
src/mednet/scripts/config.py
with
6 additions
and
4 deletions
src/mednet/scripts/config.py
+
6
−
4
View file @
e77f58bb
...
...
@@ -39,7 +39,8 @@ def config():
"""
,
)
@verbosity_option
(
logger
=
logger
,
expose_value
=
False
)
def
list_
(
verbose
)
->
None
:
# numpydoc ignore=PR01
@click.pass_context
def
list_
(
ctx
,
**
_
)
->
None
:
# numpydoc ignore=PR01
"""
List configuration files installed.
"""
import
importlib.metadata
...
...
@@ -75,7 +76,7 @@ def list_(verbose) -> None: # numpydoc ignore=PR01
for
name
in
sorted
(
entry_points_by_module
[
config_type
]):
ep
=
entry_point_dict
[
name
]
if
verbose
>=
1
:
if
ctx
.
meta
.
get
(
"
verbose
"
,
0
)
>=
1
:
module
=
ep
.
load
()
doc
=
inspect
.
getdoc
(
module
)
if
doc
is
not
None
:
...
...
@@ -121,7 +122,8 @@ def list_(verbose) -> None: # numpydoc ignore=PR01
nargs
=-
1
,
)
@verbosity_option
(
logger
=
logger
,
expose_value
=
False
)
def
describe
(
name
,
verbose
)
->
None
:
# numpydoc ignore=PR01
@click.pass_context
def
describe
(
ctx
,
name
,
**
_
)
->
None
:
# numpydoc ignore=PR01
"""
Describe a specific configuration file.
"""
import
importlib.metadata
...
...
@@ -141,7 +143,7 @@ def describe(name, verbose) -> None: # numpydoc ignore=PR01
click
.
echo
(
""
)
mod
=
ep
.
load
()
if
verbose
>=
1
:
if
ctx
.
meta
.
get
(
"
verbose
"
,
0
)
>=
1
:
fname
=
inspect
.
getfile
(
mod
)
click
.
echo
(
"
Contents:
"
)
with
pathlib
.
Path
(
fname
).
open
()
as
f
:
...
...
This diff is collapsed.
Click to expand it.
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