Once the API is frozen, we need to publish it somewhere... Something like api.drupal.org? Is there such a thing for modules?

CommentFileSizeAuthor
#17 api.aegirproject.org_.make_.txt954 bytesergonlogic

Comments

SamRose’s picture

Status: Active » Closed (fixed)
anarcat’s picture

Status: Closed (fixed) » Active

Thank you for the references, but please do not close this issue, as the API still needs to be produced.

SamRose’s picture

Oh, shoot. Sorry about that.

SamRose’s picture

anarcat: where are you at with creation of API?

anarcat’s picture

Issue tags: +aegir-1.0

tagging for 1.0

anarcat’s picture

Version: 5.x-0.1-alpha1 » 6.x-0.3-rc1

so we still have a long way to go here.

we have close to no documentation apart from some inline function comments. some rendering is done on code.developmentseed.org:

http://code.developmentseed.org/aegir/api/files

... but that will not yield anything interesting as long as we don't have sample hooks files. take example on what Ubercart is doing:

http://api.ubercart.org/api/file/docs/docs/developer/hooks/core.php/2/so...

Notice how they have split their documentation between UC 1 and 2...

This is also an interesting way to present the data:

http://www.ubercart.org/docs/api

This is a good way to get involved in Aegir, although it may be a little soon to start working on that since the API is likely to change.

Anonymous’s picture

I would like to see something *prior* to 1.0. As we are starting to stumble around trying to work out why things won't work, and 1.0 is too far away to get good documentation on this IMHO.

anarcat’s picture

Status: Active » Needs review

So I totally agree with you there miguel. 0.4 should be a first stab at that API: while it will not be stable, we can at least start publishing it so we see the glaring holes we currently have.

I think somebody (koumbit?) should setup api.aegirproject.org that would be a trivially simple Drupal site that would just parse the php files using the API module. Or should this be on the community.a.o site?

Regardless, we need to publish and enhance.

Anonymous’s picture

I am happy to have api.aegirproject.org, c.a.o and lists.aegirproject.org. It's clean :)

you have my blessing if you've the resources to generate an api app (I don't know whats involved there, I'm sure you know what the tools are)

anarcat’s picture

all that needs to happen is to:

1. pull git regularly
2. have a drupal site with the API module parsing this stuff
3. cron

i can look at this next week.

willmoy’s picture

My recipe—

drush_make:
core = 6.x
api = 2
projects[] = drupal

projects[] = api
projects[] = job_queue
projects[] = ctools

Manually download grammar_parser and alter its .info file to 6.x instead of 7.x. Grr.

In the site's files directory, mkdir aegirsrc

git-clone -n git://git.aegirproject.org/hostmaster
git checkout hostmaster-0.4-beta1

git-clone -n git://git.aegirproject.org/provision
git checkout provision-0.4-beta1

Fill in the API reference config and run cron a few times... http://aegirapi.idealworld.org/

This only needs updating when a new release comes out, which would take a couple of minutes. If there's a demand for HEAD coverage simple to do the git pull thing as well.

anarcat’s picture

Status: Needs review » Needs work

Hi! Thanks for the recipe!

However, on http://aegirapi.idealworld.org/, it seems everything is empty, is it because cron hasn't run?

ergonlogic’s picture

Sorry for being late to the party on this issue, but I also put up an API site for the Aegir code at api.ergonlogic.net. I also included drupal core, drush, drush_make, ubercart and uc_hosting, since these are all required to make a useful commercial platform out of Aegir. I'd be happy to maintain one for just the Aegir code though, if there's interest in that.

I've been sporadically updating this manually, but will write up a simple script that does a "git pull" on the aegir projects, and "drush dl" to update those hosted on d.o. I dumped all of this into a common project and branch, as API.module doesn't appear to generate links across branches. Also, API doesn't look great under eldir, so some theming tweaks are probably necessary.

willmoy’s picture

No, it's cos I did it on another site, cloned it and didn't check and find out that the path to the files in the API module config pointed to the old site. Then I deleted the old site. It's working now, and the recipe is sound.

Thanks to ergonlogic, I thought someone would have got there first. One odd bug, which doesn't seem to apply to most searches, but http://api.ergonlogic.net/api/search/6/hostmaster.profile is 403 forbidden?

Comparing our two sites, I think it's much better with the other bits you mention (especially drush and drush_make) but it would make sense for the home page to be the equivalent of http://aegirapi.idealworld.org/api/Aegir/0.4-beta1 or better yet write some overview text that points out hostmaster, provision, anything else that needs pointing out and shove it up in a page.

The only other thing I'm slightly concerned about is that after putting everything in one branch, what happens when a new version of aegir comes out? Or would the site only track HEAD or only show the latest proper release?

It would be good to update http://community.aegirproject.org/node/79 soon as that was what frustrated me into action and it's a half hour job to get at least something up once the hosting's been determined.

anarcat’s picture

Nice!

There are three problems with this site:

1. it has drupal core: this unnecessarily pollutes the namespace, isn't it possible to link directly to api.drupal.org instead?
2. the eldir theme sucks: notice how the lists are not indented properly on the frontpage... maybe that's fixed in latest head?
3. it's not api.aegirproject.org ;) (easy enough to fix: add the alias on your side and we'll make sure adrian points the domain there)

Can we se to fix that and just get this over with? :) A git pull is obviously a good idea. Also keep in mind we may have to keep in mind multiple branches of the API (0.4, 1.0 and eventually 2.0).

susie’s picture

subscribing

ergonlogic’s picture

StatusFileSize
new954 bytes

To anarcat's points:

1. I've removed Drupal core (along with UC for the moment). I think devel links directly to api.drupal.org, but I haven't figured out how to (or if it's even possible) using API.module.
2. I don't know about "sucks", but the eldir theme does need some work. I just upgraded to beta2, and copied the eldir theme from there to the API site. So, it's pretty close to HEAD.
3. it's could be api.aegirproject.org ;) I've "add[ed] the alias on [my] side [so let's] make sure adrian points the domain there"

As for keeping the code updated, I'm calling drush make via cron with the attached makefile.

anarcat’s picture

Alright, this is looking better!

To keep the code updated... i didn't know you could call drush_make repeatedly, what does it do? it overwrites existing code?

It looks like provision doesn't get parsed properly:

http://api.ergonlogic.net/api/Provision/files/HEAD

Do we really need the drush_make API? We don't really talk to it directly, we only call it to backend_invoke (ie. through the commandline)...

I'll see if i can find adrian for a dns update now.

ergonlogic’s picture

... call drush_make repeatedly, what does it do? it overwrites existing code?

drush_make does indeed overwrite existing code. From running it with --debug, it looks like it executes 'cp -Rf' from a temporary directory. I just realized that, while this will keep existing files updated, and add new files, it won't purge files removed from the repo. So, I could run 'rm -rf' on the directories in question, before rebuilding them with drush_make, or write a script that calls git pull. I'll give it some further thought.

Do we really need the drush_make API?

I guess not, so I've removed it :) Drush Make is just so brilliant... However, there are starting to be some contributed modules targeting Aegir, such are uc_hosting and aegir_feeds. Is there interest in hosting those on this API site, maybe under 'contrib' or something?

BTW, this started off as a personal API site, so I had included a bunch more stuff I'm interested in too. Once api.aegirproject.org points there, I'll rebuild api.ergonlogic.net separately, and include those contrib modules, among others.

anarcat’s picture

About keeping existing files: no biggie for now...

I guess that including contrib modules could be a good service for the community.

The only reason why I don't feel drush_make is useful there is that there are not a lot (or none at all) consumers of its API...

willmoy’s picture

I think including contrib is a really good idea mainly because it provides other people with a starting point for developing aegir modules.

anarcat’s picture

Status: Needs work » Fixed

Let's say this is fixed now: api.aegirproject.org points to ergonlogic's server and has the API online.

Anonymous’s picture

That site seems to be using an Aegir 3.0-era theme with the two narrow sidebars.. would be nice to see that updated..

EDIT: it only affects the front page for me, maybe it's some weird cache stuff I don't know. ignore me.

ergonlogic’s picture

It's using a pretty recent version of Eldir... At one point I had a block in the left sidebar, but after removing it, the region was still appearing, even when empty. I double-checked that it was indeed empty, then cleared the cache. This seems to have fixed it.

Status: Fixed » Closed (fixed)
Issue tags: -aegir-1.0

Automatically closed -- issue fixed for 2 weeks with no activity.