Learn

  1. Clean Code, YouTube
  2. PHP: The Right Way, link
  3. Udemy courses
  4. Design Pattern, Doc, Pattern Libraries
  5. Postman for testing API, YouTube
  6. Essential Scrum, Chapter [5, 7, 17, 18, 19]
  7. Terraform
  8. Ansible
  9. DevOps Crash Course, youtube

Todo - Project repo, doc

  1. Study actionMint in /protected/controller/AdminDatasetController.php
 /**
  *	post metadata, mint a new DOI
  *
  */
 public function actionMint()
 {
     $result['status'] = false;
     $status_array = array('Submitted', 'UserStartedIncomplete', 'Curation');

     $mds_metadata_url="https://mds.datacite.org/metadata";
     $mds_doi_url="https://mds.datacite.org/doi";

     $mds_username = Yii::app()->params['mds_username'];
     $mds_password = Yii::app()->params['mds_password'];
     $mds_prefix = Yii::app()->params['mds_prefix'];

     if (isset($_POST['doi'])) {
         $doi = $_POST['doi'];
         if (stristr($doi, "/")) {
             $temp = explode("/", $doi);
             $doi = $temp[1];
         }

         $doi = trim($doi);
         $dataset = Dataset::model()->find("identifier=?", array($doi));

         if ($dataset && ! in_array($dataset->upload_status, $status_array)) {
             $xml_data = $dataset->toXML();
             $ch= curl_init();
             curl_setopt($ch, CURLOPT_URL, $mds_metadata_url);
             curl_setopt($ch, CURLOPT_POST, 1);
             curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
             curl_setopt($ch, CURLOPT_POSTFIELDS, "$xml_data");
             curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type:application/xml;charset=UTF-8'));
             curl_setopt($ch, CURLOPT_USERPWD, $mds_username . ":" . $mds_password);
             $curl_response = curl_exec($ch);
             $result['md_curl_response'] = $curl_response;
             $info1 = curl_getinfo($ch);
             $result['md_curl_status'] = $info1['http_code'];
             curl_close($ch) ;
         }

         if ($dataset && $result['md_curl_status'] == 201) {
             $doi_data = "doi=".$mds_prefix."/".$doi."\n"."url=http://gigadb.org/dataset/".$dataset->identifier ;
             $result['doi_data']  = $doi_data;
             $ch2= curl_init();
             curl_setopt($ch2, CURLOPT_URL, $mds_doi_url);
             curl_setopt($ch2, CURLOPT_POST, 1);
             curl_setopt($ch2, CURLOPT_RETURNTRANSFER, 1);
             curl_setopt($ch2, CURLOPT_POSTFIELDS, $doi_data);
             curl_setopt($ch2, CURLOPT_HTTPHEADER, array('Content-Type:application/xml;charset=UTF-8'));
             curl_setopt($ch2, CURLOPT_USERPWD, $mds_username . ":" . $mds_password);
             $curl_response = curl_exec($ch2);
             $result['doi_curl_response'] = $curl_response;
             $info2 = curl_getinfo($ch2);
             $result['doi_curl_status'] = $info2['http_code'];
             curl_close($ch2) ;
         }

         if (isset($result['doi_curl_status']) && $result['doi_curl_status'] == 201) {
             $result['status'] = true;
         }
     }

     echo json_encode($result);
     Yii::app()->end();
 }

Done - Project

Todo - Github

  1. Follow up Add-citation-box-#521
    • Update <a></a> elements to <ul><li></li></ul> structure
    • Tried to use bootstrap dropdown button
  2. Review fuw-cicd-#546, review doc at here

Done - Github

AOB

  1. Follow up server issue
    • 192.168.208.43, 192.168.208.44, 192.168.208.74 have been returned back to BGI IT team
    • Still owning 192.168.208.73 and it is running, because it is hosting www.gigadb.org
  2. Follow up NAS issue
    • 杨杰威(Jed Yang) is helping us to gather compliance and regulation information from 曾文君(Ken Zeng), and his supervisor, Alex, would like to know why we would want to have a NAS
    • 郑康和(Kanghe Zheng), the one who suggests us to place the NAS in BGI Tai Po and later the 3rd party Data centre in HK, wants to meet with us together with 周飞羽(Feiyu Zhou) and 田晶(Jing Tian) on 14/5 at 1400

Reference

Build Status