all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Guix Data Service - Outreachy: questions about render-compare/derivation
@ 2021-04-12 15:14 Luciana Lima Brito
  2021-04-12 19:41 ` Christopher Baines
  0 siblings, 1 reply; 4+ messages in thread
From: Luciana Lima Brito @ 2021-04-12 15:14 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 911 bytes --]

Hello,

I'm lubrito on Guix IRC, the Outreachy applicant.

I'm working on the json output for the render-compare/derivation
procedure (controller.scm).

I would like to know if I am on the right path with what I've
accomplished until now.

The attached .ppm file shows the json I have so far. The json is
showing only the data for the "outputs", but I already got the data for
the rest and I could do the same to them. I am still thinking about how
to make the code cleaner, because the way I'm doing could produce many
redundancies.

I also would like to know if the general structure of the json is
correct or if it should be different. For example, under "outputs" "0"
is denoting base and "1" is denoting target.

The current code for the function is here http://sprunge.us/mKkzX2

-- 
Best Regards,

Luciana Lima Brito
MSc. in Computer Science
Federal University of Uberlândia

[-- Attachment #2: render-compare_derivation-json.ppm --]
[-- Type: image/x-portable-pixmap, Size: 921337 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Guix Data Service - Outreachy: questions about render-compare/derivation
  2021-04-12 15:14 Guix Data Service - Outreachy: questions about render-compare/derivation Luciana Lima Brito
@ 2021-04-12 19:41 ` Christopher Baines
  2021-04-13 19:45   ` Luciana Lima Brito
  0 siblings, 1 reply; 4+ messages in thread
From: Christopher Baines @ 2021-04-12 19:41 UTC (permalink / raw)
  To: Luciana Lima Brito; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 1796 bytes --]


Luciana Lima Brito <lubrito@posteo.net> writes:

> I'm lubrito on Guix IRC, the Outreachy applicant.
>
> I'm working on the json output for the render-compare/derivation
> procedure (controller.scm).

Hi lubrito,

Good to hear from you.

> I would like to know if I am on the right path with what I've
> accomplished until now.

You've got some JSON being rendered, so you're definitely on the right
path :)

> The attached .ppm file shows the json I have so far. The json is
> showing only the data for the "outputs", but I already got the data for
> the rest and I could do the same to them. I am still thinking about how
> to make the code cleaner, because the way I'm doing could produce many
> redundancies.
>
> I also would like to know if the general structure of the json is
> correct or if it should be different. For example, under "outputs" "0"
> is denoting base and "1" is denoting target.
>
> The current code for the function is here http://sprunge.us/mKkzX2

So, there's no "correct" structure for the JSON, but some structures
might better represent the data than others, there's a number of factors
to balance.

I think an object with base and target names would easier to understand
than using an array.

Some of the types in the JSON are a bit off as well, part of this is the
query processing is not working quite right, but that's a different
issue. For the JSON you've got so far, I'd specifically look at the
hash, hash-algorithm and recursive fields. hash and hash-algorithm are
only set for some outputs (only for fixed output derivations), it would
probably be better to have these fields set to null if they don't have a
string value, or not included in the object. For recursive, that's a
boolean, so it should be a boolean in the JSON too.

Hope that helps!

Chris

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 987 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Guix Data Service - Outreachy: questions about render-compare/derivation
  2021-04-12 19:41 ` Christopher Baines
@ 2021-04-13 19:45   ` Luciana Lima Brito
  2021-04-13 21:06     ` Christopher Baines
  0 siblings, 1 reply; 4+ messages in thread
From: Luciana Lima Brito @ 2021-04-13 19:45 UTC (permalink / raw)
  To: Christopher Baines; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 2790 bytes --]

Hi,

Just to report my progress and ask some more questions.
I attached a new image of the json I have by now.

I still have to find a way to use a proper name instead of the 0 and 1
of the array. Another thing that I'm still looking into is why the
"source" field displays the value of the derivations as a name in the
hierarchy, instead of a string.

All the fields are being displayed in the json, but I don't know all the
values the fields can assume, so I don't know exactly which tests I
should do. In the .html file I could see that many more test are
performed to get the same values I got for the json, so probably I'm
missing some, I will look into this, however, for all derivations
comparisons I checked the values seem correct.



On Mon, 12 Apr 2021 20:41:18 +0100
Christopher Baines <mail@cbaines.net> wrote:

> Luciana Lima Brito <lubrito@posteo.net> writes:
> 
> > I'm lubrito on Guix IRC, the Outreachy applicant.
> >
> > I'm working on the json output for the render-compare/derivation
> > procedure (controller.scm).  
> 
> Hi lubrito,
> 
> Good to hear from you.
> 
> > I would like to know if I am on the right path with what I've
> > accomplished until now.  
> 
> You've got some JSON being rendered, so you're definitely on the right
> path :)
> 
> > The attached .ppm file shows the json I have so far. The json is
> > showing only the data for the "outputs", but I already got the data
> > for the rest and I could do the same to them. I am still thinking
> > about how to make the code cleaner, because the way I'm doing could
> > produce many redundancies.
> >
> > I also would like to know if the general structure of the json is
> > correct or if it should be different. For example, under "outputs"
> > "0" is denoting base and "1" is denoting target.
> >
> > The current code for the function is here http://sprunge.us/mKkzX2  
> 
> So, there's no "correct" structure for the JSON, but some structures
> might better represent the data than others, there's a number of
> factors to balance.
> 
> I think an object with base and target names would easier to
> understand than using an array.
> 
> Some of the types in the JSON are a bit off as well, part of this is
> the query processing is not working quite right, but that's a
> different issue. For the JSON you've got so far, I'd specifically
> look at the hash, hash-algorithm and recursive fields. hash and
> hash-algorithm are only set for some outputs (only for fixed output
> derivations), it would probably be better to have these fields set to
> null if they don't have a string value, or not included in the
> object. For recursive, that's a boolean, so it should be a boolean in
> the JSON too.
> 
> Hope that helps!
> 
> Chris



-- 
Best Regards,

Luciana Lima Brito
MSc. in Computer Science

[-- Attachment #2: render-compare-derivation-json-1304.ppm --]
[-- Type: image/x-portable-pixmap, Size: 2255770 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Guix Data Service - Outreachy: questions about render-compare/derivation
  2021-04-13 19:45   ` Luciana Lima Brito
@ 2021-04-13 21:06     ` Christopher Baines
  0 siblings, 0 replies; 4+ messages in thread
From: Christopher Baines @ 2021-04-13 21:06 UTC (permalink / raw)
  To: Luciana Lima Brito; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 1169 bytes --]


Luciana Lima Brito <lubrito@posteo.net> writes:

> Just to report my progress and ask some more questions.
> I attached a new image of the json I have by now.

Good good :)

> I still have to find a way to use a proper name instead of the 0 and 1
> of the array. Another thing that I'm still looking into is why the
> "source" field displays the value of the derivations as a name in the
> hierarchy, instead of a string.

It looks like the 0 and 1 thing is only an issue for the outputs and
inputs now, which is good.

As for how the sources end up like that, I think a list with a single
string might end up like that. Maybe try comparing a derivation to
itself (not a very useful query, but it might help generate some new
data to work with).

> All the fields are being displayed in the json, but I don't know all the
> values the fields can assume, so I don't know exactly which tests I
> should do. In the .html file I could see that many more test are
> performed to get the same values I got for the json, so probably I'm
> missing some, I will look into this, however, for all derivations
> comparisons I checked the values seem correct.

Sounds good,

Chris

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 987 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-04-13 21:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-12 15:14 Guix Data Service - Outreachy: questions about render-compare/derivation Luciana Lima Brito
2021-04-12 19:41 ` Christopher Baines
2021-04-13 19:45   ` Luciana Lima Brito
2021-04-13 21:06     ` Christopher Baines

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.