This module is a full implementation of the Google Vision API, that also provides a hook to grab the returned information and feed any search form or anything like that. It is coded using the Google PHP Client Library, through the functionalities provided by Libraries API and another module that i've created, the Google PHP Client Library(check it's project page), which will go live as soon as this module goes. The generic integration is provided through 2 blocks, one with the upload field and a select list of the API functions, and another one with the upload field and no function choosing available for end-users, as this one is configured through the block configuration page. The main purposal of this module is the functionality and easy way of implementation that it brings together with the Google PHP Client Library.

The project page contains more detailed information about the library.

You can clone the project by using the command git clone --branch 7.x-1.x https://git.drupal.org/sandbox/davic/2760509.git gvision

Manual Reviews of other projects:
https://www.drupal.org/node/2761385#comment-11476027
https://www.drupal.org/node/2633498#comment-11476245
https://www.drupal.org/node/2775533#comment-11476397
https://www.drupal.org/node/2498097#comment-11553131

Post-approval checklist:

  • Update readme file with the official Google PHP Client Library project page link as soon as it's not a sandbox anymore
  • Update the Project page links with the official Google PHP Client Library project page link as soon as it's not a sandbox anymore
  • Review any other documentation or help pages/hooks that may contain the old links

Comments

davic created an issue. See original summary.

PA robot’s picture

Multiple Applications
It appears that there have been multiple project applications opened under your username:

Project 1: https://www.drupal.org/node/2807381

Project 2: https://www.drupal.org/node/2779113

As successful completion of the project application process results in the applicant being granted the 'Create Full Projects' permission, there is no need to take multiple applications through the process. Once the first application has been successfully approved, then the applicant can promote other projects without review. Because of this, posting multiple applications is not necessary, and results in additional workload for reviewers ... which in turn results in longer wait times for everyone in the queue. With this in mind, your secondary applications have been marked as 'closed(duplicate)', with only one application left open (chosen at random).

If you prefer that we proceed through this review process with a different application than the one which was left open, then feel free to close the 'open' application as a duplicate, and re-open one of the project applications which had been closed.

I'm a robot and this is an automated message from Project Applications Scraper.

PA robot’s picture

We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)

Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).

I'm a robot and this is an automated message from Project Applications Scraper.

davic’s picture

Status: Active » Needs review
3ssom’s picture

Status: Needs review » Needs work

Hello davic,

I have a problem starting a review for your project which is Google PHP Client Library module as a dependence!

I tried to find it! the project link in your page gives a 404 ,, tried to google it also its not there! so how can we use your module to start reviewing it!

can you help us here start this :)

Thank you

davic’s picture

Hello @3ssom,

First of all, thank you for taking your time trying to review the module!

I'm not sure of what happened with the links, but they are working normally for me, still i'll leave the raw link to the Google php client library module here: https://www.drupal.org/sandbox/davic/2779027, please try using it.

And just as a reminder, the Google php client library module is also a sandbox of mine, as i intend to bring up both modules, but i realized that the library functionality could be more useful for the community as a module itself.

Please Tell me if you still have any kind of problema trying to review it! Thanks!

davic’s picture

Status: Needs work » Needs review
3ssom’s picture

Hello davic,

You are welcome buddy ,

So if Google PHP Client Library still a sandbox ,, why not start with it! I mean once you have the library as full project you won't have to go through all of this process because its one time thing!

I'd suggest that if you are planning on bring the both of them .. but what I don't understand is in your module page you have the link for Google PHP Client Library as a full project which confusing because it will give you a 404 page .. you should mention that and fix the link also there.

if you intent to complete this one I'd be happy to complete this one and give it a try as you said for the sandbox dependence there ..

Thank you

davic’s picture

3ssom,

Indeed it would be great to start with it, but i wanted to ensure that this code is clean, because it uses a lot of hooks and Drupal stuff, and it is way larger than that one, that is a simple implementation of the libraries module's hook. This way i ensure i'm more used to the Drupal Standards of coding, and i was also wondering about one of the items from the approval checklist that relates to the complexity of the code, so i just said "why not take a shot?" to this one.

And about the project page i'll fix it right now, thank you for the help!

If you don't mind, i would appreciate if you take a try to this one!

Thanks.

3ssom’s picture

Assigned: Unassigned » 3ssom
Priority: Major » Normal

Ok as you wish ,, will do the review right now ,, but please don't change the priority ..

3ssom’s picture

Status: Needs review » Needs work

Here we go :)

Automated Review

found some minor errors @
http://pareview.sh/pareview/httpsgitdrupalorgsandboxdavic2760509git

Note that perfect adherence to Drupal Coding Standard is NOT a reason to block an application, except for total disregard of them. However, modules should follow them as closely as possible.

Manual Review

Individual user account
[Yes: Follows] the guidelines for individual user accounts.
No duplication
[Yes: Does not cause] module duplication and/or fragmentation.
Master Branch
[Yes: Follows] the guidelines for master branch.
Licensing
[Yes: Follows] the licensing requirements.
3rd party assets/code
[Yes: Follows] please read this the guidelines for 3rd party assets/code.
README.txt/README.md
[No: Does not follow] the guidelines for in-project documentation and/or the README Template.
Code long/complex enough for review
[No: Does not follow] the guidelines for project length and complexity.
Secure code
[Yes: Meets the security requirements. / No: List of security issues identified.]
Coding style & Drupal API usage
[List of identified issues in no particular order. Use (*) and (+) to indicate an issue importance. Replace the text below by the issues themselves:
  1. automated test found some errors
  2. README file looks good but didn't follow the (Table of contents) specially Installation & Configuration they need to be separated section. see the the link here
  3. you implements of hook_help() I don't think this good a idea to include the same README file there? it should be about helping the user use your module not putting everything there .. plus if its in the file how would you make translatable if you didn't use t(). ? see the Code example in the hook page ,, the hook doesn't look good with a lot of if() statements looking for files and existing modules! you can lose of that using just a summary of what matters with t() function.
  4. its OK to use PHP function but it'd be better to look for something similar from Drupal API functions .. what I mean here for example in your .module file, line:15 you are using dirname() which can be replaced with drupal_get_path('module', 'gvision') ,, this goes for every PHP function ,, its always better to use Drupal API function.
  5. you could use the (configure = path to your project's configuration page) in your .info file which helps a lot using your module
  6. (*) you are missing a .install file ,, you have a lof variables needs to be addressed in case uninstalling the module.
  7. In your .module file, line:58 ,, you are using a (access arguments) of (Administer site configuration) which I believe you misspelled it ,, the right name is (administer site configuration) ,, anyway I'd prefer using custom permission with hook_permission() ,, it would be better to not link your page permission with some other permission even if its in core it will cover a lot of issues(scenarios) in the future.
  8. In your .module file, line:154 ,, you could put your file into custom folder (public://gvision) it'll be better to define your file .. you need that also in the (.install) file I mentioned .. to removed anything related to your project.

I'd like to mention that one of the module dependencies[] = google_php_client_library is still in sandbox which made me cloned it before I was able to enable the module .. I guess this would be up to the Git admins to decide what to do about this..

The starred items (*) are fairly big issues and warrant going back to Needs Work. Items marked with a plus sign (+) are important and should be addressed before a stable project release. The rest of the comments in the code walkthrough are recommendations.

If added, please don't remove the security tag, we keep that for statistics and to show examples of security problems.

This review uses the Project Application Review Template.

davic’s picture

StatusFileSize
new28.27 KB
new32.06 KB

Thank you very much for the review!

I made the necessary changes to the code, README, and added an install.php file. According to some research that i did, because i'm using managed files i can't bulk remove them with file_unmanaged_delete_recursive(), so i did another kind of implementation in the hook_uninstall() (I attached an Image to highlight this code). I'm not sure if it's coded in the best way, so i'd like to hear your opinion about it :).

About the README file, i updated it to follow the Table of Contents the closest, but in the page related to README files guidelines, there are some links related to examples that are accepted too(also attached the image showing these links), i also looked at them while created mine, thats why there are some additional content in the README file.

Alright, thanks for all the help! I'll be waiting for the next review ;)

davic’s picture

Status: Needs work » Needs review
davic’s picture

Issue summary: View changes

Just adding a checklist to the issue summary of what needs to be done if the project gets approved, such as :

  • Update readme file with the official Google PHP Client Library project page link as soon as it's not a sandbox anymore
  • Update the Project page links with the official Google PHP Client Library project page link as soon as it's not a sandbox anymore
  • Review any other documentation or help pages/hooks that may contain the old links
3ssom’s picture

Status: Needs review » Reviewed & tested by the community

Hello davic,

Great work ,, will follow the points mentioned in my review above.

  1. Automated test looks good no error found.
  2. README file looks good :)
  3. hook_help() .. better and shorter coding than before :) .. but you have a small error .. you need to address the parameter with the right name with is @gvision NOT @blocks .. the link for Administration Page now isn't working properly just replace it with one you put there.
  4. I can see you implemented hook_permission .. which is better but you need to always add this hook at first hook in .module file .. this will make you Permissions link shows in the modules page with Help and Configure
  5. In your file inc/gvision.form.inc line:45 you don't need the surrounded () you can use it just like this system_settings_form($form)
  6. File .module line:201 .. don't you need to add the new module folder(public://gvision) also there? or I'm missing something here?
  7. For removing files: as long as you are using at the end of it when deleting file_delete() passing the right file object to it I see it a legit way to use hook_uninstall to remove the project's files .. unless somebody else has a better way around it ..

I'd like to mention here to the git admin again .. this module use google_php_client_library which is a dependencies for this module is still a sandbox for now.

otherwise I see no blocker here and this is a RTBC!

davic’s picture

Alright, all the the adjustments were made!

Thank you very much for your time 3ssom, i learned some nice stuff while following your advices, and now the code seems great!

Just mentioning one more time to the git admin, as 3ssom already mentioned before, this module uses the google_php_client_library one that is another sandbox of mine, and that will be released together with this one. They are separated because i realized that the library functionality could be more useful for the community as a module itself.

Thanks!!

3ssom’s picture

Assigned: 3ssom » Unassigned

Hello davic,

You are welcome :)

I can confirm all points are cover and fixed .. I'm unassigning this from me for now so the git admins can publish this project .. also I totally agree with you on separating the 2 module .. API's always need to be separated because anyone can use the API for any other idea or project .. but probably you should have started with the API module first which is very OK giving this the priority as the main idea for the project :)

Good luck .. and keep up the good work!

imyaro’s picture

Hello,
Seems this module is duplication of the https://www.drupal.org/project/google_vision
Or not? I didn't compared modules functional

davic’s picture

Hello @zvse,

I wouldn't say so. In a functional view, i'd say they are pretty different, even though we are talking about the Google Vision API in both cases. The Google Vision Module provides a great functionality related to entities, so that includes categorization integrated with taxonomies for example, and much more. In my case i'm providing a different and simpler use, while i provide some blocks for direct connection with the API, so that it's simple to use and not related to categorization, and more than that, the main purpose on my module resides on the hook it provides, which is very useful for situations where you want to use an image as a source of information for search fields or integrations with other APIs. And more than that, i'm not doing the requests manually, i'm using the official Google PHP Client Library for it and also providing a module that uses the Libraries API Module to implement that Lib in order to make it available for anyone to use.

So, in my opinion it doesn't seems that the functionality is the same, but feel free to share your opinion too if you can compare them, so we can discuss further!

Thank you :)

klausi’s picture

Status: Reviewed & tested by the community » Fixed

manual review:

Otherwise looks good to me!

Thanks for your contribution, Davi!

I updated your account so you can promote this to a full project and also create new projects as either a sandbox or a "full" project.

Here are some recommended readings to help with excellent maintainership:

You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and stay involved!

Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

Thanks to the dedicated reviewer(s) as well.

Status: Fixed » Closed (fixed)

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