This module aims to integrate RePEc repository with Drupal. RePEc is a repository of academical work in Economics. This module creates template files understandable by RePEc engine to update in their repository the academical articles inserted in a Drupal website. This project is still in the very beginning, but it is actively maintained.
Please review this project to grant permission to create a full project. Thanks for your review.
Link to the project:
https://www.drupal.org/sandbox/eversondasilva/2333885
Tutorial
https://www.urbaninsight.com/2014/09/08/building-drupal-module-for-resea...
Git Access
git clone --branch 7.x-1.x http://git.drupal.org/sandbox/EversonDaSilva/2333885.git repec
Automated Review
http://pareview.sh/pareview/httpgitdrupalorgsandboxeversondasilva2333885git
Manual reviews of other projects
https://www.drupal.org/node/2718335#comment-11181187
https://www.drupal.org/node/2568345#comment-11168911
https://www.drupal.org/node/2709047#comment-11168805
Comment | File | Size | Author |
---|---|---|---|
#40 | coder-results.txt | 3.79 KB | klausi |
Comments
Comment #1
EversonDaSilva CreditAttribution: EversonDaSilva commentedComment #2
EversonDaSilva CreditAttribution: EversonDaSilva commentedComment #3
PA robot CreditAttribution: PA robot commentedGit clone command for the sandbox is missing in the issue summary, please add it.
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.
Comment #4
PA robot CreditAttribution: PA robot commentedClosing 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.
Comment #5
EversonDaSilva CreditAttribution: EversonDaSilva commentedComment #6
EversonDaSilva CreditAttribution: EversonDaSilva commentedComment #7
EversonDaSilva CreditAttribution: EversonDaSilva commentedComment #8
PA robot CreditAttribution: PA robot commentedThere are some errors reported by automated review tools, did you already check them? See http://pareview.sh/pareview/httpgitdrupalorgsandboxEversonDaSilva2333885git
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #9
EversonDaSilva CreditAttribution: EversonDaSilva commentedComment #10
hussainwebThere are a lot of errors reported by the automated review. I think you should start there.
Also, you should have a 7.x-1.x branch for your code, and not a master branch. Given the number of errors, it will be better to fix them before attempting a manual review.
Comment #11
EversonDaSilva CreditAttribution: EversonDaSilva commentedComment #12
EversonDaSilva CreditAttribution: EversonDaSilva commentedComment #13
ldpm CreditAttribution: ldpm commentedAutomated Review
The automated review still returns a number of errors. Please visit http://pareview.sh and enter http://git.drupal.org/sandbox/EversonDaSilva/2333885.git as the branch to test.
You also have an extra directory in your repository (e.g. "repec/repec/repec.module") that could be throwing off some of the tests. It certainly seems to interfere with the check for a README.txt file.
Manual Review
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.
Comment #14
ldpm CreditAttribution: ldpm commentedAlso, please make sure your most up to date code is reflected in the 7.x-1.x branch of the drupal.org git repository. While I appreciate that you've attached zip files, I've based my review on the git repository, which is what Drupal considers authoritative. I'll happily continue the review when the issues detected by the automated tests are ameliorated.
Comment #15
EversonDaSilva CreditAttribution: EversonDaSilva commentedHi ldpm,
thanks for your review. I removed the master branch and fixed the issues in PAreview.
Thank you.
Comment #16
EversonDaSilva CreditAttribution: EversonDaSilva commentedAnyone knows what else needs to be done to approve this project? Thanks.
Comment #17
babusaheb.vikas CreditAttribution: babusaheb.vikas commentedNo need to use quotes in *.info file.
You *.info file looks like
Comment #18
dstorozhukYour git clone command required password. Please update the description of your project following the example https://www.drupal.org/node/2532406
Comment #19
EversonDaSilva CreditAttribution: EversonDaSilva commentedComment #20
EversonDaSilva CreditAttribution: EversonDaSilva commentedComment #21
EversonDaSilva CreditAttribution: EversonDaSilva commentedComment #22
glekli CreditAttribution: glekli commentedNice module, Everson. Undoubtedly, a lot of effort has been put into it.
Because the module is this elaborate, I wasn't able to do a complete review, but below are some potential issues I found after checking some parts of it:
Comment #23
EversonDaSilva CreditAttribution: EversonDaSilva commentedComment #24
EversonDaSilva CreditAttribution: EversonDaSilva commentedComment #25
minnur CreditAttribution: minnur as a volunteer commentedHi Everson,
Please commit your code to the repository instead of attaching your module to the post.
Once you make the change and commit your code respond here and change the issue status to "Needs review".
Thanks,
Minnur
Comment #26
EversonDaSilva CreditAttribution: EversonDaSilva commentedHi Gergely and Minnur,
thanks for your feedback. Gergely, please see the notes for these items:
3. hook_repec_paper_mapping
I pass NULL, but the NULL verifications are done properly inside the hook.
6. $form_state['values']['repec_check_delimiters']
there is a default value for this field.
Thank you.
Comment #27
EversonDaSilva CreditAttribution: EversonDaSilva commentedComment #28
jimmyko CreditAttribution: jimmyko as a volunteer commentedI have reviewed the module and all other related materials and found some issues as followings:
1. You should not upload your module as zip file in module page. I understand that there is no download links for sandbox page. I don't think you should make the download links by yourself.
2. All git commit comment is lack of information. I see there are many comment like "Refine module", "Update repec", "Fix code". Commit comment is not one of the item we are asked to check, but you should avoid doing that again.
3. There are quite a lot variable_get() in the form. Why not just combine them and use one large array?
Comment #29
EversonDaSilva CreditAttribution: EversonDaSilva commentedThanks, jimmyko. That really helped improve performance. And I also improved my commit comments. Thanks for your feedback.
Comment #30
EversonDaSilva CreditAttribution: EversonDaSilva commentedComment #31
jimmyko CreditAttribution: jimmyko as a volunteer commented@EversonDaSilva
I may make you confused. I don't mean that variable_get() does affect the performance. It won't because variable_get() and variable_set() are the helper functions to read and save data from global $conf array. This module keep repeating variable_get() and variable_set() which is not really necessary. There are 2 ways to help you simplify your coding.
1. using system_settings_form() to replace your own repec_settings_form_submit().
system_settings_form() is provided by Drupal core and it provide a generic way to make form element value into variable with proper keys. Please check the example in https://www.drupal.org/node/1111260
2. using #tree in fieldset
for example, in below snippet:
You will get 3 variable keys at the end. They are
repec_provider_name
,repec_provider_homepage
andrepec_provider_institution
. You need 3 variable_get() to retrieve data.After you used #tree:
You will get a variable with key
repec_provider
which saved a associative array with keysname
,homepage
andinstitution
.---------------------------------- it is a separate line -----------------------------------
There are some other issues in your module.
Never call module_load_include() globally
Just remove the first module_load_include() in the .module file.
Global_variables() is not necessary
I has mentioned above. And please make sure every function in module has name as prefix.
Incorrect comment format
Change the comment similar to above into below format.
Comment #32
EversonDaSilva CreditAttribution: EversonDaSilva commentedComment #33
EversonDaSilva CreditAttribution: EversonDaSilva commentedHi jimmyko,
thanks for your feedback, it was really helpful. I reduced the number of get_variables using system_settings_form and #tree and also used form_load_include to re-add the included file (repec_form.inc) after ajax.
Thanks,
Everson.
Comment #34
glekli CreditAttribution: glekli commentedHi Everson,
I have done another round of review. Please see my feedback below:
- The repec_create_settings_form() function you created for hook_menu is not necessary. You can specify the form name (repec_settings_form) directly in the menu item by using drupal_get_form as the page callback. You’ll need to use the 'file' attribute to specify which file needs to be loaded.
- The variable $content_type is undefined in repect_form.inc on line 175
In addition, you should not use variables inside t(), because that prevents proper translation of the string.
- repec_repec_paper_mapping() produces an error when the argument is NULL, and it does get called with a NULL in repec_fields_association(). Perhaps update repec_repec_paper_mapping() so that it gracefully handles NULLs.
- I’m getting the following error when submitting the settings form:
- You are not supposed to set the default values in $form_state in the form callback. The following lines are unnecessary in repec_settings_form(). The default values will be populated automatically based on the #default_value attributes in the form elements.
- In repec_form_alter(), there is no need to alter your own form. You can just move everything from this hook to the form callback. Also there is no need to manually declare the repec_settings_form_submit and repec_settings_form_validate submit/validation handlers because those are the default ones.
Comment #35
EversonDaSilva CreditAttribution: EversonDaSilva commentedThanks Gergely, for your feedback.
I have made the changes, except for the manual declaration of repec_settings_form_submit and repec_settings_form_validate . I'm aware they are the default ones, but I'm using system_settings_form, which has already an implementation of the submit and validate functions to automatically set up variables. But I needed another submit function to generate the files, so I needed to manually declare them.
Thank you for your feedback.
Everson.
Comment #36
glekli CreditAttribution: glekli commentedI see your point about the form handlers. I missed that.
Great work on this module! I think promotion to a full project would be in order.
Comment #37
EversonDaSilva CreditAttribution: EversonDaSilva commentedThanks, Gergely.
Let's work to promote it to full project, then. Thank you for all your replies.
Comment #38
EversonDaSilva CreditAttribution: EversonDaSilva commentedComment #39
klausiComment #40
klausiReview of the 7.x-1.x branch (commit 4590c41):
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:
t('This module helps you create a repository for') . ' <a href="http://repec.org" target="_blank">' . t('Research Papers in Economics')
: do not concatenate translatable strings like that, use placeholders for URLs. See https://api.drupal.org/api/drupal/includes!bootstrap.inc/function/t/7.xBut otherwise looks good to me.
Thanks for your contribution, Everson!
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.
Comment #41
EversonDaSilva CreditAttribution: EversonDaSilva commentedThank you, @klausi. I'll correct these issues and update it to full project.
Thank you for your time!