GNU bug report logs -
#27907
[PATCH] graph: Provide access to the package record in the emit
Previous Next
Reported by: Roel Janssen <roel <at> gnu.org>
Date: Tue, 1 Aug 2017 14:41:02 UTC
Severity: normal
Tags: patch
Done: Roel Janssen <roel <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 27907 in the body.
You can then email your comments to 27907 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#27907
; Package
guix-patches
.
(Tue, 01 Aug 2017 14:41:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Roel Janssen <roel <at> gnu.org>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Tue, 01 Aug 2017 14:41:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[0001-graph-Provide-access-to-the-package-record-in-the-em.patch (text/x-diff, attachment)]
[Message part 2 (text/plain, inline)]
Dear Guix,
I would like to expand the Cypher back-end and in the long run add a
SPARQL graph back-end to GNU Guix. For this, I will need to have access
to the package records inside the emit-* functions.
This patch makes this change by essentially changing the "label"
parameter of the emit-* functions passed as "(node-label head)" into a
"node" parameter, passed as "head".
The rest of the patch adapts the current emit-* functions to this
change.
I tested the Graphviz, D3js, and Cypher back-ends, and all seem to work
as before.
Is it OK to apply this change?
Kind regards,
Roel Janssen
Information forwarded
to
guix-patches <at> gnu.org
:
bug#27907
; Package
guix-patches
.
(Tue, 01 Aug 2017 19:26:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 27907 <at> debbugs.gnu.org (full text, mbox):
Roel Janssen <roel <at> gnu.org> skribis:
> I would like to expand the Cypher back-end and in the long run add a
> SPARQL graph back-end to GNU Guix. For this, I will need to have access
> to the package records inside the emit-* functions.
>
> This patch makes this change by essentially changing the "label"
> parameter of the emit-* functions passed as "(node-label head)" into a
> "node" parameter, passed as "head".
>
> The rest of the patch adapts the current emit-* functions to this
> change.
>
> I tested the Graphviz, D3js, and Cypher back-ends, and all seem to work
> as before.
>
> Is it OK to apply this change?
Sure, looks good to me!
Ludo’.
Reply sent
to
Roel Janssen <roel <at> gnu.org>
:
You have taken responsibility.
(Tue, 01 Aug 2017 22:49:03 GMT)
Full text and
rfc822 format available.
Notification sent
to
Roel Janssen <roel <at> gnu.org>
:
bug acknowledged by developer.
(Tue, 01 Aug 2017 22:49:04 GMT)
Full text and
rfc822 format available.
Message #13 received at 27907-done <at> debbugs.gnu.org (full text, mbox):
Ludovic Courtès writes:
> Roel Janssen <roel <at> gnu.org> skribis:
>
>> I would like to expand the Cypher back-end and in the long run add a
>> SPARQL graph back-end to GNU Guix. For this, I will need to have access
>> to the package records inside the emit-* functions.
>>
>> This patch makes this change by essentially changing the "label"
>> parameter of the emit-* functions passed as "(node-label head)" into a
>> "node" parameter, passed as "head".
>>
>> The rest of the patch adapts the current emit-* functions to this
>> change.
>>
>> I tested the Graphviz, D3js, and Cypher back-ends, and all seem to work
>> as before.
>>
>> Is it OK to apply this change?
>
> Sure, looks good to me!
>
> Ludo’.
Thanks! I pushed this patch.
Kind regards,
Roel Janssen
Information forwarded
to
guix-patches <at> gnu.org
:
bug#27907
; Package
guix-patches
.
(Thu, 24 Aug 2017 22:27:01 GMT)
Full text and
rfc822 format available.
Message #16 received at 27907 <at> debbugs.gnu.org (full text, mbox):
Hi!
ludo <at> gnu.org (Ludovic Courtès) skribis:
> Roel Janssen <roel <at> gnu.org> skribis:
>
>> I would like to expand the Cypher back-end and in the long run add a
>> SPARQL graph back-end to GNU Guix. For this, I will need to have access
>> to the package records inside the emit-* functions.
>>
>> This patch makes this change by essentially changing the "label"
>> parameter of the emit-* functions passed as "(node-label head)" into a
>> "node" parameter, passed as "head".
>>
>> The rest of the patch adapts the current emit-* functions to this
>> change.
>>
>> I tested the Graphviz, D3js, and Cypher back-ends, and all seem to work
>> as before.
>>
>> Is it OK to apply this change?
>
> Sure, looks good to me!
Actually no! :-)
The problem was that it broke all non-package-related “node types” (like
“guix graph -t references”), and it had the problem that it ignores the
‘label’ procedure in <node-type>. And “make check” failed.
So I reverted it in 5e60bef9802e448924f889d34d95a249b008652c. We need
to rethink about it.
Cheers,
Ludo’.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#27907
; Package
guix-patches
.
(Fri, 25 Aug 2017 09:02:02 GMT)
Full text and
rfc822 format available.
Message #19 received at 27907 <at> debbugs.gnu.org (full text, mbox):
Ludovic Courtès writes:
> Hi!
>
> ludo <at> gnu.org (Ludovic Courtès) skribis:
>
>> Roel Janssen <roel <at> gnu.org> skribis:
>>
>>> I would like to expand the Cypher back-end and in the long run add a
>>> SPARQL graph back-end to GNU Guix. For this, I will need to have access
>>> to the package records inside the emit-* functions.
>>>
>>> This patch makes this change by essentially changing the "label"
>>> parameter of the emit-* functions passed as "(node-label head)" into a
>>> "node" parameter, passed as "head".
>>>
>>> The rest of the patch adapts the current emit-* functions to this
>>> change.
>>>
>>> I tested the Graphviz, D3js, and Cypher back-ends, and all seem to work
>>> as before.
>>>
>>> Is it OK to apply this change?
>>
>> Sure, looks good to me!
>
> Actually no! :-)
>
> The problem was that it broke all non-package-related “node types” (like
> “guix graph -t references”), and it had the problem that it ignores the
> ‘label’ procedure in <node-type>. And “make check” failed.
>
> So I reverted it in 5e60bef9802e448924f889d34d95a249b008652c. We need
> to rethink about it.
>
> Cheers,
> Ludo’.
Oops! I am sorry about this. Would it not break if we include a check for whether
the node type is a package or not. Then, non-package node types are
handled the “old way” and packages are handled the “new way”.
I think we cannot have a generic way of exposing the specifics of a node
type, so if we need to expose more information for the other node types,
we have to add a type-specific implementation.
If this sounds like a good idea I'll write a new patch. And while I'm
at it, what set of commands fully cover the graph code for all node
types? Just all variants in 'guix graph --type=X'?
Thanks!
Kind regards,
Roel Janssen
Information forwarded
to
guix-patches <at> gnu.org
:
bug#27907
; Package
guix-patches
.
(Fri, 25 Aug 2017 14:52:02 GMT)
Full text and
rfc822 format available.
Message #22 received at 27907 <at> debbugs.gnu.org (full text, mbox):
Roel Janssen <roel <at> gnu.org> skribis:
> Oops! I am sorry about this. Would it not break if we include a check for whether
> the node type is a package or not. Then, non-package node types are
> handled the “old way” and packages are handled the “new way”.
>
> I think we cannot have a generic way of exposing the specifics of a node
> type, so if we need to expose more information for the other node types,
> we have to add a type-specific implementation.
Actually, we might need to discuss the specifics of why you wanted to do
it in the first place. :-)
It is to pass extra rendering info to the backends? (It would be
helpful for instance to adjust the node color or size depending on
certain parameters such as its size or number of dependents.)
> If this sounds like a good idea I'll write a new patch. And while I'm
> at it, what set of commands fully cover the graph code for all node
> types? Just all variants in 'guix graph --type=X'?
“make check TESTS=tests/graph.scm” covers all the node types I think.
Ludo’.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#27907
; Package
guix-patches
.
(Fri, 25 Aug 2017 16:20:02 GMT)
Full text and
rfc822 format available.
Message #25 received at 27907 <at> debbugs.gnu.org (full text, mbox):
Ludovic Courtès writes:
> Roel Janssen <roel <at> gnu.org> skribis:
>
>> Oops! I am sorry about this. Would it not break if we include a check for whether
>> the node type is a package or not. Then, non-package node types are
>> handled the “old way” and packages are handled the “new way”.
>>
>> I think we cannot have a generic way of exposing the specifics of a node
>> type, so if we need to expose more information for the other node types,
>> we have to add a type-specific implementation.
>
> Actually, we might need to discuss the specifics of why you wanted to do
> it in the first place. :-)
>
> It is to pass extra rendering info to the backends? (It would be
> helpful for instance to adjust the node color or size depending on
> certain parameters such as its size or number of dependents.)
Not necessarily rendering information, even though it could improve the
displayment of packages like you say. I'd like to export more
information to a graph database, so that the packages can be searched,
explored and linked to in a graph that also contains stuff like how
programs were run and what files that run produced.
So, this is essentially an interoperability thing for communicating with
other systems.
>
>> If this sounds like a good idea I'll write a new patch. And while I'm
>> at it, what set of commands fully cover the graph code for all node
>> types? Just all variants in 'guix graph --type=X'?
>
> “make check TESTS=tests/graph.scm” covers all the node types I think.
>
> Ludo’.
Then I will run that command before I propose a new patch.
Kind regards,
Roel Janssen
Information forwarded
to
guix-patches <at> gnu.org
:
bug#27907
; Package
guix-patches
.
(Sat, 26 Aug 2017 08:04:01 GMT)
Full text and
rfc822 format available.
Message #28 received at 27907 <at> debbugs.gnu.org (full text, mbox):
Roel Janssen <roel <at> gnu.org> skribis:
> Ludovic Courtès writes:
>
>> Roel Janssen <roel <at> gnu.org> skribis:
>>
>>> Oops! I am sorry about this. Would it not break if we include a check for whether
>>> the node type is a package or not. Then, non-package node types are
>>> handled the “old way” and packages are handled the “new way”.
>>>
>>> I think we cannot have a generic way of exposing the specifics of a node
>>> type, so if we need to expose more information for the other node types,
>>> we have to add a type-specific implementation.
>>
>> Actually, we might need to discuss the specifics of why you wanted to do
>> it in the first place. :-)
>>
>> It is to pass extra rendering info to the backends? (It would be
>> helpful for instance to adjust the node color or size depending on
>> certain parameters such as its size or number of dependents.)
>
> Not necessarily rendering information, even though it could improve the
> displayment of packages like you say. I'd like to export more
> information to a graph database, so that the packages can be searched,
> explored and linked to in a graph that also contains stuff like how
> programs were run and what files that run produced.
>
> So, this is essentially an interoperability thing for communicating with
> other systems.
So I think an option would be to pass an extra property alist to the
‘emit-node’ and ‘emit-edge’ procedures of the backend. The node type
would produce that alist and it would be up to the backend to make sense
of it. Something along these lines. WDYT?
Ludo’.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 23 Sep 2017 11:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 7 years and 275 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.