PhonePe / PhonePe/mantis

Report Generation draft code

Open
#91 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement hackathon hacktoberfest
Dominant language
Python
Stars
1k
Forks
136
PR merge metrics
No merged PRs in 30d

Description

Is your feature request related to a problem? Please describe.

Report generation mechanism for Mantis

Describe the solution you'd like

I have written Python script that would interact with MongoDB directly and generate reports based on the yaml block created by a user. I added the Python script, typst templates and sample yaml file to the Github Gist at https://gist.github.com/0xbharath/9d2f78bd808d9fbad619e04cc0637a79

The script reads parameters from yaml, generates a typ (typst) file. As part of v1, we can just give the user the typ file and ask them to generate PDF themselves. Directly providing PDF is not ideal as they might want to make changes to the report.

The yaml block for report generation is already merged and available in local.yml of Mantis. Anyone picking this task needs:

  • Figure out the structure for the report generation code in Mantis project
  • Modify the script to work with local.yaml file instead of a stand alone yaml file
  • Write the typ file to a specific directory like reports
  • Modify the Dockerfile to do a volume mount of reports directory with host so that the generated reports can be accessed on the host

Happy to connect with anyone working on this feature to help them with the code.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the report-generation examples in the linked GitHub Gist and the existing report-generation block in local.yml. Then identify where this logic fits in Mantis, adapt it to local.yml, write generated .typ files to reports, and inspect the Dockerfile for the required reports volume mount. Done means a report can be generated and accessed from the host.

Written by the indexing model from the issue text.

Assessment

Tech stack
mongodb, python, yaml
Domain
backend, data
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.