Simulator Improvement: GSoC'22 Phase 1 Report

coverImage

This blog is about my work in the first phase of Google Summer of Code 2022 with CircuitVerse.

About my Project

My Project aims to improve the CircuitVerse simulator and finish some of the pending work in the CircuitVerse desktop app. One of the primary goals of the project is to create tests (unit tests) for the simulator which can be run to ensure that no new change breaks the simulator’s behavior.

Community Bonding Period @Circuitverse

The CircuitVerse community has been super welcoming since the first day I started contributing. I was thrilled after being accepted as a GSoC student. We had our first meeting with the organization’s core team members and mentors, and also interacted with other fellow contributors. It was a great pleasure to meet all of them. We had a very productive meeting, and our mentors informed us about the GSoC flow and shared their GSoC experiences. Also, I and my mentor scheduled a meeting, to discuss the project flow.

As I was familiar with the organization codebase, I started working on my project during the bonding period and planned to have at least one meeting every week to discuss the progress and future plan of the project with my mentor.

Coding Period || Phase 1

For me, the initial coding phase went smoothly. Major tasks for the project are:

  • Complete touch and mobile compatibility project
  • Complete the Desktop app
  • Implement import and export of circuitfiles
  • Tests for the simulator

First, we decided to start with the Simulator Testing project, followed by importing and exporting circuit files.

Simulator Testing

The major task of the project is to create a test suite for the CircuitVerse simulator which ensures that new changes do not break the current functioning of the simulator. We have to build a test suite using the testbench engine, which provides an abstraction layer to the code.

For creating the test suite, we used JEST testing library. For testing any circuit using testbench, we can pass test data and circuit data to the testbench function (runAll), which runs tests (which does not involve any web browser) and returns a test summary.

Work Flow

Work Flow

Work Sample

Simulator Tests Working Gif

Pull Requests

Import & Export of circuitfiles

Task: A .cv extension file that contains the circuit data that can be exported and imported from the system to the simulator.

Pull Request

Mobile Touch Compatibility

Last GSoC, Abhisek Zade made a lot of progress with the touch compatibility on the simulator for small devices but it has some UI bugs, which needed to be fixed.

Some bugs that have been fixed:

  • Updated branch code
  • Added redo option
  • Fixed navbar menu UI
  • Fixed properties dialog UI and some small UI bugs

Touch Compatibility Working Gif

Pull Request

Learnings

  • Gained a better understanding of the JEST-testing library.
  • While creating the test suite, I learned more about circuits, fundamentals, and simulator functioning.
  • I learned more about UI and UX.
  • Acquired knowledge of the best practices to follow while writing code.

Conclusion

Phase 1 was majorly about simulator testing. Everything was easy to understand and my mentor helped me in every way possible. The community was a great support in the whole process.

comments powered by Disqus