Skip to content

Conversation

@dj0409
Copy link
Contributor

@dj0409 dj0409 commented May 2, 2025

Description

I added a function generate_pdf_export which enables the user to export a pdf which then shows first how many questions where harmonized with the threshhold that was setted and then shows all the harmonizes questions and the percentage to which they matched and lists them in the order where the best matches are on top.
The dependencies that are required for this change is the library fpdf, which i added to the requirement.txt.

Fixes # (issue)

Type of change

Please delete options that are not relevant.)

  • New feature (non-breaking change which adds functionality)

Testing

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test

  • Test B

Since the Harmony Python package is used by the Harmony API (which is itself used by the R library and the web app), we need to avoid making any changes that break the Harmony API. Please also run the Harmony API unit tests and check that the API still runs with your changes to the Python package: https://github.com/harmonydata/harmonyapi

Test Configuration

  • Library version:
  • OS:
  • Toolchain:

Checklist

  • My PR is for one issue, rather than for multiple unrelated fixes.
  • My code follows the style guidelines of this project. I have applied a Linter (recommended: Pycharm's code formatter) to make my whitespace consistent with the rest of the project.
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings
  • The Harmony API is not broken by my change to the Harmony Python library
  • I add third party dependencies only when necessary. If I changed the requirements, it changes in requirements.txt, pyproject.toml and also in the requirements.txt in the API repo
  • If I introduced a new feature, I documented it (e.g. making a script example in the script examples repository so that people will know how to use it.

Optionally: feel free to paste your Discord username in this format: discordapp.com/users/yourID in your pull request description, then we can know to tag you in the Harmony Discord server when we announce the PR.

@jaydugad
Copy link
Collaborator

jaydugad commented May 2, 2025

Hey @dj0409 I just tested this locally and everything works nicely!

The PDF export runs smoothly and the summary looks great. fpdf2 was added fine, and all 69 tests passed without any issues. Nothing in the API seems affected either.

Nice work, happy to approve and merge this.

@jaydugad jaydugad merged commit f3d779f into harmonydata:main May 2, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants