Monday, June 30, 2008

Continue from DB metadata and data provider

I send an email to my mentor addressing my progress in the last week. In the parser I need to overcome reduce/reduce conflicts anyhow. So I hope to take a free/idle time to complete it according to the grammar.

I looked into adding complex relation with the objects and looked into interface documentations to get the functionality of methods. In the evening I was unable to access the internet because there was a power failure, got stuck with tasks.

Saturday, June 28, 2008

Dive in to OCQL parser

I had a deep dive in to the OCQL(refer previous threads) parser. It is interesting to see how the program shift and reduce example queries according to the rules defined, by using debugging. Execution flow can be easily recognize form it.
I had to modify and add missing rules in the implementation. I spent whole the day for this part though it looks very simple took fairly large time. Since the parser implementation is not done by me, I initially I studied how the system works for a single running test. It helped me to understand the reasons for the failing tests. I really enjoyed with today's work and commit the work in the repository[1]

[1] svn://svn.zope.org/repos/main/Sandbox/adamg/ocql/branches/dbprovider

Friday, June 27, 2008

Week progress report from 21st June to 27th June

It was a bit hard week and I learn quite a lot. I was able to complete the test setup for the sample data early in this week. It was basically target on providing class/object decelerations to the engine. Then I tried to move it to work with the live Zope, but due to lack of understanding I was unable to do that. Then I add a relation to the sample because DB data and metadata provider need to provide relationship information to the engine as well. Referred to the Readme.txt given in the zc.relation. Will be able to continue it during the next week with guidance.

Mean while I was able to complete some of the failing tests in the parser. Those were fairly simple mistakes where remote debugging and print statements helped in identifying them. All the implementation during the week is committed in the repository.[1]

[1] svn://svn.zope.org/repos/main/Sandbox/adamg/ocql/branches/dbprovider/




Monday, June 23, 2008

Parser, DB data and metadata provider

As the schedule I continue on working in both of the main tasks.I got understood some of the mistakes I have done in the implementation. Correct them accordingly by looking at the errors given. It takes some time to grab the problem but saves time in future.
Regarding the parser I studied how it implemented. Using remote debugging I went through the code to understand the execution flow. Experience I gained in parser writing help me in understanding the code. I was able to catch up the basics under the parser writing even though my initial work is not so good.
I asked some common problems in IRC channel, where I got to know that the svn server has moved. This leads me to get the message "reverse mapping checking getaddrinfo for 203-155.baymountain.com [74.84.203.155] failed - POSSIBLE BREAK-IN ATTEMPT!" when I try svn up.

Friday, June 20, 2008

Week progress report from 14th June to 20th June

It was a interesting week at the end, though I am doing a critical part of the project. Here is what I have done within the last last week. According to the new time schedule I focus on the DB data and metadata provider.
During early this week I was able to set up the system for remote debugging, which is quite simple but waste some time for unknown reasons, may be with my machine.
Regarding this week task I started on implementing the Metadata class which gets all data from zope itself by querying it runtime. It uses searchInterfaceUtilities() to collect all the interfaces present in the system. For the moment it is not all complete and current work is committed in the
repository[1] . For the testing purpose I implemented a separate test where it uses a simple application in src/ocql/testing/utils.py.

For the coming week I will move on to parser modifications as we elaborated in the first week. So I will use the modified grammar rules which is making the language more Pythonic.

[1]
svn://svn.zope.org/repos/main/Sandbox/adamg/ocql/branches/dbprovider/

Wednesday, June 18, 2008

Test to simulate zope data

Today is a bit interesting day compared to the previous days. I involved in implementing a test class which simulate live Zope. Initially I started with testing for the sample data where I used them to understanding Zope.
I referred to the existing test classes and implement this test class. It was bit hard some times where I needed to go more deep in to the Zope code base. I was lucky because I am able to get the use of remote debugging functionality.

Tuesday, June 17, 2008

Remote debug with pydev

Finally, after lot of tries I was able to remote debug a Python classes.
This link[1] gave me good understanding in order to remote debug. But if you are not sure how to get the "Pydev: start the pydev server" icon in toolbars, you need to right click on the toolbar and click "Customize Perspective", select "commands" tab and tick "Pydev debug". This will add the icon in the toolbars.

And if you are getting,
"Could not initialize the browser's security component. The most likely cause is problems with files in your browser's profile directory. Please check that this directory has no read/write restrictions and your hard disk is not full or close to full. It is recommended that you exit the browser and fix the problem. If you continue to use this browser session, you might see incorrect browser behaviour when accessing security features."
You need only to create ~/.mozilla/eclipse or if you have already got such folder, delete the content of that folder.

Today I was involved in writing a test script which supose to simulate a live zope.Start writting it as simillar to other test classes.

[1] http://www.fabioz.com/pydev/manual_adv_remote_debugger.html

Monday, June 16, 2008

DB data and metadata provider

Today I started doing the new and hard part of the project DB data and metadata provider. As usual I ran in to several questions. Since the dependencies have been moved to a different folder. I was not able to run the Python scripts directly form the eclipse editor because it complains missing imports. such as

ImportError: No module named ply

Remote debugging is useful in this case but I was unable to debug the code as specified in here[1]. I was unable to set the path for the pydev.py script and brings me all the problems. So I moved in to other options where I can use options given in the test scripts. For a example in test_skeleton.py script there is a class called testSkeleton. By adding the code block we need to test into that can be used with the options, eg:

bin/test -t testSomething

Then I moved in to look up how to retrieve objects form zope in runtime. I have the references of retrieving such data form the sample application. So I have to continued again from the zope.componet.interface.



[1] http://www.fabioz.com/pydev/manual_adv_remote_debugger.html

Sunday, June 15, 2008

Week end work

In this weekend I faced in to few problems. It was basically about linking the dependencies to the source code because I moved them to a hidden folder.
And I was unable to get a svn update of the code in the repository. Somehow the folder owner ship has been modified to the root privilege. It gave me the following error.

[charith@localhost code]$ svn up
svn: Can't open file '.svn/lock': Permission denied

by using the chown command I was able to recursively change the ownership of all the ".svn" folders.

Then I read some articles in the wikipedia about metadata, publishing them, etc and looked more into catalogs and indexes.

I am using Fedora 9 and suddenly I noticed that I can’t move, minimize, maximize or close windows but I can close them by Quite/ctrl + Q. And terminal is not visible either. It was just a white patch in the desktop. I overcome that problem by disabling the desktop effects.

Friday, June 13, 2008

Week progress report from 6th May to 13th June

Week progress report from 6th May to 13th June


I complete the 1-C sub task of the first step and it is the last sub task. In this step I analyze existing solutions; SQLAlchemy and hurry query. I learned many things which are related to the OCQL project such as using indexes,etc. Here is the outcome of this step. These queries are related to the queries in the manualtest2.py[1] script. http://spreadsheets.google.com/pub?key=p4FAo3s3zEDalLCx3T7dSFQ

I again faced with few difficulties. I was unable to run the tests of OCQL, because of the failures in downloading some dependency files to the local machine. Finally by taking advices from the mentor it was able to run the tests. I set up the environment such that the downloads are placed in a different directory.

[1]
svn://svn.zope.org/repos/main/Sandbox/ocql-foliage/trunk/src/ocql/tests/manualtest2.py

Thursday, June 12, 2008

Running tests

I am able to run the tests in the OCQL today. It gave me some errors initially since some of the dependency files were not properly downloaded to the system. It was happened due to the links didn't work well. Finally I changed the repository to the home folder and able to run tests. I go through the simple execution process to understand the code.

And I confirmed the task for this week by chatting with mentor. Now it get more cleared to me. I was using default chat client in fedora called Pidgin. But it seemed that some chat messages were not delivered to the destination. I need to restart the application several times. Finally I installed the xchat client which is very simple to install and use. You only need to run the following commond to install it from super user mode.
yum install xchat

Tuesday, June 10, 2008

Compare - OCQL, SQLAlchemy and hurry.query

I study more about hurry.query and SQLAlchemy(SQLA) today. I started on writing the document which compares all the three approaches. Today I got the changed time plan from my mentor. We had to schedule it properly since we would be finding problem when he is having his holidays.
I chat with mentor and clarify the doubts I had with these two type(SQLA and hurry.query).

Monday, June 9, 2008

Continue on SQLAlchemy and hurry.query

It was a sympathetic and painful weekend, because one of my batch mate's funeral who was killed by terrorists by a bomb blast. Today I continued with learning SQLAlchemy and hurry.query. I used the on-line tutorials and continued with the examples given in them.
Then I read the article on Dublin Core [1] to understand it. And I went through the emails which were commented for the last week work by the mentor co-ordinator and by my mentor. I got some idea about how people feel on this project.

[1] http://dublincore.org/

Friday, June 6, 2008

Week progress report from 30th May to 6th June

I complete the 1-B sub task of the first step. It's about making the OCQL more Pythonic. I identified the areas which can be made more Pythonic with the help of my mentor. The changes won't disturb the working parser of the OQCL. Here is the results of this step, grammar written in Pythonic way. http://docs.google.com/Doc?docid=dfxg32dk_20dh2sn8hj&hl=en

Then I moved into the next sub step which is about evaluating how the SQLAlchemy[1] and hurry.query[2] can be useful in this project. First I started with the SQLAlchemy and went through the tutorials given in the site[1]. Initially I was following a tutorial for a older version of SQLAlchemy. Then I go through the tutorial for the latest version. Now, I got some understanding about it.

[1] http://www.sqlalchemy.org/
[2]
http://codespeak.net/svn/z3/hurry.query/trunk/src/hurry/query

Tuesday, June 3, 2008

SQLAlchemy and hurry.query

I did move to step 1 -B to 1 -C today. I need to evaluate how the SQLAlchemy and hurry.query could be useful in my project. I go through some articles and seems an interesting topic.