b0904ad
to
83a5c2b
Compare
|
Can you please give me a complete exmplanation why you need all of that new XML stuff? |
|
Yes, sure. The reason I am creating the because tag is an attempt to allow users to better understand why a recommendation is being done. For example, suppose that I just use a list of AppStream ids as a recommendation file. If any application wants to use AppStream to show these data, it will only show the recommended packages for the user, but it will not be possible to show why that package was recommended in the first place. Therefore, I believe that using the because tag can make the recommendation more trustworthy for the user. But if you think that tag should not be treated on AppStream or it will not be as useful, I can remove it with no problem :) |
|
I think that what @ximion means is that the format itself could be reduced somewhat. In the end, we're just offering a pair of packages such as. It's about offering pairs such as FWIW, do recommendations be directional? Does |
|
@aleixpol True, that makes sense. I will try to think of a better representation for a recommendation file. About the second question, I don't know for sure if the recommendations are directional. Since the user profile is a combination of the most significant terms of the user manual installed packages, I cannot answer for sure if swapping a recommended package for an installed one, would then make the recommender system to recommended the installed package. But again, I may be wrong on that, since I have never looked at this situation closely. @ximion I think I have misunderstood your comments, I believe you are not talking about the because tag, but the new code I am adding to the feature. Basically, the only new feature I have added is the one that checks if a recommendation object actually holds a package indexed by AppStream. The other code I have written is just to make the test suite more robust. |
|
@lucasmoura There are basically two fundamental things I am criticising:
|
|
@ximon Now I have completely understood you point. Also, I am really sorry for taking that long to understand it. Yes, using the component XML infrastructure to make a recommendation would definitely be better. I was actually studying ways to solve the problem of code duplicate, but I think that approach solves that problem nicely. Therefore, I will change my code for this new format. For the second part. Yes, I will make a step by step guide of how this data will be generated and consumed. I strongly believe that I will make that guide tonight. But thanks again for the patience and sorry one more time for my delay on understanding your point. |
|
@ximion This is the step by step guide on how I believe the whole recommendation feature would work.
The recommendation file would them something like this: <component type="recommendation">
<id>org.example.foobar.desktop</id>
<recommendation>
<because>XYZ</because>
</recommendation>
</component>
The XMLParser would need to receive a flag that allows it to look for the recommendation tag.
That is basically my general idea on how that whole integration will work. However, I believe that if the because tag will be present on the XML file, the AsRecommendation class would be needed, I could use the pkgnames variable on AsComponent to hold that information, but I don't think it is a good idea. But since you stated that Software Center users will not care for that additional information at all, maybe it is best to drop it. |
4e797ad
to
ef9cb32
Compare
|
@ximion I have implemented a new solution using now AppStream already implemented methods to parse the recommendation file. The feature works as specified in my the guide I have provided. Basically, now I am using the as-data-pool to parse the recommendation files. Furthermore, the AsRecommendation object now only serve the purpose of retrieving the recommendation components and nothing else. I have also removed the meta information about why a recommendation was generated and just used the list of component ids as a recommendation file. I still don't know if the verification if the recommendation file holds a valid component should be performed on the AsRecommendation object, or if it should be done by the user who wants to use that feature. |
|
To:
4 and 5) Sounds good
Independent from that: Will you be at Debconf? If so, we can discuss this there and work on it. |
|
Calling the software-center developers: @hughsie @aleixpol @tintou @ikeydoherty I would say this information is nothing which the user cares much about, because it's nothing which is actionable and is purely for the people who are curious about how the recommendations work. If they get "bad" recommendations, that info won't help, if they get good recommendations, they won't care. Also, the info can still be retrieved via CLI tools, and might clutter software center UIs, which already have to show quite a lot of information in an appealing way. So, what do you think? I am very reluctant to let the complex "X because Y and not Z" logic into the spec and have it implemented in libappstream. With my maintainer's hat on, I think this will bite me later, so I would not want this feature in AppStream itself. Of course, my opinion on it will change if you say you want to expose this feature to end users and would like to have it in SC UIs. |
|
Answering a couple of questions:
I will be attending DebConf this year, and yes, it will be great if we could discuss and work on this there :) |
|
@ximion Answering for Discover because I'm the one responsible for its user interface: While I would not display the "why" by default (to reduce clutter), I would want to make it easily accessible on demand. The reason being that users may gauge the usefulness of a recommendation based on its source. |
|
So, I see this useful in the same way I see extends being used, e.g. I have no idea why you'd want to encode the "why" in the data whatsoever. If we do, something like: ...could work i guess, and would allow us to do things like the play store. |
|
Hm I'm not sure why you'd want to hate code this into the spec. It seems that would mean apps developers have to be aware of every other possible package. But regarding why that info is useful, as says above the user might gauge the usefulness of the recommendation based on their feelings of another app. But also, this information is valuable if a feature exists for the user to mark an app to not be used for recommendations. Think Amazon. I'm getting recommendations that I think are not relevant and I want to explain to the computer why I think they're not relevant. |
|
Notes from Debconf: <component type="desktop">
<id>org.example.Foo.desktop</id>
<name/>
<summary/>
<description/>
<suggests type="upstream">
<id>org.example.Bar.desktop</id>
<id>...</id>
</suggests>
</component>The type might be omitted, and metainfo files are only allowed to include type "upstream" suggestions. Allow distro metadata files to enhance existing components, add a "heuristic" type for AppRecommender: <components>
<component type="partial">
<id>org.example.Foo.desktop>
<suggests type="heuristic">
<id>org.example.XYZ</id>
...
</suggests>
</component>
...
</components>This way, software centers have basic informtion on where a recommendation is coming from, and also AppRecommender doesn't need to invent its own format and can just use standard AppStream metadata (as soon as this spec extension is standardized). |
|
If the package being recommended is not the one receiving the suggests tag, I think that there might be some problems. A recommendation in AppRecommender is generated by the combination of multiple packages. Therefore a single package recommending others may not be a good representation of the process. Maybe the suggests tag can turn into something like a suggested-by tag and if a component has this tag populated it can be assumed that it is a recommendation. But I don't know if that would the best approach here. |
|
I think it's fine the AppStream "app A suggests app B" is encoded into the file. I don't think we want to put the internal data structure or exact reason in the output data. |
|
Fair enough. I am only a little bit uncertain about making AppRecommender produce a result such as "app A recommends app B", because in reality would be something like "app A, B, C and D recommends E". I am afraid that by doing so, considering only one package, the recommendation produced by AppRecommender may be a little misleading. But I can check that out and see if it is true. |
e1bce6c
to
a12c5bf
Compare
|
@ximion I thing I have created the necessary changes to allow AppStream to handle suggestions metadata. However, I am not sure if I am testing the best way I can or if the tests are in the right file. If there is still anything wrong with my solution, please let me know :) |
a12c5bf
to
eb587b7
Compare
|
I just forgot to say that, if everything is alright with this solution, I can start working on its documentation as well. |
eb587b7
to
50db210
Compare
I have added some tests for invalid recommendation XML files