First Indico Workshop Hands-on: DB exploration José Benito González López 27-29 May 2013 CERN.

Slides:



Advertisements
Similar presentations
Behzad Samin 0 An End-to-End Overview of a RESTful Web Service.
Advertisements

Supporting Persistent Objects In Python Jeremy Hylton
(Very) Simple Group Calendar Calendar which can display a whole month, or a single day, with events Can create new appointments with rendezvous information.
Physicist Interfaces Project an overview Physicist Interfaces Project an overview Jakub T. Moscicki CERN June 2003.
Hands-on: install Mobile
Hands-on: install & config
Using Drupal to connect Social Investors with Social Entrepreneurs.
My First Building Block Presented By Tracy Engwirda 28 September, 2005.
Python Lab Proteomics Informatics, Spring 2014 Week 1 28 th Jan, 2014 Himanshu Grover
HEPiX Spring Meeting, Edinburgh 26th May 2004 Integrated Digital Conferencing Mick Draper CERN (on behalf of CDS/InDiCo team)
Using Cabal and the Hackage Package Database. Hackage Hackage is a database of Haskell packages (or modules) written by others and available for public.
Peoplesoft Fundamentals David Lewis 10/18/02 (adapted from Psoft Training Materials)
Conference Calendar CS 337 Project Supervised by Professor Russell Abbott. Alexandre Lomovtsev, Haritha Sankavaram, Lewis Chen, Rasha Mohamed.
Title Center for Coastal and Ocean Mapping NOAA/UNH Joint Hydrographic Center Windows Python Tutorial Kurt Schwehr Jan 2007.
Creating a deployment package Importing a package with IIS Manager Exporting from IIS Manager.
SMI suite 2011 license model SMI suite – base license $35k –Includes: 5 named users Interactions and Incident modules Start-up reports First year maintenance.
Get closer to the most advanced CMS Mihail Semedzhiev Joomla!
PHP-Fusion. Introduction PHP-Fusion is a lightweight open source content management system (CMS) written in PHP. PHP-Fusion utilizes a MySQL database.
First Indico Workshop Basic Administration Guide Alejandro Avilés May 2013 CERN.
Search Search Drupal with Apache Solr with CERN Web Communications Group – Copyright 2013.
© 2009 IBM Corporation 1 RTC ClearQuest Importer and Synchronizer Lorelei Ngooi – RTC ClearQuest Synchronizer Lead.
Hands-on session 2 Monitoring Jose Gonzalez Universidad Politecnica Madrid Attilio Broglio Create-Net
First Indico Workshop Database Technology Pedro Ferreira May 2013 CERN.
First Indico Workshop Indico Project Status José Benito González López May 2013 CERN.
W3af S. Qi,X. Ma,Y. Zhang,B Zhao,Y Zhu EC521 Fall 2014.
Python MySQL Database Access
InDiCo 20 April 2004 EPFL, Lausanne Integrated Digital Conferencing JY Le Meur CERN
Intro to Grouper There’s nothing fishy about Identity Management with Grouper.
2005 JACoW Team Meeting Thomas Baron/Jose Benito Gonzalez – CERN – IT Managing Events with Indico.
First Indico Workshop Abstracts & Timetable José Benito González López May 2013 CERN.
First Indico Workshop INDICO SEARCH Adrian Mönnich May 2013 CERN.
DCL/1 Data Control Language Objectives –To learn about the security mechanisms implemented in an RDBMS and how to use them Contents –Identifying Users.
Guide to Linux Installation and Administration1 Chapter 4 Running a Linux System.
CHEP 2009 José Benito González López Indico Central Enhancements, ergonomics and collaboration tools integration.
Entities in Drupal 7 & the Entity API #sfdug March 11, 2013 JD Leonard ModernBizConsulting.com.
Matt Arena, Fermilab.  Overview of SPMS  SPMS History & Statistics  Fermilab  Users, Roles & Privileges (Fine-grained Access)  System Parameters.
The iPlant Collaborative Community Cyberinfrastructure for Life Science Tools and Services Workshop Atmosphere.
INFSO-RI Module 05 The ETICS Plugins and Compliance Analysis Alberto Di Meglio.
David Adams ATLAS DIAL/ADA JDL and catalogs David Adams BNL December 4, 2003 ATLAS software workshop Production session CERN.
Alexander Krieg (DESY-IT) - HEPiX Spring May
Extending & Customizing XNAT with Modules Rick Herrick
Python module distribution. Modules in Python Modules are everywhere.
CERN Accelerating science Indico and Invenio José Benito González López
Continuous Integration With Fabric Varun Deft Infotech Pvt. Ltd.
First Indico Workshop Indico Hub Nicola Tarocco May 2013 CERN.
The road to Indico 2.0 On the way to a clean and extensible codebase.
Digital Library Services team Indico Workshop - CERN – Invenio: a possible search system for Indico.
Web Scraping with Python and Selenium. What is Web Scraping?  Software technique for extracting info from websites Get information programmatically that.
Telemarketing Module. Phase 1 Complete Telemarketers need the ability to process a variety of transactions in the Engaging Networks dashboard: Donations.
Title Category #1 Category #2 Category #3Category #
Advancing CernVM-FS and its Development Infrastructure José Molina Colmenero CERN EP-SFT.
Slide Set #24: Database security SY306 Web and Databases for Cyber Operations.
Transforming Science Through Data-driven Discovery Tools and Services Workshop Atmosphere Joslynn Lee – Data Science Educator Cold Spring Harbor Laboratory,
ILC DMS – 8 th November 2005 Thomas Baron – CERN – IT Managing Events with Indico.
MySQL Introduction. Outline MySQL Introduction & Installation MySQL Command-Line Tool MySQL Workbench Introduction MySQL with Python Code Example.
multimedia archiving on the Web
CONTENT MANAGEMENT SYSTEM CSIR-NISCAIR, New Delhi
Global Search: An Introduction and Administrator Perspective
Mentored by Jose Benito and Pedro Ferreira
Indico: Event Management
CRIC ・ Authentication & Authorization
How to create an Indico Conference
SERVICENOW ADMIN & ADVANCED ONLINE TRAINING
Global Drupal Training Day
Google App Engine Danail Alexiev
Enterprise Java Beans.
Python Modules.
Tools and Explanations for Mac Beginners
Managing and monitoring SQL Server on Linux from the command line
Test Manager Plugin for Trac Part 1/3 Roberto Longobardi
Presentation transcript:

First Indico Workshop Hands-on: DB exploration José Benito González López May 2013 CERN

zodb DB written in Python No UI to access data… …but there is Python command-line!

zodb Tree-like structure rootcategories conferenc es … contributio ns adminlistavatars …groups… MaKaCInf o …plugins…modules…

Holders Core: Index that helps us to fetch the information AvatarHolder index of Indico users CategoryManager index of Indico categories ConferenceHolder index of Indico conferences IndexHolder index of all Indico indexes …

Indico_shell 1. Connects to Indico DB 2. Loads many classes automatically ConferenceHolder CategoryManager AvatarHolder GroupHolder PluginsHolder Catalog IndexesHolder minfo : MaKaCInfo instance Command provided by Indico Custom python shell; using Indico code to access data

Indico_shell Note: activate virtualenv first (indico-prod) $ indico_shell /home/myuser/indico-prod/data/etc/indico.conf + 'MaKaC' : MaKaC base package + 'Conference' + 'Category' + 'ConferenceHolder' + 'CategoryManager' + 'AvatarHolder' + 'GroupHolder' + 'HelperMaKaCInfo' + 'PluginsHolder' + 'Catalog' + 'IndexesHolder' + 'minfo' : MaKaCInfo instance indico 1.0 In [1]:

ipython $ pip install ipython $ pip install pyreadline $ sudo easy_install -f readline Autocomplete:

Let’s explore

avatars Indico users (indico-prod) $ indico_shell In [1]: ah = AvatarHolder() In [2]: avatar = ah.getById('0’) In [3]: avatar.getFullName() Out[3]: 'GONZALEZ, Jose Benito’ In [8]: avatar.get () Out[8]: In [9]: av_list = In [10]: len(av_list) Out[10]: 1 In [11]: av_list Out[11]: [ ] In [12]: avatar2 = av_list[0] In [13]: avatar2.getFullName() Out[13]: 'GONZALEZ, Jose Benito'

administrators (indico-prod) $ indico_shell In [14]: admin_list = minfo.getAdminList() In [15]: admin_list Out[15]: In [18]: dir(admin_list) [..., 'getList', 'grant', 'isAdmin', 'revoke'] In [19]: admin_list.isAdmin(avatar) Out[19]: True In [21]: admins = admin_list.getList() In [22]: admins Out[22]: [ ] In [23]: admin_list.revoke(avatar) In [23]: admin_list.grant(avatar)

categories (indico-prod) $ indico_shell In [23]: cm = CategoryManager() In [25]: root_categ = cm.getById('0’) In [26]: root_categ.getTitle() Out[26]: 'Home’ In [27]: category1 = cm.getById('1’) In [28]: category1.getTitle() Out[28]: '1st categ’ In [29]: category1.getConferenceList() Out[29]: [ ] In [30]: category1.getConferenceList()[0].getTitle() Out[30]: '1st event’

conferences (indico-prod) $ indico_shell In [32]: ch = ConferenceHolder() In [33]: event = ch.getById('0') In [34]: event.getTitle() Out[34]: '1st event' In [35]: event.getCreator().getFullName() Out[35]: 'GONZALEZ, Jose’ In [38]: event.getContributionList() Out[38]: [, ] In [39]: event.getContributionList()[0].getTitle() Out[39]: 'contribution 2'

contributions (indico-prod) $ indico_shell In [33]: event = ch.getById('0') # we must get the event In [38]: contrib_list = event.getContributionList() In [43]: contrib_list[0] == event.getContributionById(‘0’) Out[43]: True In [45]: contrib1 = event.getContributionById('1') In [46]: contrib1.getTitle() Out[46]: 'contribution 2’ In [47]: contrib1.getSpeakerList()

dbi dbi is preloaded in indico_shell. It’s the DB instance. (indico-prod) $ indico_shell In [48]: dbi Out[48]: In [49]: root = dbi.getDBConnection().root() In [50]: root.keys() In [51]: print root.keys() ['conferences’, 'MaKaCInfo', 'rootCategory', 'modules', 'avatars', 'indexes', 'catalog', 'AnnoucementMgr', 'adminlist', 'groups', 'plugins',..., 'categories'] In [51]: dbi.sync() # gets latest updates from DB In [51]: dbi.commit() # stores updates in DB

Changing data (indico-prod) $ indico_shell In [33]: event = ch.getById('0’) In [38]: contrib_list = event.getContributionList() In [45]: contrib1 = event.getContributionById('1') In [46]: contrib1.getTitle() Out[46]: 'contribution 2’ In [47]: contrib1.setTitle(‘new title') In [46]: contrib1.getTitle() Out[46]: 'contribution 2’ In [46]: dbi.commit() # commit makes the change persistent

Jose Benito Gonzalez Questions?