Description:

Provides integration with the Algorithmia API for Drupal 7 sites.

Algorithmia is an algorithm marketplace where users can create and consume algorithms through a web API. Some advanced algorithms are useful for a CMS like Drupal but are not suited for the Drupal ecosystem and the standard LAMP stack. This module gives a point-and-click interface to use such algorithms on your Drupal site, while actually executing them on Algorithmia's infrastructure.

Status:

Actively maintained and developed. As new algorithms are added to Algorithmia which are practical in Drupal, I will be adding support for them in this module.

The first two I did are a content recommendation system and a nudity detection algorithm for images stored in Drupal.

The recommendation engine works by inserting a JavaScript file on selectable nodes which sends content to the Algorithmia API. Those nodes are indexed and then each is sent some HTML which displays related nodes. This is implemented with the block system, so users can configure which nodes are indexed and where the recommendations are displayed with utmost ease.

The nudity detection algorithm is run only when requested via the admin UI. A site admin will use the file UI to select which images to scan. A URL to each image is sent to be processed by the Algorithmia UI. Admins are notified on screen if there is a risk that an image contains nudity.

Users may follow the instructions in the README file to install and find the configuration page.

Sandbox:
https://www.drupal.org/sandbox/sheldonkreger/2507245

git clone --branch 7.x-1.x http://git.drupal.org/sandbox/sheldonkreger/2507245.git algorithmia
cd algorithmia

Pareview:
http://pareview.sh/pareview/httpgitdrupalorgsandboxsheldonkreger2507245git

It is throwing a false positive on a whitespace error at the end of a file.

Bonus program (I reviewed three):

https://www.drupal.org/node/2548683#comment-10274505
https://www.drupal.org/node/2552765#comment-10274487
https://www.drupal.org/node/2560121#comment-10274469

Comments

sheldonkreger created an issue. See original summary.

sheldonkreger’s picture

Issue summary: View changes
PA robot’s picture

Issue summary: View changes

Fixed the git clone URL in the issue summary for non-maintainer users.

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.

gauravsood91’s picture

Automated Review

FILE: /var/www/drupal-7-pareview/pareview_temp/algorithmia.admin.inc
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
70 | ERROR | [x] Whitespace found at end of line
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------

Time: 97ms; Memory: 5.5Mb

It may be a false positive like you said. You might want to try and remove the extra whitespace using a text editor and regular expression of some kind. Apart from that, it looks good

Manual Review

Individual user account
Yes: Follows 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 the guidelines for 3rd party assets/code.
README.txt/README.md
Yes: Follows the guidelines for in-project documentation and/or the README Template.
Code long/complex enough for review
Yes: Follows the guidelines for project length and complexity.
Secure code
Yes: Meets the security requirements
Coding style & Drupal API usage
Yes: It follows code and API guidelines.

sheldonkreger’s picture

Issue summary: View changes
sheldonkreger’s picture

Thank you for taking the time to review this.

For some reason I misread the warning the first time. I was looking at the very end of the file for a blank line, not a white space. I found it and fixed it.

http://pareview.sh/pareview/httpgitdrupalorgsandboxsheldonkreger2507245git

This module is simple. It will be expanding over time.

ajalan065’s picture

Hi sheldonkreger,
Nice work. Did not find any issue with your code. Though did not go through the functionality

sheldonkreger’s picture

I have it running on my drum blog. You can click posts and see recommendations if you like. Example:

http://prodrumblog.com/purposeful-porpoise-water-games

tim_marsh’s picture

Status: Needs review » Needs work

Hi @sheldonkreger

manual review - just a few small issues

line 26 - I'd remove the comment , it doesnt help.

// This example comes from node.module.
if ($delta == 'algorithmia_recommender') {

adding the javascript to the block - can you use attached in the content array rather than embedding it as a string ?
something like

$block['content'] = array(
  '#markup' =>  _algorithmia_get_html(),
  '#attached' => array(

    ),
  ),
);

the file comment is wrong at the top of the install file.

/**
 * @file
 * Install, update and uninstall functions for the file_entity module.
 */

you've used a permission in your hook menu, but that isnt defined in a hook_permissions implementation

  'access arguments' => array('administer algorithmia'),

this means that you wouldnt be able to grant the permission to a non user 1 user.

other than those small issues, installs fine, works as advertised - I think if the permissions hook is added it can go to reviewed by the community

sheldonkreger’s picture

Status: Needs work » Needs review

Thanks, tim_marsh !

I added the permission hook, removed the useless comment, and fixed the typo in the install file comment.

Regarding the use of #attached inside the block, I chose to leave that as a string because it allows me to add the required DIV, insert the API key, and load the script all at once. Using #attached does not allow me to insert the data-apikey and data-uuid into the

tag. This is still a problem, even if I use #markup to include the
that this system requires. This may cause an issue with block caching, so I went ahead and set DRUPAL_NO_CACHE in the hook_block_info() to prevent the issue. This implementation works very well and I believe that a performance enhancement to allow caching of the block would be a great enhancement to have. However, I'd hate to see it block the release of the module.
tim_marsh’s picture

Status: Needs review » Reviewed & tested by the community

Im happy with these last changes that this can move to reviewed and tested by the community

sheldonkreger’s picture

This sandbox has been marked RTBC. I still cannot promote my sandbox to a full project. What is the final step I need to take? I believe I have completed all steps for https://www.drupal.org/node/1011698

drumm’s picture

Status: Reviewed & tested by the community » Fixed

I've granted you Git vetted user status.

klausi’s picture

@drumm: thanks for reviewing and helping out! For transparency I added you to the list of code review admins at https://groups.drupal.org/node/142454 . The usual template for applicants we use when we approve them from https://groups.drupal.org/node/184389#promote :

Thanks for your contribution, sheldonkreger!

drumm 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.

drumm’s picture

Thanks, and sorry I missed that. I only got involved because I've worked with sheldonkreger in the past (not currently), and saw https://www.drupal.org/news/help-test-drupalci#comment-10385551. Hopefully we can move forward on the project application process changes soon.

Status: Fixed » Closed (fixed)

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