Sejmometr api module integrates api published by sejmometr.pl.
It works as cron job and creates related nodes:
- member of parliament information
- member of parliament financial statements
- member of parliament financial benefits reports
- parliament sessions
- day of parliament session
- session transcripts
- items of agenda
- parliament considerations
- parliament speeches
- documents created by parliament of Poland
You also have ability to limit how many nodes are created in one cron run.
Project page: http://drupal.org/sandbox/hmach/1429092
Git: git.drupal.org:sandbox/hmach/1429092.git
Version: Drupal 6
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | review.txt | 29.85 KB | alex dicianu |
Comments
Comment #1
eugene.ilyin commentedHello! How I can review your module? Please add link to repository of your project.
Comment #2
hmach commentedHere it goes!
git.drupal.org:sandbox/hmach/1429092.git
Comment #3
hmach commentedand project page:
http://drupal.org/sandbox/hmach/1429092
Comment #4
klausiPlease also add the sandbox link to the issue summary.
The response time for a review is now approaching 4 weeks. Get a review bonus and we will come back to your application sooner.
Comment #5
alex dicianu commentedHi
There are still files other than README.txt in the master branch, make sure to remove them. See also step 5 in http://drupal.org/node/1127732
Review of the 6.x-1.x branch:
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. Get a review bonus and we will come back to your application sooner.
Source: http://ventral.org/pareview - PAReview.sh online service
See report attached.
You should also specify if the module is for drupal 7 or 6.
Looking on the project page, I think you should add more details about your module, maybe a screenshot if possible. Here is an example: http://drupal.org/project/pathauto.
Looking into the code, I saw that you don't have a @doc block for your functions. You should add one for each function, here is the proper format http://drupal.org/node/1354.
.install file
Here you should avoid using the t() function. Use this one instead http://api.drupal.org/api/drupal/includes!install.inc/function/st/7. Here is the reason: Used during the install process, when database, theme, and localization system is possibly not yet available.
Line 309:
$filename = drupal_get_path('module', 'sejmometr_api') . "/includes/cck/parliament_club.inc";A better way would be to use this function module_load_include().
.module file
Line 468: Instead of file_get_contents() you should use drupal_http_request(). It's a more proper way to get the url.
Comment #6
hmach commentedAll required and suggested changes are made.
Exept:
Do You want it to be placed on projects page? Then what if I'll create module for 7.x version?
Isn't branch name and information in .info file enough?
Comment #7
alex dicianu commentedHi,
What I meant was, from this page http://drupal.org/node/1011698 point 4-5. Offcourse I saw the branch name and .info file, but it's just easyer for someone who want's to checkout your module to know if he/she should do it in a drupal 6 or 7 installation.
PS: changed the status to needs review to get a review ;)
Comment #7.0
alex dicianu commentedProject page link and repository info
Comment #8
hmach commentedOk, now got it :)
Comment #8.0
hmach commentedVersion info
Comment #9
hmach commentedAutomatic review of code reports an error:
In documentation of watchdog() function there is no information about not using t(). What's more, there is info how it should be used.
In coding standards I could not find why it is treated as error?
Any help?
Comment #10
prashantgoel commentedReview of the 6.x-1.x branch:
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. Get a review bonus and we will come back to your application sooner.
Source: http://ventral.org/pareview - PAReview.sh online service
Comment #11
hmach commentedFixed.
Comment #12
SebCorbin commentedHere is my manual review:
Personnally I don't get the point to create a sejmometr_api_conf table when you have the variables table.
All your submodules have no code, all the .inc files in your submodules are missing <?php tag at the beginning.
Here's what PHPStorm told me when opening you project:
Undefined constant WATCHDOG_WARN in file sejmometr_api.module
Undefined variable 'user' in file sejmometr_api.module:1123
Undefined variable 'session_day' in file sejmometr_api.module:1493
Variable 'mp' might have not been defined in file sejmometr_api.module:2264
Undefined variable 'si' in file sejmometr_api.module:2664
Undefined variable 's_info' in file sejmometr_api.module:2667
Unused local variable $doc_url in file sejmometr_api.module
Unused local variable $user in file sejmometr_api.module
Unused local variable $user in file sejmometr_api.module
Unused local variable $url in file sejmometr_api.module
Unused local variable $s in file sejmometr_api.module
Comment #13
hmach commentedsejmometr_api_conf table (also) keeps ids of last processed documents. They are updated with every created node. Thus it is not good idea to keep that kind of data in variables table.
Yes, keeping just config variables can be done in variables table, but as far as they are used in conjunction with last ids this limits db queries to 1 query instead of X queries for each variable plus queries for last ids.
Submodules have no code, because they are helper modules responsible for creating content types. Creating new content types can be done in main module but - creating new content type for CCK is time consuming operation. Some hosting companies restrict processor time and/or have short time for script to be executed. This can lead to timeout when instaling module. Then You can have module installed, but required content types may not be present.
All .inc files in submodules are missing <?php tag at beginning because they are import files for CCK.
Code variable issues are fixed.
Comment #14
misc commentedI do not really get the explanation above - why is there import files for cck, and why are they missing <?php tags? And why have the submodles no code in them? These seem to be so specific code that it can not be a generic module, are am I missing something here?
Comment #15
klausiClosing due to lack of activity. Feel free to reopen if you are still working on this application.
Comment #15.0
klausiUpdate - info about new nodes