Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.devtools
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
Model registry
Operate
Environments
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
bob
bob.devtools
Commits
178adb72
Commit
178adb72
authored
5 years ago
by
André Anjos
Browse files
Options
Downloads
Patches
Plain Diff
[graph] Improve cli and documentation
parent
eaf89934
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!126
Implemented a mechanism to run a dependency graph
Pipeline
#35404
failed
5 years ago
Stage: build
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
bob/devtools/graph.py
+10
-4
10 additions, 4 deletions
bob/devtools/graph.py
bob/devtools/scripts/graph.py
+9
-3
9 additions, 3 deletions
bob/devtools/scripts/graph.py
conda/meta.yaml
+1
-0
1 addition, 0 deletions
conda/meta.yaml
doc/api.rst
+6
-0
6 additions, 0 deletions
doc/api.rst
with
26 additions
and
7 deletions
bob/devtools/graph.py
+
10
−
4
View file @
178adb72
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Utilities for calculating package dependencies and drawing graphs
"""
import
os
import
re
import
glob
...
...
@@ -179,8 +181,11 @@ def compute_adjencence_matrix(
elif
p
.
startswith
(
"
batl
"
):
return
"
/
"
.
join
((
"
batl
"
,
p
))
else
:
logger
.
warning
(
"
Do not know how to recurse to package %s
"
"
(to which group does it belong?) - skipping...
"
,
p
)
logger
.
warning
(
"
Do not know how to recurse to package %s
"
"
(to which group does it belong?) - skipping...
"
,
p
,
)
return
None
all_recurse
=
set
([
_add_default_group
(
k
)
for
k
in
all_recurse
])
...
...
@@ -189,8 +194,9 @@ def compute_adjencence_matrix(
# do not recurse for packages we already know
all_recurse
-=
set
(
current
.
keys
())
logger
.
info
(
"
Recursing over the following packages: %s
"
,
"
,
"
.
join
(
all_recurse
))
logger
.
info
(
"
Recursing over the following packages: %s
"
,
"
,
"
.
join
(
all_recurse
)
)
for
dep
in
all_recurse
:
dep_adjmtx
=
compute_adjencence_matrix
(
...
...
This diff is collapsed.
Click to expand it.
bob/devtools/scripts/graph.py
+
9
−
3
View file @
178adb72
...
...
@@ -28,12 +28,18 @@ logger = get_logger(__name__)
epilog
=
"""
Examples:
1.
D
raws the graph of a package
1.
Calculates and d
raws the graph of a package
:
$ bdt gitlab graph
-vv
bob/bob.
learn.linear
$ bdt gitlab graph bob/bob.
blitz
2.
2.
Calculates and draws only the runtime dependencies of a package
$ bdt gitlab graph bob/bob.blitz --deptypes=run
3. Calculates run and test dependencies of package, but only draws a subset
defined by a regular expression
$ bdt gitlab graph beat/beat.editor --deptypes=run --deptypes=test --whitelist=
'
^beat\.(editor|cmdline).*$
'
"""
)
...
...
This diff is collapsed.
Click to expand it.
conda/meta.yaml
+
1
−
0
View file @
178adb72
...
...
@@ -106,6 +106,7 @@ test:
-
bdt gitlab process-pipelines --help
-
bdt gitlab get-pipelines --help
-
bdt gitlab graph --help
-
bdt gitlab graph -vv bob/bob.blitz -d run
-
sphinx-build -aEW ${PREFIX}/share/doc/{{ name }}/doc sphinx
-
if [ -n "${CI_PROJECT_DIR}" ]; then mv sphinx "${CI_PROJECT_DIR}/"; fi
...
...
This diff is collapsed.
Click to expand it.
doc/api.rst
+
6
−
0
View file @
178adb72
...
...
@@ -14,6 +14,8 @@
bob.devtools.bootstrap
bob.devtools.build
bob.devtools.mirror
bob.devtools.deploy
bob.devtools.graph
bob.devtools.webdav3.client
...
...
@@ -34,8 +36,12 @@ Detailed Information
.. automodule:: bob.devtools.build
.. automodule:: bob.devtools.mirror
.. automodule:: bob.devtools.deploy
.. automodule:: bob.devtools.graph
WebDAV Python Client
--------------------
...
...
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