This is a project application for the ORCID integration module. The module aims to provide an integration with the ORCID repository. ORCID itself is a project to allow researchers a globally unique identifier to attach to research, funding, and their employment history. (This is not the best description of ORCID, so please go to its website for more information).
This module currently provides an Entity-level integration for an ORCID Author. Using ORCID's API it creates an Entity to store the data that has been retrieved via the API. This is done as an entity, using Entity API, to facilitate integration with views and the other default integrations. It also provides a sub-module, called "ORCID API", that is designed to allow other modules to integrate against ORCID without fully requiring the Entity integration.
The project sandbox is https://drupal.org/sandbox/partyka/2268549
The git repository: git clone --branch 7.x-1.x http://git.drupal.org/sandbox/partyka/2268549.git orcid
There is another ORCID module, called "ORCID Integration" (https://drupal.org/project/orcid_integration). This provides complementary functionality to allow linking of user profiles to an ORCID ID. BTMash and myself have already met and determined that the best way forward is to merge most of "ORCID Integration" into into ORCID.
Other application reviews:
https://drupal.org/node/2174063 (Imagesize Check)
https://www.drupal.org/node/2222795 (Image Progressive)
htps://www.drupal.org/node/2287461 (Link Icon)
Comments
Comment #1
partyka commentedComment #2
partyka commentedChanging Project from ORCID to "Drupal.org Project applications (1025112)"
Comment #3
partyka commentedChanging title from ORCID Integration to ORCID to avoid confusion between the two projects.
Comment #4
btmash commentedI'm commenting in on this issue as well to confirm @partyka and I talked and figured out a game plan for an ideal path. I reviewed the original code that @partyka wrote and being it was the direction I wanted my api code to head towards, I took on the not-as-good namespace for my module.
This module will consist of 2 parts: a core api that other modules can use to push or pull information from ORCID. And the secondary will be the full entity integration (and also likely the user field integration that I did in the orcid_integration module that @partyka linked to). While the orcid_integration module is published, it will be slowly stripped of its set of functionality (so the 1.x branch will expand slightly and we will later create and publish a 2.x branch which utilizes the core api to bring functionality that might not belong in the core suite. Once this occurs, the orcid_integration description will be updated to be clearer about how the module integrates with @partyka's orcid module.
We have both been cleaning up the module together via PAReview and while we will continue cleaning, the module is in a very good state. I'm marking it as RTBC because my involvement has mostly been w/ PAReview. The core idea and structure is very well done.
Comment #5
heddnComment #6
heddn--------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------------
12 | ERROR | Missing short description in doc comment
16 | ERROR | Public method name "OrcidAuthorViewsController::views_data" is
| | not in lowerCamel format, it must not contain underscores
--------------------------------------------------------------------------------
FILE: /var/www/drupal-7-pareview/pareview_temp/includes/orcid.admin.inc
--------------------------------------------------------------------------------
FOUND 1 ERROR AND 4 WARNINGS AFFECTING 5 LINES
--------------------------------------------------------------------------------
14 | ERROR | Public method name "OrcidUIController::hook_menu" is not in
| | lowerCamel format, it must not contain underscores
54 | WARNING | Line exceeds 80 characters; contains 83 characters
55 | WARNING | Line exceeds 80 characters; contains 82 characters
87 | WARNING | Line exceeds 80 characters; contains 151 characters
88 | WARNING | Line exceeds 80 characters; contains 247 characters
--------------------------------------------------------------------------------
FILE: /var/www/drupal-7-pareview/pareview_temp/orcid_author.tpl.php
--------------------------------------------------------------------------------
FOUND 9 ERRORS AFFECTING 8 LINES
--------------------------------------------------------------------------------
1 | ERROR | Missing file doc comment
3 | ERROR | Variable "OrcidAuthor" is camel caps format. do not use mixed case
| | (camelCase), use lower case and _
4 | ERROR | Variable "OrcidAuthor" is camel caps format. do not use mixed case
| | (camelCase), use lower case and _
5 | ERROR | Variable "OrcidAuthor" is camel caps format. do not use mixed case
| | (camelCase), use lower case and _
6 | ERROR | Variable "OrcidAuthor" is camel caps format. do not use mixed case
| | (camelCase), use lower case and _
7 | ERROR | Variable "OrcidAuthor" is camel caps format. do not use mixed case
| | (camelCase), use lower case and _
7 | ERROR | Variable "OrcidAuthor" is camel caps format. do not use mixed case
| | (camelCase), use lower case and _
8 | ERROR | Variable "OrcidAuthor" is camel caps format. do not use mixed case
| | (camelCase), use lower case and _
9 | ERROR | Files must end in a single new line character
--------------------------------------------------------------------------------
FILE: /var/www/drupal-7-pareview/pareview_temp/orcid.views_default.inc.php
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 2 LINES
--------------------------------------------------------------------------------
19 | WARNING | Variable $view is undefined.
20 | WARNING | Variable $view is undefined.
20 | WARNING | Variable $view is undefined.
--------------------------------------------------------------------------------
FILE: /var/www/drupal-7-pareview/pareview_temp/orcid.install
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------
29 | WARNING | Line exceeds 80 characters; contains 85 characters
--------------------------------------------------------------------------------
FILE: .../drupal-7-pareview/pareview_temp/orcid_api/includes/orcid_connector.inc
--------------------------------------------------------------------------------
FOUND 1 ERROR AND 2 WARNINGS AFFECTING 2 LINES
--------------------------------------------------------------------------------
16 | WARNING | Class name must be prefixed with the project name "OrcidApi"
54 | WARNING | Variable $publicWww is undefined.
54 | ERROR | Variable "publicWww" is camel caps format. do not use mixed
| | case (camelCase), use lower case and _
--------------------------------------------------------------------------------
FILE: .../drupal-7-pareview/pareview_temp/orcid_api/includes/orcid_utilities.inc
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
--------------------------------------------------------------------------------
9 | WARNING | Class name must be prefixed with the project name "OrcidApi"
15 | WARNING | Line exceeds 80 characters; contains 93 characters
--------------------------------------------------------------------------------
Code review here using this format:
(*) I don't think that t() is needed for title and description.
(*) Hidden dependency on curl. See https://drupal.org/project/curl for an example of a hook_requirements.
Don't checkplain on data storage.
orcid_api.moduleThere should be some type of @file doc comment.
authors.viewAll php files should end in .inc, or .php.
The starred items (*) are fairly big issues and warrant going back to Needs Review. The rest of the comments in the code walkthrough are recommendations.
Comment #7
partyka commentedThe starred items have been taken care, as well authors.view being renamed to authors.view.inc. The check_plain on entity_create referenced above is done that way to help ensure that the ORCID ID is correct as that is what links to the ORCID ID. The code standards have been substantially cleaned up as well.
Comment #8
heddnContinued manual review.
module_load_include could be used here. or at least require_once.
Don't catch exception, that's too broad. Catch the appropriate exception instead.
This uses inconsistent quotes. Probably should use single quotes. And I'm fairly sure this should also use t(), therefore marking as needs work. Applies to the rest of the function.
The starred item (*) is a fairly big issue and warrant going back to Needs Review. The rest of the comments in the code walkthrough are recommendations.
Comment #9
partyka commentedComment #10
partyka commentedComment #11
partyka commentedComment #12
partyka commentedI've made a lot of the changes suggested above and added an entity reference formatter for entity references to this module.
Setting back to Needs Review.
Comment #13
PA robot commentedThere are some errors reported by automated review tools, did you already check them? See http://pareview.sh/pareview/httpgitdrupalorgsandboxpartyka2268549git
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #14
partyka commentedHi,
I currently believe that the issues reported are false positives.
Comment #15
klausiReview of the 7.x-1.x branch (commit de5c0b3):
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:
Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects. Make sure to thoroughly test your module before you set this back to "needs review". A project should be ready for prime time when we do this review.
Comment #16
partyka commentedRemoved comment, see below (pasted in error)
Comment #17
partyka commentedHi, Thanks for your feedback. I apologize for the numerous issues, I realize it reflects poorly on my part -- I was just anxious to get this submitted by DrupalCon Austin that I acted prematurely.
That said, here is everything that I have a comment about or have addressed. While I would appreciate feedback on the first list as a whole, the first two items are issues I am unclear on.
Which overview page are you talking about?
I have had no such problem - can you provide more of a description? Did you try to delete an author imported with an invalid ID? However, I tried that and still could not duplicate.
Changed.
I ended up doing the opposite, is there any reason not to?
This is due to my understanding that the ORCID ID (with it's "-" characters) is a poor choice to use as the actual entity ID as the custom is to use integers for the entity ID. At first, I thought it would have been better to take the ORCID ID as a parameter and then translate it using that first SQL query. I am now second-guessing that. The $id parameter should really be the entity ID, and then it's the responsibility of the caller to perform the translation. Is that the best way to go here?
I believe that I did this due to a misunderstanding of how to use Entity API. I'll look into if this is correct or if I need to change.
Corrected
Corrected, changed Get->Set
Fixed.
Author ID is set by ORCID -- therefore, it doesn't make sense to update it for a particular entity. The UPDATE is just to refresh the cache from ORCID. I sill add some wording to make this clearer. I think I need to make
this be a "refresh" command, rather than "update". Do you have a suggestion?
I wasn't convinced that this entity needs to support bundles, that's why I did not create a callback. Manage Fields was the functionality that I wished to add. This goes back to what I said about Entity API and I'll investigate further.
The following are items that I have no comment about, I'm just organizing it here for my own convenience:
TBD
TBD
TBD
TBD
I should have flagged this as a TODO --- Upon an update from the ORCID server I need to clear any caches related to this particular entity.
TBD
TBD
Thanks, I did not know about that issue. Will take care of it.
Comment #18
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 #19
btmash commented@partyka had updated the module. Setting to needs review.
Comment #20
klausiThe check_plain() usage on saving is definitely a blocker, you need to know when to use check_plain() and when not. Let us know once this is ready for review again!
Comment #21
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 #22
shenzhuxi commentedI'm working on ORCID module for Drupal 8 which allows users sign in/up with OAuth2 API now https://github.com/shenzhuxi/orcid.
Is it possible to make ORCID a full project? I would like to be the maintainer and move the codes from GitHub back to here.
Comment #23
klausiThis project application is closed. Since the original applicant did not respond you can fork the project and submit your own project application.