Countries API update
| Project: | Country codes API |
| Version: | 5.x-1.0 |
| Component: | Code |
| Category: | task |
| Priority: | normal |
| Assigned: | ngmaloney |
| Status: | closed |
Jump to:
Hello All,
I contacted the author of the module to assist in becoming a module maintainer and am anxiously waiting to hear back.
I was in need of a similar module. Rather than fork I combined what I was working on with the countries_api module. The result is 100% compatible with the 5.1.x release but with the results coming from a database. There will also be additional functions which I'll document. The latest version can be found here: http://github.com/ngmaloney/countries_api/tree/master.
Because my client is running D5 the initial release is for Drupal 5. As soon as that is complete I'll port it over to Drupal 6. Please message me if you would like any features and I'll make my best attempt to add them.

#1
ngmaloney - as you can see, I have release a drupal 6 alpha. I took the code from your git repo on Feb 28 and ported that. All tests pass and code is validated with coder with the exceptoion of one line.
Might I suggest that you run your D5 version through coder once you have it commited her on drupal.org, as there were quite a few coding style violations. Nothing serious, mainly just style things, but it's bets to be constant with the Drupal way as much as possible..
Please let me know of any changes you have made since Feb 28, and I will make sure these get ported across to.
#2
@mrfelton - Agreed 100%. The code in my git repo is still in heavy development. I'll create a "clean branch" and send over an outline what I've changed.
One major refactor I've implemented is storing the country data in a db as opposed to within the php code itself. I'm working on a project where I need services_api integration and also am working on a hook that will allow users to optionally create a taxonomy collection of countries, pre-populated by the DB. I welcome any thoughts, criticisms, etc on this change.
#3
I cleaned up the 5 module and will release the changes as 5.x-2.0-dev. I'm thinking it is best to move the included regions_api as a separate module. I'll apply my cleaned up 5.x changes to 6 and deploy to CVS too.
#4
@ngmaloney: Do you mean to propose to create a separate contrib project for the regions_api stuff?
#5
@mrfelton - From an organizational perspective I think it would make sense. The functionality complements the countries_api but doesn't have to be dependent. What are your thoughts?
#6
as it is currently, people already have a choice over which components they enable, so the projects are not really dependent on one another, except from the fact that you must download both together.
However, what you would get by splitting the project is individual project issue queues and possibly simpler project management for each project as a single unit. I say go for it. Just be sure to reference the other related project(s) on the project homepages so people are made aware of where the additional functionality can be found.
#7
@ngmaloney, I see that you have removed the regions_api code from the module in your git repository. Do you think you could you transfer your latest works over to drupal.org and continue the work over here? I have several things I would like to to to this module, but I want to ensure the D5 and D6 trees stay in sync, and so I'm reluctant to do anything until I know that we are both working off the same code base.
#8
@mrfelton. Absolutely. I'll get that over ASAP.
#9
Hi Nick, I got your mail - sorry took so long to respond, been ultra busy finishing a site that is due to launch on Mnaday!
Anyway, I see that you have commited your code now - nice one. I think the only thing left to do now is to port any changes from your 5.x branch since I commited the initial D6 port on feb 28, over to the D6 tree. I'd rather leave this to you if you don't mind, since you probably have a better idea of what has changed.
I think 5.x-1.1-alpha1 was probably the right thing to do, as now both trees are running on the same version number, which is nice for the sake of simplicity. Once both trees are in sync, we should bump both version up to beta1 and give a little more time for testing before we make official 5.x-1.1 and 6.x-1.1 releases
The only thing I would say is that, I know you have removed the regions_api stuff... A few people are using the Drupal 6 alpha already, with the regions_api in there, so when we remove regions_api, we should at the same time release it on drupal.org in it's own project, let people know where they can get it, and warn them about the change.
EDIT: I forgot to mention... I'm sure you probably noticed already, but there is a new tab for projects on drupal.org that gives some help for using cvs. For the countries api its here: http://drupal.org/project/countries_api/cvs-instructions. As you know, dev work for the D5 branch is done in DRUPAL-5, and the D6 work is done in DRUPAL-6--1 (we don't use HEAD).
#10