Skip to content

GSoC 2024 Ahmed Hossam

Ahmed Hossam edited this page Apr 7, 2024 · 3 revisions

Basic Information

Name: Ahmed Hossam Mohamed
University: Zagazig University, Faculty of Computers and Informatics (2022 - Present)
Time Zone: GMT +2
Overview: I am a second-year computer science student. I always try to explore the depths of technology and its applications. With a knack for problem-solving and a curiosity-driven approach to learning.
Contact Info:
ahmedhosssamps@gmail.com
https://github.com/ahmedhosssam
https://www.linkedin.com/in/ahmedhossamm/
@ahmedhosssam:matrix.org
@ahmedhossvm (Discord)

Me and GSoC

  • I plan to dedicate approximately 12 hours per week before the start of GSoC to familiarize myself with the codebase and documentation.
  • During the coding phase of GSoC, I am prepared to invest a minimum of 24 to 30 hours per week into the project. Furthermore, I am open to continuing my involvement with the SunPy project beyond the GSoC period. If there is additional work to be done.

Why Me?

  • Over the past weeks, I have spent a great deal of time inspecting the codebase of Sunpy and trying to resolve issues.
  • I took a deep dive into the Sunpy documentation and I became familiar with many Sunpy’s modules.
  • I joined the matrix room and became familiar with the project's community and mentors. And I was asking questions about the project and the codebase almost every day.

My Experience

Contributions to Sunpy:

Personal Projects:

I’m also a competitive programmer and I’m active on codeforces.

Improved solar feature and event representation

Introduction

Problem Definition: Sunpy provides access to solar features and events held by the Heliophysics Event Knowledgebase (HEK). Features and events include type, physical extent, location, lifetime, etc. However, the current implementation of HEK features/events in Sunpy does not leverage the full use of sunpy, for instance, many features/events properties are not utilizing Astropy units or sunpy coordinates, despite the availability of adequate information within the HEK description to facilitate this integration.

Solution: The solution for this problem could be done with the following:

  • Design and create classes that represent HEK solar features/events that full utilize SunPy capabilities.
  • These feature and event classes should possess a general design, ensuring compatibility with descriptions found in other catalogs beyond HEK.

Project Deliverables

This project will be built upon the groundwork laid by a previous GSoC Project, providing a solid foundation. Leveraging this existing work will streamline the project's scope.
And because a lot of groundwork has already done, this project will focus on the following tasks:

  • Design the class diagram for sunpy.net.hek.
  • Refactor and reimplement some functions in the finished work in GSoC 23 project.
  • Create a new utility file named util.py that includes some HEKClient functions that doesn't make sense to be attached to the client, in addition to new utility functions as well.
  • Add documentation strings for each function.
  • Unit tests and Continuous Integration (CI). In addition to the above tasks, other crucial aspects must be integrated into the implementation process:
  • Clean, reliable and maintainable code.
  • Blog posts containing a log of everything that has been done and what's next.

Implementation

Design the Class Diagram

The following diagram describes the whole sunpy.net.hek classes in a high-level fashion:

UML Diagram: https://imgur.com/a/QdNcj0U

Refactoring

Inside HEKClient, I'm planning to refactor the finished work in GSoC23, this includes the following:

  • Reorganize parse_columns_to_table by adding some variables to reduce complexity.
  • The function parse_astropy_unit(str) needs to be rewritten.
  • Creating a new utility file util.py
    The following functions will be moved from HEKClient into a new util.py file:
    def parse_times (table)
    def parse_unit (table, attribute, is_coord_prop = False)
    def parse_astropy_unit (str)
    def parse_chaincode (value, idx, attribute, unit_prop)
    def parse_columns_to_table (table, attributes, is_coord_prop = False)
    def parse_values_to_quantities (table)
    def get_unit (unit_prop, str, is_coord_prop = False)

The reason for this is that these functions are best suited as utilities rather than being directly attached to the HEKClient.

Testing

Writing tests is a crucial part of the software development lifecycle. Most software products should have some kind of automated testing process whose mission is to ensure the delivery of correct functionality. Sunpy’s HEK interface is no Exception. Each function/class in hek.py, utils.py, and attrs.py will be accompanied by test cases to assert the function/class is properly working.

Documentation Strings

Like testing, documentation is an important part of any software product. The plan for documentation includes a documentation string inside every class/function so that future developers will have an easier time maintaining the existing codebase. As for users, if the situation demands it, there will be a step-by-step guide explaining the usage of the client. Also, documentation strings exist in almost every sunpy function, except sunpy.hek, that’s also a problem.

Timeline

Community Bonding Period (May 1 - 26):

Week 1-2 (May 1 - 15):

  • Getting to know mentors, deep dive into documentation, getting up to speed to begin working on the project.
  • Socialize and interact with other community members (students and mentors)
  • Learn more about OpenAstronomy as an organization with a mission and vision
  • Familiarize myself more with the architecture and codebase
  • Clarify ambiguous portions in the proposal
  • Start a blog

Week 3 (May 16 - 23):

  • Refactoring HEKClient functions and writing documentation strings
  • Creating util.py
  • Begin moving some HEKClient functions into util.py

Week 4 (May 24 - 31):

  • Writing initial test_util.py
  • Complete implementation and documentation strings for util.py
  • Creating an initial pull request and seeking initial reviews

Final Exams (June 1 - June 30):

  • I will be studying and taking final exams in college, but I will be active in the community

Week 5 (July 1 - July 8):

  • Complete writing test_util.py
  • Making sure that util.py passes all the tests
  • Creating a pull request for util.py and test_util.py and seeking reviews

Midterm Evaluation (July 9)

Week 6 (July 10 - July 17):

  • Writing unit tests for HEKClient
  • Creating a pull request for test_hek.py and seeking reviews

Week 7 (July 18 - July 25):

  • Seeing if there is additional work to be done, and seeking reviews before the final evaluation.

Final Evaluation

Clone this wiki locally