Mica Migration

Mica Migration module is helper to export Studies/networks/datasets from Obiba’s Mica 9.x Drupal distribution to Mica2 1.x server, the new version of the Mica studies catalog. It generates zip files of packaged .json files.

REQUIREMENTS

Mica Migration depends on :

  1. Enabling mica_export Mica9.x modules
  2. Download obiba-mica-protos
    in the sites/all/libraries, if you have access to drush command you can get
    it by typing : drush get-protobuf in your current mica installation

This project is sponsored by OBiBa [http://www.obiba.org]. OBiBa is a collaborative international project whose mission is to build high-quality open source software for biobanks.

Module Name : Mica Migration.
SandBox project page : Mica Migration
Git repository : branch 7.x-1.x
Pareview review :http://pareview.sh/pareview/httpgitdrupalorgsandboxsamirmtl2549691git

Setting Repository:

git clone --branch 7.x-1.x http://git.drupal.org/sandbox/SamirMtl/2549691.git mica_migration

Manual reviews of other projects

https://www.drupal.org/node/2551669#comment-10223005
https://www.drupal.org/node/2545938#comment-10229687
https://www.drupal.org/node/2507385#comment-10230249
https://www.drupal.org/node/2552765#comment-10230965
https://www.drupal.org/node/2551895#comment-10235031
https://www.drupal.org/node/2552785#comment-10238651

Comments

SamirMtl created an issue. See original summary.

SamirMtl’s picture

Issue summary: View changes
PA robot’s picture

Issue summary: View changes
Status: Needs review » Needs work

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

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.

SamirMtl’s picture

Status: Needs work » Needs review

The code now pass http://pareview.sh/ test
Thank you for review

SamirMtl’s picture

Issue summary: View changes
Issue tags: +PAreview: review bonus
th_tushar’s picture

Issue tags: -PAreview: review bonus

Hi SamirMtl,
Removing the pareview bonus tag. Please refer Requirement to add Pareview Bonus to issue for adding the pareview bonus tag.

Haven't gone through the code, will have a look once I get time.

Thanks for your contribution!!

SamirMtl’s picture

Hi th_tushar
Sorry for this inconvenience, I think that i've misunderstood some rules of the Review bonus,
Thank you

SamirMtl’s picture

Issue summary: View changes
SamirMtl’s picture

Issue summary: View changes
SamirMtl’s picture

Issue summary: View changes
SamirMtl’s picture

Issue summary: View changes
SamirMtl’s picture

Issue summary: View changes
SamirMtl’s picture

Issue summary: View changes
SamirMtl’s picture

Issue summary: View changes
SamirMtl’s picture

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

Assigned: Unassigned » tarekdj
SamirMtl’s picture

Issue summary: View changes
cthiebault’s picture

Status: Needs review » Reviewed & tested by the community
tarekdj’s picture

Assigned: tarekdj » Unassigned
klausi’s picture

Status: Reviewed & tested by the community » Fixed

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

  • Coder Sniffer has found some issues with your code (please check the Drupal coding standards).
    FILE: /home/klausi/pareview_temp/includes/mica_migration_study.inc
    ---------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ---------------------------------------------------------------------------
     21 | ERROR | [x] Inline comments must end in full-stops, exclamation
        |       |     marks, colons, or question marks
    ---------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ---------------------------------------------------------------------------
    
  • No automated test cases were found, did you consider writing Simpletests or PHPUnit tests? This is not a requirement but encouraged for professional software development.

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. mica_migration.module: why do you globally include all include files with module_load_include() on every single page request? You should only include the files when you actually need them, or do they contain hook implementations? Please add a comment.
  2. mica_migration_menu(): $node is unused and should be removed.
  3. mica_migration_menu(): if the access callback only checks for a user premission then you can use the default user_access as access callabck and the permission name as access arguments. See https://api.drupal.org/api/drupal/modules!system!system.api.php/function...
  4. 'migration studies' is a strange permission name, did you mean "export migration studies" or "migrate studies to mica"?
  5. mica_migration_all_studies_export_json(): if the page callback is just a form then you can use drupal_get_form as page callback and the form ID as argument. See also the hook_menu() docs.
  6. "'#value' => 'Submit',": all user facing text must run through t() for translation.
  7. mica_migration_create_zip_file(): $user->name should be sanitized before using in a file name, just allowing letters, numbers and underscores.

But that are not critical application blockers, so ...

Thanks for your contribution, SamirMtl!

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.

SamirMtl’s picture

Thanks @klausi for your valuable time to review my code so i have fixed your issues, and i will take care to have best practice.

Thanks to : @cthiebault,, @th_tushar, and @tarekdj.
Thank you very much for all the suggestions and all the time spent by reviewers!!!

Fix of some reviews issues #20 :
- The coder Sniffer issues: 21 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, colons, or question marks : -Fixed-

1 - mica_migration.module: why do you globally include all include files with module_load_include() on every single page request? : In the Export process, there are a batch process that call operations on each of these included files: -Done-
2 - mica_migration_menu(): $node is unused and should be removed. : -Done-
3 - mica_migration_menu():user permission access arguments : -Done-
4 - 'migration studies' is a strange permission name : I agree : "migrate studies to mica" : -Done-
5 - mica_migration_all_studies_export_json(): CallBack removed ans i used drupal_get_form() and the form as arguments : - Done-
6 - "'#value' => 'Submit',": all user facing text must run through t() for translation. : -Done-
7 - mica_migration_create_zip_file(): $user->name should be sanitized before using in a file name : -Done-

tombisho’s picture

I got Mica2 server and drupal client up and running a few weeks ago. Now I have some spare time, I would like to help testing the migration tools. This will help me understand what else we will need to do to migrate.

I have tried installing mica_protobuf_lib, but I need some more details on what I need to do to try out the migration. Is it possible to add some brief details?

Thanks!

SamirMtl’s picture

Hi tombisho
Please open an issue here, and add more details how you have installed the Migration Mica module and what's the steps you take to export your studies to Mica2 using this module,
Be sure we are glade to help you in your process of Migration
Thx ;)

SamirMtl’s picture

Issue summary: View changes
tombisho’s picture

Hi Samir,

I see that you just changed the module that I should download, so I will try again tomorrow and see if I have success. When something comes up I will raise an issue as you suggest

Thanks

Tom

Status: Fixed » Closed (fixed)

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