Name: Mandeep Singh
Project: The FreeCAD Plugin Installer
Community Bonding Period
- Discussion about the project proposal.
- Build FreeCAD from source on Archlinux.
- Shifted to Ubuntu and tried building. Discussed the dependencies issue faced on IRC.
- One issue was solved by creating a symlink of libfreeimage.so to /usr/lib from /usr/lib/x86_64-linux-gnu/ due to a bug on Ubuntu 16.04 (Xenial).
- Another issue I was facing was related to C++.
c++: internal compiler error: Killed (program cc1plus) Please submit a full bug report,
It was due to the make -j4 as it made the compiler run out of memory. Never happened on Archlinux though.
- Discussed to use PySide and Qt.
- Learning PySide.
23 May : Plan is to try out the existing pluginloader & addon installer. Trying the pluginloader.
24 May : Had my last exam today. So couldn't do much. But read some old conversations about the existing plugin manager on the FC forum.
25 May : Installed and used the pluginloader by microelly. Discussed some general concepts like Workbenches, Plugins and Macros with the mentor and how they are being dealt in FreeCAD. It downloads the zip's from GitHub and unzips to the ~/.FreeCAD/Mod/ directory.
26 May : Installed and used the Addon installer and saw it's working.
27 May - 28 May : Comparing pluginloader (https://github.com/microelly2/freecad-pluginloader) and Addon installer (https://github.com/FreeCAD/FreeCAD-addons#1-using-the-installer-macro) and listing out what we can keep or not for reuse. And getting mentor's views.
29 May : Having other community member's opinions on the forum. Discussed the plan about what can be done next. Looked at the addon_installer code.
30 May - 31 May : Discussed the design with ickby and yorik. Parsing macro code from wiki: https://github.com/mandeeps708/scripts/blob/master/FC_getMacro
1 June : Improved code for FC_getMacro script. Ported it to use python2 as well as python3. There is some compilation problem with etree.pyd in lxml (shared lib) on Windows.
2 June : Weekly meeting + discussed and finalized some things like code structure etc.
3 June : Went through some OOPS concepts and how to do them in python.
4 June - 5 June : Think of some design and relations. Code structure added to github.
6 June : Modified the fetch Macro Script to use BeautifulSoup (with html.parser) instead of pyquery (lxml).
7 June - 9 June : Health issues. Also, got some problem with laptop. Started learning about object oriented programming (with python).
10 June : Learned Inheritance in Python. Weekly meeting. Discussed about the code structure.
11 June : Some experimentation with parsing from FreeCAD-addons repo. Looking into PyGithub for GitHub API.
12 June : Finally get PyGithub working. Got list of files and some more examples.
13 June : Fetching of only submodules using PyGithub. Got the submodules and their related info. like submodule original URL.
14 June : Added more code to FetchFromGitHub class and created instances of Plugin().
15 June : Mainly had the discussion today; about the work down and what to do next.
16 June : Edited FreeCAD macro recipes wiki page to add a template tag. Used sed command instead of doing manually. Basically, the template wraps the macro links around a span having class "MacroLink".
17 June : Weekly meeting. Set goals. Fetched list of macros from the FreeCAD wiki. Fetched URL, description, author of individual macro. Code: https://github.com/mandeeps708/scripts/blob/master/FC_getMacro/wikimacro.py
18 June - 19 June : Worked on GitHub API. Tried to find if we could fetch repository name by using the repository URL. Talked to GitHub officials regarding this. But it's not there. So tried regular expressions in Python. And it's done.
20 June - 21 June : Fetched submodule info like author, description etc. Also integrated Macro fetching code into the main.py file. Created a separate getPlugins module that would be able to fetch all plugins available. Currently, it's like hard coded with fetch classes names. Will make it more robust.
22 June - 23 June : Mid-term Evaluation Period. Studied about Exception handling in Python. Added exception handling code for basic exceptions to both classes.
24 June : Mainly focussed on to find a way to register application on GitHub to use OAuth. Found a method in PyGithub. But not sure about its usage. Hence using Personal Access tokens as of now.
25 June : Initially, it took about 25 API calls to identify which of the item is a submodule. But now it takes 1 API call to fetch basic information and then used regular expressions to filter out the submodules.
26 June : Some more exception cases to Macro class if a user didn't correctly added a macro on the wiki. It'll get skipped.
27 June : Implemented getInfo() methods for both classes. The basic information about the plugins will now be fetched through the getPluginsList() methods. And additional things about a plugin like the author and the description will be fetched through calling the plugin with getInfo() method. For example: getInfo(PluginName), it will fetch more detail about the plugin. This will be further used in the GUI to be called when a user clicks a plugin entry.
28 June : Mainly discussed with the mentors about next task. And I was suggested to get overview of the things like creating a design how overall thing will work. And some other ideas like having a library that could interact with all fetch classes to provide an interface to the user to manage plugins (Wb+macros) altogether.
3 July - 4 July : Created some design about the workflow.
5 July : Shared the design with mentor and got the views. It lacked some of the functionality. So added that.
6 July : Added a new function for getting all plugins to combine instances of all plugins together.
7 July : Converted that function to a class and had an interface (getPlugins.py) for using this.
8 July - 9 July : Adds the interface class 
11 July - 12 July : Searched about various methods through which the interface can be improved to use getInfo() function within the interface as it was the other class' method. Couldn't figure out much how to do that.
13 July : Unable to work due to the power cut.
14 July - 15 July : Worked on getting the getInfo() function working. Tried a few methods and some did not work. Finally, it worked!
16 July : Mainly read about threading in Python.
17 July : Extended the info() function to include the macro case too. Also had a talk with the mentor. Some things need to be changed and some improvements were suggested to make the code more generic so that after adding another fetch class, the code should work fine.
18 July : Changed getInfo() functions to take plugin as an argument instead of plugin name.
19 July : Removed redundant inheritance, tried adding a new x.fetch = self. Having problems. Solving...
20 July : Made getInfo() of the base class to work as it does in the derived ones. Changed the "repo.owner.name" to "repo.owner.login" as it was not working (Related to GitHub API).
21 July : Made the interface more encapsulated so that fetch classes aren't accessible through the interface. Now the code works fine. Even with getInfo() too.