Support from Acquia helps fund testing for Drupal Acquia logo

Comments

PA robot’s picture

Status: Needs review » Needs work

There are some errors reported by automated review tools, did you already check them? See http://pareview.sh/pareview/httpgitdrupalorgsandboxbren0012139829git

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.

bren001’s picture

I've addressed missing comments and comment formatting as reported by pareview.sh, however, a large number of reported errors remain. As this a a views query plugin and subclassed the views handlers and plugin classes, I'm using the views names and naming conventions. These remaining errors all relate to this subclassing.

bren001’s picture

Status: Needs work » Needs review
ricovandevin’s picture

Hi! Thanks for your contribution!

I've performed a code review for your project. It looks clean to me and the README.txt is well written.

I did not test whether or not the module is working as expected since I would have to register to get an API key. This might be a problem for more reviewers. Can't we create one account with an API key that can be used by all reviewers?

As it comes to documentation you might want to consider the following:

  • Add a short description of what Trove is to the project page. You can still link to the website of the NLA for more information.
  • It is not clear to me whether I can use the Trove API module without enabling the Trove Views Query module and if so how. Maybe you can add some text about that too.
  • My guess it that the main module (Trove) is intended as an API that can be used by others to create modules that interact with the Trove service and that the Trove Views Query is such a module. You might consider to write some documentation about how others can use the API in their own modules.
bren001’s picture

Thanks you for your review and feedback ricovandevin.

Your suggestions regarding the use of one or both modules is great and something I did overlook. I've added some developer documentation and description of how to use one or both modules.

Thanks again.

bren001’s picture

Issue summary: View changes
xtfer’s picture

Status: Needs review » Needs work

I have a few suggestions for you:

  • The TroveAPI class does not conform to coding or documentation standards. Among other things, it has undocumented parameters and variables, and non-camelcased function names
  • Consider splitting your TroveAPI class into multiple files and loading using a proper class autoloader like XAutoload using PSR-4
  • Consider defining your TroveAPI class using an Interface. Strictly speaking, your @return value for the factory function is incorrect without one.
  • Consider moving the API component to a standalone library (e.g. on github) and load via composer
  • If you retain the current structure, change the file name. module.api.inc is the standard naming convention for Drupal hook documentation files
  • Remove the .gitignore file. You can always ignore these files globally in your own development environment

I'm happy to help with any of those refactoring tasks, if you wish.

bren001’s picture

Thanks xtfx, your suggestions are much appreciated.

On your suggestion to move the API component to a public repo and load via composer, is this a reasonably expectation of D7 sites? I understand it's the D8 way and I do want to get a D8 version of this module in place eventually.

I'll implement you're suggestions and would love to take you up on your offer of help with review/advice.

Thanks again.

PA robot’s picture

Status: Needs work » Closed (won't fix)

Closing due to lack of activity. If you are still working on this application, you should fix all known problems and then set the status to "Needs review". (See also the project application workflow).

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

bren001’s picture

Issue summary: View changes
bren001’s picture

Status: Closed (won't fix) » Needs review

I've split the Trovequery module out, leaving just this TroveAPI module. There has also been work refactoring the Trove module, adding registry_autoload for PSR-4 autoloading. I've incorporated most of @xtfr's suggestions, including complying with the coding and documentation standards.

I'm providing a temporary API key for anyone wishing to review this module:

Thank you.

SwapS’s picture

FileSize
117.22 KB

Automated Review

http://pareview.sh/ -- has coder finding . Please work on those.

Manual Review

Individual user account
Yes: Follows the guidelines for individual user accounts.

No duplication
Yes: Stands valid here.

Master Branch
Yes: Follows the guidelines for master branch.

Licensing
Yes: Follows the licensing requirements.

README.txt/README.md
Yes: Follows the guidelines for in-project documentation and/or the README Template.

Coding style & Drupal API usage
looks Good.

SwapS’s picture

Status: Needs review » Needs work
klausi’s picture

Status: Needs work » Needs review

Those pareview issues alone are surely not application blockers, anything else that you found or should this be RTBC instead?

SwapS’s picture

@klausi : Haven't yet tested the module by downloading ...Had a walk through code check . Look good . Would surely want to do a Dev test before RTBC.

Thanks,
SwapS

bren001’s picture

Thanks for reviewing @SwapS, those preview issues are all line length issues. Each reported issue relates to a line in a comment that contains a long URL for related help, e.g:
57 | WARNING | Line exceeds 80 characters; contains 121 characters
ingers crossed we can get this to RTBC

chandrasekhar539’s picture

Automated Review

http://pareview.sh/ -- has coder finding . Please work on those.
Please make sure that characters not exceeds the above 80 characters

Manual Review
In Trove.module
it is good to use dynamic queries instead of static quiries
db_query("SELECT nuc, name
FROM {trove_contributors}")
trove.install
Please make sure that characters not exceeds the above 80 characters
README.txt
Please make sure that characters not exceeds the above 80 characters

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

bren001’s picture

Thanks @chandrasekhar539. I've addressed the offending query, it was redundant and has been removed. As stated in earlier comments, the automated review issues relate to a lines in comments that contains a long URL for related help.

zakir.gori’s picture

Please do the following changes

FILE: /trove.module
----------------------------------------------------------------------
FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES
----------------------------------------------------------------------
57 | WARNING | Line exceeds 80 characters; contains 121 characters
83 | WARNING | Line exceeds 80 characters; contains 130 characters
147 | WARNING | Line exceeds 80 characters; contains 130 characters
166 | WARNING | Line exceeds 80 characters; contains 130 characters
----------------------------------------------------------------------

FILE: .../trove/TroveApiNewspaperTitle.php
---------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
---------------------------------------------------------------------------
4 | WARNING | Line exceeds 80 characters; contains 85 characters
---------------------------------------------------------------------------

FILE: /README.txt
----------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
----------------------------------------------------------------------
56 | WARNING | Line exceeds 80 characters; contains 85 characters
68 | WARNING | Line exceeds 80 characters; contains 120 characters
----------------------------------------------------------------------

kattekrab’s picture

As the poster has said many times, the line length reports can be ignored due to a long URL provided for additional help. Please read proceeding comments when giving your reviews.

This would be a very useful module if we can get it through the review process. It seems to have languished in the queue a little. What else is needed for RTBC at this point?

kattekrab’s picture

@bren001 - are we likely to need a new API key for testing? Or will the temp key you posted almost a year ago still work?

kattekrab’s picture

and in the meantime, this module is available on github

https://github.com/bren2000/trove

kattekrab’s picture

and in the meantime, this module is available on github

https://github.com/bren2000/trove

cafuego’s picture

Status: Needs review » Reviewed & tested by the community

I've tested the module with the provided API key and it looks to work as advertised :-)

Tested:

  • Publication title search
  • Keyword search
  • Faceted keyword search
  • Change result encoding between xml/json

So I see no reason why this shouldn't be a full project.

bren001’s picture

Thank you @cafuego and @kattekrab. Great to see movement here.

@kattekrab now I can push the trovequery views module forward too. Would love to see it used in the wild and we can see if the National Library and Trove would like to promote it's use.

naveenvalecha’s picture

Assigned: Unassigned » naveenvalecha

Assigining to myself for next review that may be tonight

naveenvalecha’s picture

Assigned: naveenvalecha » klausi

Review of the 7.x-1.x branch (commit 6247d3d):

This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. You have to get a review bonus to get a review from me.


FILE: ...MAMP/htdocs/www/d7/sites/all/modules/contrib/pareview_temp/README.txt
---------------------------------------------------------------------------
FOUND 0 ERRORS AND 10 WARNINGS AFFECTING 10 LINES
---------------------------------------------------------------------------
 48 | WARNING | [x] Unused use statement
 49 | WARNING | [x] Unused use statement
 56 | WARNING | [ ] Line exceeds 80 characters; contains 85 characters
 58 | WARNING | [x] Unused use statement
 59 | WARNING | [x] Unused use statement
 68 | WARNING | [ ] Line exceeds 80 characters; contains 120 characters
 70 | WARNING | [x] Unused use statement
 71 | WARNING | [x] Unused use statement
 82 | WARNING | [x] Unused use statement
 83 | WARNING | [x] Unused use statement
---------------------------------------------------------------------------
PHPCBF CAN FIX THE 8 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------


FILE: ...www/d7/sites/all/modules/contrib/pareview_temp/src/trove/TroveApi.php
---------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------
 26 | ERROR | [x] Inline comments must end in full-stops, exclamation
    |       |     marks, colons, or question marks
---------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------


FILE: ...ll/modules/contrib/pareview_temp/src/trove/TroveApiNewspaperTitle.php
---------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
---------------------------------------------------------------------------
 4 | WARNING | Line exceeds 80 characters; contains 85 characters
---------------------------------------------------------------------------


FILE: ...htdocs/www/d7/sites/all/modules/contrib/pareview_temp/trove.admin.inc
---------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
---------------------------------------------------------------------------
 7 | WARNING | [x] Unused use statement
 8 | WARNING | [x] Unused use statement
---------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------


FILE: ...MP/htdocs/www/d7/sites/all/modules/contrib/pareview_temp/trove.module
---------------------------------------------------------------------------
FOUND 0 ERRORS AND 6 WARNINGS AFFECTING 6 LINES
---------------------------------------------------------------------------
   8 | WARNING | [x] Unused use statement
   9 | WARNING | [x] Unused use statement
  57 | WARNING | [ ] Line exceeds 80 characters; contains 121 characters
  83 | WARNING | [ ] Line exceeds 80 characters; contains 130 characters
 147 | WARNING | [ ] Line exceeds 80 characters; contains 130 characters
 166 | WARNING | [ ] Line exceeds 80 characters; contains 130 characters
---------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------

Time: 758ms; Memory: 5Mb

http://pareview.sh/pareview/httpgitdrupalorgsandboxbren0012139829git-7x-1x

Manual Review :

  1. Remove some unused statements from trove.module
  2. trove_admin_settings_validate : Add more user error set message
  3. Add a hook_help

it would be really helpful to add a example submodule which provides the examples/usecases of the api usage.yeah there are couple of good examples in Readme file.

Rest looks good to me.Please take a review bonus before next review.

Assiging to klausi to give it a look when he gets time

Edit : You should fix above issues first and get another review bonus by manual reviews of 3 modules that would help speed up the process.

bren001’s picture

Thank you @naveenvalecha.

Changes made in response to your review:

  1. I've removed unused 'use' statement in trove.module.
  2. I've added error messages to the admin form
  3. I've added hook_help implementation

I've also added a very simple example submodule.

One question: What do you mean by 'Please take a review bonus before next review'. I understand the review bonus system but not that statement.

Thanks again.

naveenvalecha’s picture

Edited the comment.

bren001’s picture

Issue summary: View changes
bren001’s picture

Issue summary: View changes
bren001’s picture

Issue summary: View changes
bren001’s picture

Issue tags: +PAreview: review bonus
klausi’s picture

Assigned: klausi » Unassigned
Status: Reviewed & tested by the community » Fixed
FileSize
4.69 KB

Review of the 7.x-1.x branch (commit 49ff23b):

This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. You have to get a review bonus to get a review from me.

manual review:

  1. trove_get_zones(): did you mean to use drupal_map_assoc() here?
  2. trove_cron(): my cron runs every 5 minutes, so this will be executed very often. Is that necessary? I think you should define an interval when items should be refreshed.
  3. protected function troveSetError(): never pass already translated string s to watchdog(). It means it will get translated twice, which is bad.

Otherwise looks good to me.

Thanks for your contribution, Brendon!

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.

bren001’s picture

Thank you @klausi, and to all who reviewed. Great to get this over the line. Looking forward to contributing more back to Drupal.

kattekrab’s picture

\o/

Yay!!

Welcome aboard @bren001

Status: Fixed » Closed (fixed)

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