Categories
CLI website

Week12 – Wrap-Up

This week’s work mainly focused on wrapping things up as the end of the project is approaching, and I am striving to refine the details.

Quantitatively, I accomplished the following tasks:

  1. I thoroughly tested my code following the correct workflow.
  2. In the old version, when matching filesets in the command line, it would repeatedly create the same fileset multiple times (manifested in the logs as multiple occurrences of “Updated fileset: xxxx”). After some debugging, I found the problem. As shown in the diagram, the old version would automatically insert a new fileset after all possible match failures, which seems reasonable. However, I had already implemented the logic of “creating a fileset first before matching” in a previous version. This led to duplicate logs since the outer loop of this code was
    for matched_fileset_id, matched_count in matched_list:,
    meaning that the number of potentially matched filesets would result in the same number of duplicate logs. This issue was minor but stemmed from my lack of careful consideration.
  3. I added several new features: for instance, I added checkboxes next to each file on the fileset detail page for developers to conveniently delete unnecessary files, included sorting functionality in the fileset table on the fileset page, and highlighted checksums corresponding to detection types. These features did not involve complex logic, as they were primarily frontend enhancements, and therefore were completed without difficulty.

Looking back at my entire project, I have finished nearly 3000 lines of code over 12 weeks.

I am pleased that most of what I’ve accomplished so far has met expectations. However, there are still some improvements needed before deployment, such as adaptation for MacBinary and other Mac formats, and user IP identification. My sense of responsibility drives me to continue refining this project even after GSOC ends until it can be truly put into production. I look forward to that day! 😄

Categories
website

Week 11- Testing

This week, I mainly focused on testing the system I previously developed to see if there were any overlooked issues. Fortunately, the problems I discovered were minimal. Below are the issues I fixed and the new features I implemented this week:

  1. Marking a fileset as full on the fileset page is straightforward; I just needed to add a button for that.
  2. The set.dat file may contain checksums for “sha1” and “crc,” which I initially forgot to ignore. As a result, these two checksum types appeared in the fileset.
  3. I added a “ready_for_review” page. I realized I could reuse the file_search page, so I simply created a redirect to this page.
  4. Speaking of the file_search page, I finally fixed the pagination error. The issue arose because I hadn’t considered that the query page could include filter conditions, which caused the results to show the entire table (i.e., without any query conditions). This error was hidden in a small detail, but I managed to fix it.
  5. I added a user_count based on different user IPs. I implemented a simple prototype, but I’m still contemplating whether there’s a better solution, such as creating a new table in the database to store user IP addresses. I’m not sure if this is necessary and I may consult my mentor for advice later.

Overall, this week has been relatively easy, but I’m still thinking about areas for improvement.

Categories
website

Week 10 – Fixing

This week, my main focus was on filling in gaps and fixing issues. Here are two significant changes I made:

Due to the need for the database backend to return counts of matches, missing items, and extras when verifying file integrity for users, I quickly realized that returning only a few mappings containing counts after the database query was insufficient (other functions require detailed information). As a result, I changed the dictionary type from defaultdict(int) to defaultdict(list).

At the same time, I discovered that I couldn’t retrieve user filesets on the fileset query page, even though the logs showed that I had indeed inserted several user-status filesets into the database. After investigating, I found the root cause of the issue. I had not considered inserting metadata for the game when the user-status filesets were added. After making some modifications, I resolved this problem.

In summary, this week’s work was much easier than before; I just needed to test different scenarios and make fixes based on the results.