dipdup-io / dipdup

Modular framework for creating selective indexers and featureful backends for dapps
https://dipdup.io
MIT License
92 stars 45 forks source link

Better `__repr__` for project models #482

Open droserasprout opened 2 years ago

droserasprout commented 2 years ago

Update dipdup.models.Model class to get better representation in crash reports. Now it's just <Model>. Bonus points: do the same for other classes commonly discovered in crash reports.

Gerson2102 commented 3 days ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged


Hey! I'm Gerson. 👋

Member of Dojo Coding. I have contributed before to other Python projects like:

Can I work on this issue?

Check my OnlyDust profile, I've contributed to many projects: Profile


How I plan on tackling this issue

Plan to Solve the Issue:

  1. Read the issue to fully understand what needs to be done.
  2. Understand the task and gather all necessary details from the issue.
  3. Explore the codebase to familiarize myself with the existing code.
  4. If anything is unclear, I will ask questions ASAP in the Telegram project chat to move forward efficiently.
  5. I'll open a PR once the work is done and wait for feedback.

coxmars commented 3 days ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I'm a software developer with 2+ years of experience and I have worked with backend technologies such as Cairo, Java, C# and frontend with React, NextJS, JS/TS. Also, I'm a member of the Dojo Coding community here in CR and I have made contributions in Cairo VM Go, Cairo VM TS, Cairo Lints etc.

How I plan on tackling this issue

1- I’ll first check the dipdup/models.py file to see how repr is currently handled for the Model class. 2- I’ll then update it to include key attributes (e.g., id) for better crash report clarity. 3- I’ll identify other frequently appearing classes in logs and apply the same update to improve their representations. 4- Finally, I’ll test the changes by simulating errors to confirm that the updated repr outputs useful info in reports.

juandiegocv27 commented 3 days ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

Hey! I'm Juan Diego Carballo. 👋

I'm a Software Engineer from Heredia, Costa Rica, and a member of the Dojo Coding community. I have experience in Python, Rust, Cairo, and other programming languages. I have contributed to open-source Web3 projects such as:

Starknet Quest Dojo Op-Scan At MAFISA, I led the development and deployment of an HR web application using FlutterFlow, enhancing real-time data interaction and user experience. My work involved implementing Firebase for secure data handling and user authentication, which improved system reliability by 15% and reduced server response times by 23%.

I have a solid background in improving code quality, debugging capabilities, and enhancing developer experience. Given my experience with Python and backend technologies, I'm confident that I can help improve the repr methods in the dipdup.models.Model class and other related classes to provide more informative crash reports.

How I plan on tackling this issue

Plan to Solve the Issue:

  1. Understand the Task:

    • Read the issue thoroughly to fully understand the requirements.
    • Identify the Model class in dipdup.models and examine how the __repr__ method is currently implemented.
    • Determine other classes commonly found in crash reports that could benefit from improved __repr__ methods.
  2. Explore the Codebase:

    • Dive into the dipdup codebase to familiarize myself with the existing structure.
    • Review how models and other relevant classes are defined and used throughout the project.
  3. Implement Enhanced __repr__ Methods:

    • Update the __repr__ method in the Model class to include key attributes like id, name, or other significant fields for better readability in crash reports.
    • Apply similar enhancements to other frequently used classes discovered in crash reports.
  4. Testing:

    • Simulate crash scenarios to generate reports and verify that the new __repr__ methods provide clearer and more helpful information.
    • Ensure that the updated methods do not introduce any side effects or degrade performance.
  5. Consultation:

    • If anything is unclear, I'll reach out to the project maintainers or ask questions in the community channels to move forward efficiently.
  6. Documentation:

    • Update any relevant documentation or comments to reflect the changes made to the __repr__ methods.
  7. Submission:

    • Once the work is completed and tested, I'll open a pull request and await your feedback.

I'm excited about the opportunity to contribute to Dipdup and enhance its developer experience by improving the readability of crash reports. Looking forward to your response! And nice to see you guys here, im so excited to know the growth that you have @droserasprout! :D

Ndifreke000 commented 3 days ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

With my expertise in Python, Web3, and machine learning, coupled with my dedication to code optimization, I have the skills to make a meaningful impact on this project. I’m confident I can deliver high-quality, well-tested code that improves the debugging experience for everyone.

How I plan on tackling this issue

Understand the Task: I’ll begin by reviewing the current implementation of the repr method in the Model class in dipdup/models.py to understand what needs improvement in crash reports.

Explore the Codebase: I’ll investigate how the current repr functions and identify other classes that frequently appear in crash reports.

Implementation: I’ll enhance the repr method to include key fields like id and name, making error logs clearer. I’ll apply similar updates to other key classes.

Testing: Finally, I’ll test the updated methods by simulating crashes to ensure the new outputs provide actionable information for developers.

jaykayudo commented 3 days ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I am a developer with expertise in python and web3 technologies. I have ample experience in building django apps which you will see if you go through my github profile.

How I plan on tackling this issue

I will Identify all the models throughout the project.

I will give a fitting __repr__ method return data based on the fields of the models.

fabrobles92 commented 3 days ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

In my day to day I am a full stack engineer for more 3+ years, with experience in Django, FastApi and plain python, also I have plenty of contributions to web3 projects where that experience can help me deliver a quality solution

How I plan on tackling this issue

tosoham commented 2 days ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I am a python dev. A new-comer here, willing and ready to contribute to solve this issue.