Merged production code into SVN
Previously several of the contributions to the website existed only as manual edits to the code on the production server, and were not backed up in the SVN repository.
I simply grabbed a tarball of the production server code, used scp to move it to my laptop, and looked carefully at the diff between the two trees.
Some of the differences were production-specific configuration (e.g. SQL credentials). It would greatly streamline development if such configuration could be in a file selected at runtime rather than hardcoded into the Python source.
I found some functionality in src/views/accounts_view.py: getFriends, getComments, etc. These have been safely merged into the SVN repository after being tested on my laptop. The src/views/register_view.py file had all mention of reCAPTCHA commented out, which I also merged into SVN. I did the same for several stylistic changes in the static files (JavaScript and CSS) and some of the
Mako templates.
In summary, the SVN repository now has all the functions of the production server except for production-specific configuration.
P.S. - I also looked at the code on the test server and found
no changes
Remove Edit Button
A user's projects table shows a column for editing and a column for deleting. Both of these contain buttons that take you back to the home page because they're not implemented. I previously implemented (or rather resurrected) the project description editor, so that the edit button column should be removed. In order to remove the edit button, however, I had to trace through most of the code in templates/user.projects.mako. This is because the table is not declared in a single coherent block of code, rather it is defined piece-by-piece, with each piece expecting the columns to be laid out a certain way. Some of the side effects of removing a column were hard to find: clicking on a row triggers JavaScript code that retrieves table values using jqGrid's getCell function with hardcoded column IDs. This means that a bunch of column IDs have to be manually decremented when a column is removed.
Remove Duplicate Project Table
I realized that the project table shows up in two places: a dedicated page for the project table and the user profile page. In the implementation, the code from the projects page was copy-pasted into the profile page. It will work better from an implementation standpoint to only keep the dedicated projects table page, which is what I've done in the SVN repository. If Prof. Eglash approves I will put this up in the production server.
Projects Wipeout Warning
The file docs/installation/pyramid.installation.txt now mentions that when the server is reinstalled, the uploads directory is wiped out and should be backed up before reinstallation.
Move Description Editor
The description now shows up above the description editor box, which makes the editor's purpose more clear.
Software Quality Issue: Copy-Paste
I frequently find large duplicate blocks of code throughout both the Python source and Mako templates. Future developers are advised as follows:
1. Do not copy and paste code.
2. Be aware that code is duplicated. If you change something, look for a duplicate somewhere. If you find it, combine them and then add your changes (this happened to me while removing the Edit button).