Re: PloneSoftwareCenter DOAP



Hello all,

Here is the last update on the current status of PloneSoftwareCenter DOAP implementation.

1. Solved the All platforms bug.
2. Removed the template doap_feed.pt and instead using a view class to display the rdf, and it gets called with <project_url>/doap.rdf. Now returns the correct mimetype (application/rdf+xml) and is generally better formatted (thanks minidom!).
3. If someone inserts a PoiTracker in the project, it overrides the (eventually) one set by url. There is a test for this too, even if it gives a lot of deprecation warnings because I have to use quickinstaller in order to make Poi work (if I don't quickinstall Poi, I'm not able to add it into PSC ;)).
4. 13 test failures in my branch.

Ok, this was in short. Now, point by point, what I did.

1.

The "All platforms" bug have been solved in the way that Martin suggested, which means enabling the user to choose which entry in availablePlatforms means "All platforms" (eg behaves like all platforms, even if I write "Every platform" or "Ze tarGZ!!!!1!!!11!!!elven!!!!!!").

How was this done?

I simply decided that the first line that is written in availablePlatforms is the line we're searching for: this approach has the very welcomed collateral effect of not needing any migration of the existing content, at worst it might screw up a bit the semantic of the DOAP export, but then it's just a matter of rearranging the lines (since nobody except the DOAP export gives really a fuck about how the lines are ordered, we are safe).

Ok, and what if I don't want to have a line that means "All platforms"?

You put in the first line a single minus sign (-). This character (or better, the line composed by this only character) gets filtered by getPlatformVocab in downloadablefile and filelink (I have modified the methods in my branch btw) so you end up considering that as a line that doesn't exists. But since it's the first, you have no lines that mean "All platforms".

And if someone programs an OS called minus (-)?

Good question. I guess I can either fork that OS, make it better and call it plus (+) and hence stealing all the userbase of minus and driving it out of PSC config. Or hey, we can write "minus".

What if I have many label that mean "All platforms"?

Ok this use case isn't covered. But I somewhat don't see how one can need it.

2.

Not much to say here, I just wanted to have the correct mimetype and I thought we could switch to rdflib sometime soon (I didn't do that now though, cause it would add a dependency). But would be cool to have it sometime in the future. Also, I changed the name to doap.rdf (or optionally just doap, have to hear the doap guys on this) because doap_feed was too long and I hate underscores.

3.

Ok, this is trivial.

4.

Which are the same of the trunk branch I believe (updated as today). I wrote down all the tests I could think of, trying not to rewrite the same test twice with just different constants. Anyway, if someone feels compelled to add a test, he's much welcomed.


Okay, there are still a little details we need to discuss with the DOAP guys, but since they are being very collaborative we will discuss them before and then see what changes we have to make to the code, and then make them.

I'm quite eager to merge this in trunk, also. Martin, what do you think? Also, I haven't been able to found sirgarr's email, could you inform him of my intention to merge in trunk and give him my contact?

Greetings everyone,

--
Simone Deponti
-------------------------------------------
- Oh wait, which ones are we Linux guys again, Rebels or Empire?
- Microsoft is the Empire. Apple is the Rebels. We are the Ewoks.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]