Initial Draft application for Python Scripting Engine

Rahul Gaur rahul.nbg at gmail.com
Sun Apr 3 18:10:06 EDT 2011


Dear Christian,

 I am made a proposal  of how I plan to implement this importing and
exporting the data in GNU Cash , please take a glance and let me know your
views on this.

*Basic Information*

Student name:Rahul Gaur

Location: Meerut City , UP ,India,

Home Town :New Delhi ,India

  Email:rahul.nbg at gmail.com

Instant messaging contact details (Skype or similar):iamaregee/iamaregee2 on
IRC (irc.ubuntu.com)

Phone : +91-8755426793

*Background/Programming Information:*

I am pursuing bachelors in engineering from CCS University Meerut(NCR) ,
India.My major is in Computer Science and this is my firstyear.I write
almost all of my code on Linux platform and I tend to develop strictly for
open source platforms.I have written codes in many different languages like
basic,Java,C++,html/css ,Python,C.The C language is being taught to us in
college as a part of engineering course and I am developing an autonomous
robo and my project involves intense level micro-controller programing in
embeded C .While at my own level I am experimenting with PyRo for controling
the robot.I have been successfully able to build GNUCash from source via SVN
.

*What project in GnuCash would you like to work on?*

I would Like to add a new import/export feature to GNU Cash with the help of
python module to main code base of the GnuCash.

  *What will be the result of your project :*

With the successfull implemention of this project,user of GNU Cash will be
able to upload/retrive the genrated reports or financial data or both to a
cloud service like Google Docs ,and access it any time and anywhere over
internet or download it to any computer running GNU Cash.This feature will
enable users to keep their financial data syncronised.



 *How do you propose to solve the problem(s) posed in the project you'd like
to work on?*

*Project Details: *

I've already familiarised my self with the working of GNU cash (v 2.4.4
SVNr20419).As the work is already in progress to add the python module to
Gnu Cash ,my first step will be to work on python module to make it fully
functional with the GNU Cash.This will be followed by adding support for use
of different python modules in GNU Cash so cloud sync feature can be added
to it.I've my University exams from 8th to 30th of May ,so during this
period I will be in touch with the GNUCash community through emails.During
the time before exams ,I hope to :

   -

   Get to know the mentor and other community members.
   -

   Going through Devloper Docs.
   -

   Brainstorm plans with the community.


 This whole system works as follows syncing data :

When user selects an option of exporting the data with online account,a csv
encoder is initiated and it encodes selected database file to csv format
,then user authenticates the service and upon successfull authentication
,local directories in his online account is accessed and user selects
desired location thus upload is initated.

While in retrival process,user goes through same authentication process,then
he selcts the given data to be downloaded,the given data is downloaded in
csv format ,then decoded and accesed by GNU Cash.User edits his data and he
can sync it back with his account again.

This feature is also applicable in exporting the reports genrated in GNU
Cash.Just in case user want's to upload the generated reports,a choice for
this will be available in exporting report option when a report is
genrated.Similarly an option for report retrival will also be present.

Once upload/download procedure is done ,user will be informed about it.

*Project time-line :*

*~~~~~~ *

Phase I ~ from May 31st to June 15th

~~~~~~

   -

   Initial step would be to work on already included python patch in order
   to make it fully functional with the main codebase of GNU Cash so new
   features can be implemented.
   -

   As I propose new cloud syncronise feature,I plan to implement it with the
   help of python scripts.I am already doing a rough proof of concept to see
   how things turn out.I have written couple of scripts with Gdata and have
   been successfull in uploading the reports in html,plus spreadsheet database
   in csv formats to my google docs account.

>     import gdata.docs.data
>
>    import gdata.docs.client
>
>    import gdata.docs.service
>
>    import gdata.spreadsheet.service
>
>    import getpass
>
>
>>    user = raw_input('Please enter your username: ')
>
>    pw = getpass.getpass()
>
>    source = 'gdata-v1'
>
>    gd_client = gdata.docs.service.DocsService()
>
>    gd_client.ClientLogin(user, pw, source=source)
>
>
>>    file_path = raw_input('Enter path to csv file: ')
>
>
>>    title = raw_input('Enter name of the spreadsheet: ')
>
>    content_type = gdata.docs.service.SUPPORTED_FILETYPES['CSV']
>
>    ms = gdata.MediaSource(file_path=file_path, content_type=content_type)
>
>
>>    entry = gd_client.Upload(ms, title)
>
>
 ~~~~~

Testing ~ from June 16th to 20th

~~~~~

   -

   I will be writing a very basic backend in python ,in order to test the
   compatibility of my conceptual test codes to see how things turn out.I will
   test the patches I made in the python module.Testing the code in stable and
   unstable state ,to see if it handles the load properly without crashing.This
   will help me to lay out the road map for further development.

~~~~~

Phase II ~ from 21st of june to 14th of July

~~~~~

    -

   In this phase I will be fleshing out the code from proof of concept stage
   to something which can handle actual load,and scaling it up and integrating
   it with main code base.
   -

   Major Components :~
   -

   A csv encoder decoder for processing the database to csv format and
   viceversa.
   -

   Primarily I will be using Google docs to sync data,as it offers lots of
   client library and apis for authentication and uploading/downloading.As
   large number of people have Google accounts,so I thing it will be acceptable
   among the users of the GNUCash.Thou I don't wan't to limit it to one serivce
   ,so I carry on my work for including larger support even after Gsoc.
   -

   I will be using Google data python client library for exporting and
   importing database and reports with the google account.For this I will be
   using ClientLogin feature ,enabling user to authenticate there google
   accounts.Then Google spreadsheets api for handling export and import of csv
   format data.
   -

   The two main part to solve the purpose of exporting and importing
   data.One would be a CSV encoder/decoder another will be a client Login and
   upload/download scripts.My scripts will enable authenticated user
   to manipulate the directories in there accounts, retrieve/export all there
   data of a similar type with bulk retrieval/export feature.
   -

   Another feature will be report retrieval/export feature.This will be
   achived by writing a dedicated html uploader and downloader.


~~~~~~

Testing  ~   from july 15th to july 22nd

~~~~~~

   -

   I will initially begin testing the code for bugs and authentication
   errors,fixing them.
   -

   This will be followed by testing new features of importing and exporting
   data and testing this feature on different machines running GNU Cash.

~~~~~~

Phase III ~ July 23rd to August 10th

~~~~~~

   -

   By this time I will be roughly half a way through july,I will begin
   writing pygtk (GUI) based widget for export and import feature.This will
   include account authentication,bulk export and retrieval features.
   -

   Testing and debugging the code.
   - This stage will be followed by writing documentations for the newly
   added features.

   - Initially I plan to wind up everything by 10th of august,I will spend
   Rest of the august prettying things up ,testing the new feature and fixing
   bugs,refining the documents.


   - I plan to keep the community updated of my progress via weekly blog
   post.
   - I would be in touch with my mentor with the help of emails and irc.
   - If you have any questions regarding, your are most welcome to contact
   me.








On Thu, Mar 31, 2011 at 2:38 PM, Christian Stimming <stimming at tuhh.de>wrote:

> Dear Rahul,
>
> Zitat von Rahul Gaur <rahul.nbg at gmail.com>:
>
>   I've made some corrections to my application.Is it better now ?what more
>> should I add ..?
>>
>
> thanks for the additions. However, the basic problem in your application
> has not received much of an improvement: The main parts of your text are
> just some "generic programming project" description, but not at all specific
> to gnucash. Hence, from your applications it is not yet obvious whether you
> already have spent time and thinking on how your goals can be implement
> *specifically* in the gnucash project. I mean, from our point of view you
> can start working with gnucash nevertheless, but the GSoC staff that takes
> the final decision on your application might want to see further evidence
> that you've already got to know the gnucash project specifically.
>
> Also, the sentence "reporting engine,which primarily involves migrating all
> of the current reporting scripts to python" is grossly underestimating the
> time of "migrating all reports" and hence is rather unrealistic. Instead,
> you should *now* decide on one or two specific  things that you will want to
> migrate to python or implement in python. User-visible things.
>
>
>  Apart from this I've thinking of introducing a feature so that generated
>> reports can directly be exported to some cloud service so that user have
>> the access to reports even on a report system.If any thing similar to this
>> is in the loop  please let me know.
>>
>
> Currently nobody is working on anything similar. Your idea is good. Maybe
> you should focus your application more on this particular idea and feature.
> I believe this will result in a better application than discussing the
> abstract notion of "working on python engine in gnucash". Incidentally, your
> "upload" feature (either for the data file, or for generated reports, or
> both) might be implemented in python as well, once you've added some minor
> missing parts to the python module in gnucash. Hence, probably your
> application should emphasize your feature idea as the main goal, and mention
> the python engine only as a way to implement your main goal. I think this
> will make your application better.
>
> Best Regards,
>
> Christian
>
>
>>  *Basic Information*
>>
>>
>> Student name:Rahul Gaur
>>
>> Location: Meerut City , UP ,India,
>>
>> Home Town :New Delhi ,India
>>
>> Email:rahul.nbg at gmail.com
>>
>> Instant messaging contact details (Skype or similar):iamaregee/iamaregee2
>> on
>> IRC (irc.ubuntu.com)
>>
>> Phone : +91-8755426793
>>
>> *Background/Programming Information:*
>>
>> I've experience of building GNU cash from source via SVN on a linux
>> system.A
>> few years ago,I learned C++ and Java as a part of my School
>> curriculum.While
>> this is my first year in college ,Now I am pursuing Bachelors in
>> Engineering
>> and my Major is in Computer Science.So I am learning C and Python here in
>> College.By the time GsoC 2011 starts ,I will be done with my end semester
>> exams and equiped with skills to work full time on coding,so I wan't to do
>> some good project in order to strengthen my foundations in understanding
>> of
>> Sofware Systems.
>>
>>
>>
>> *What project in GnuCash would you like to work on?*
>>
>> I would Like to work on Python reporting and Scripting engine for Gnu cash
>> over my summer vacations.
>>
>> *What will be the result of your project :*
>>
>> Upon the successful development of the scripting engine ,primarily all the
>> current reporting scripts will be migrated to python plus it will open the
>> possibilites of implementing various new financial reports as python has a
>> vast  accounting library support.For instance libraries like matplotlib,
>> PyCompta can be used to genrate graphs and reports in xml,html and pdf
>> formats.While in the long run,python being a more common scripting
>> language,it will be easier for developers to contribute to the code and
>> improve the efficiency.
>>
>> *How do you propose to solve the problem(s) posed in the project you'd
>> like
>> to work on?*
>>
>> *Project Schedule :*
>>
>> While I plan to follow the description given in the idea of the
>> proposal.I've already familiarised my self with the working of GNU cash (v
>> 2.4.4 SVNr20419).I took a brief idea of sample python scripts.As I've
>> already stated , I've my University exams from 8th to 30thof May ,so
>> during
>> this period I will be in touch with the GNUCash community through
>> emails.During the time before exams ,I hope to :
>>
>>   -
>>
>>   Get to know the mentor and other community members.
>>   -
>>
>>   Going through Devloper Docs.
>>   -
>>
>>   Understand working of the reporting engine.
>>   -
>>
>>   Brainstorm plans with the community.
>>
>>
>>
>> After I am Done with my exams , I plan to Procede as follows :
>>
>> *Program time-line :*
>>
>>   -
>>
>>   To create a more accurate programing timetable.
>>   - Initial step would be to work on already included python patch in
>> order
>>   build the scripting engine which interacts with gnu cash and do the
>>   functions like accessing the entries in the Database.This will be
>>   followed by working on the reporting engine,which primarily involves
>>   migrating all of the current reporting scripts to python.This milestone
>>   will be done with implementing various  python libraries like
>>   quantalib,matplotlib and other similar libraries for various reports.
>>   - Then I will work on extending python programs with C which involves
>>   modifying current C programs to support new python engine .
>>   - Updating community of my progress weekly via blog updates.
>>   - Will spend some time tweaking the User interface, in order to make it
>>   more appealing and convenient.
>>   -
>>
>>   Start with testing and improving throughput of the code before midterm
>>   evaluations (ie: july 15th ).
>>   -
>>
>>   Start pulling together the documentation and coding.
>>
>>
>>   - While in testing phase , I will also finish writing documentations as
>>   well.
>>
>
>
>


-- 
-------------------------------------------------------------------------------------------------------
*Regards*
*Rahul Gaur*
irc : iamaregee2
blog : aregee.wordpress.com
fb: http://facebook.com/iamaregee


More information about the gnucash-devel mailing list