Posts

Tenth Week

In tenth week, we achieved following : Ecldoc installation was determined. We used setup.py from setuptools to generate installation information for the project as python package. Requirements for projects was determined as jinja2 and lxml. All data files in Templates folder was added to setup.py as data files. A single script was added to bin directory to act as entry point for the ecldoc utility. We use pip to perform actual installation (for easy uninstall). We generated a Makefile with 2 targets - install and uninstall. Each target can be run with root permissions to install for all users and local permissions to install for given user only. Documentation was updated with installation info.

Ninth Week

In ninth week, we achieved following goals : Generates Documentation for Users in clienttools documentation format. Code Refactoring : Here we reworked the code, so that all output formats are present in separate directories. This will allow easier extension to other formats in future. The only file needed to be modified to add more formats is Formats/generators.py and it will be added to ecldoc. Templates were moved to separate directory which makes it easier to install using setuptools in python. Code was reworked to generate absolute imports rather than relative imports. This makes it easier to move the destination of imports. Code was documented using docstrings and comments wherever required. Technical Documentation was generated to inform overall working of ecldoc code for future.

Eighth Week

In eighth week, we achieved following goals: Generate Links to any external Documentation for given ecl source tree. For example , if project A has IMPORT B.B1; stmt in some file and we have included path to B Code in eclcc using -I option, that we can also include path to documentation of B which will be linked correctly to any such import stmts in documentation of A. To generate external documentation, each ecldoc run generates a tree.json file for each folder in given ecl source tree. Tree.json files provides paths to each file starting from the folder the json file is in. If the corresponding source path is included in eclcc, we can determine target path using this json file. Example - If input_root below is included in -I option of eclcc, then any imports of keys in tree (example_8, intest, intest.example_11, intest.inintest, intest.inintest.example_2) will be linked correctly to documentation in output_root in each format. { "input_root": "/media/sart

Seventh Week

In 7th week, we achieved following goals : Generated a type system in eclcc code so that we get accurate types for return type and parameters than those returned by heuristic signature breaking. Each Type is represented as type tree. To generate type system, we used a switch statement over type code of given type. For simple types, we simple used getECLType() for that type code. For complex types, we used their typename as attribute in type tree and recursed over any child type. For record type, we used queryOriginalName to get original name if record is previously defined and do not expand that record. Else we expand the record using expandRecordDefinition function. For function type, we generate its parameters types and return type to get correct type info. Type system to used to get return types of function, parameters types, field type in record and any definition that is not a function, scope, type, record or import.

Sixth Week

In sixth week, we achieved following goals : PDF Documentation was generated. To generate PDF Doc, we generate LATEX files for each source and then run pdflatex on them. XML Doc was read to get appropriate information for PDF Doc. Jinja2 library was used to generate template for latex files. New jinja2 environment was created as default environment clashes with latex syntax. New jinja2 filter was added to escape special chars present in latex. The Definition can not be indented in pdf, so used breadcrumbs bar in each definition to show its ancestors in definition tree. Each folder was also given a pkg.toc.tex file to create a table of contents. It contained bundle info, if any and links to individual source file along with first line of the that source. PDF Documentation was generated from tex files by combining them using \input in latex. Using this, we create an overall documentation (for complete source tree) and individual folder documentation (for all files in one fol

Fifth Week

In fifth week, we achieved following goals : Text Documentation was generated. XML Doc was read to get appropriate information for Text Documentation. Jinja2 library was used to generate Template. For Text Documentation, we limited all information display to 150 chars per line. The Definition was indented on basis of their level in the tree. We use textwrap library to heuristically break long sentences along word boundaries. Each folder was also given a pkg.toc.txt file, which contained bundle information and links to all files in that folder. Heuristic signature breaking was designed. The signature for definition was read and broken into return type, name and parameter string. The breaking occured along heuristic : break at first incidence of name in the sign that it not enclosed by brackets and ends in whitespace or '('. Then break at end of the name.

Fourth Week

In fourth week, we achieved following goals : Table of contents were generated for each directory in input root. If directory, was a bundle, the bundle.ecl file was parsed to obtain bundle information. The bundle information was generated using ecl bundle info command. The bundle info was generated in XML format. from text output. XML Bundle info was converted to HTML format. License File was linked to external page. Docstring was parsed to obtain first line of documentation. First Documentation of top level attribute in each file was appended to its table of contents entry.