Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TST: Adding unit tests #28

Merged
merged 4 commits into from
Oct 11, 2023
Merged

TST: Adding unit tests #28

merged 4 commits into from
Oct 11, 2023

Conversation

Lucas-C
Copy link
Member

@Lucas-C Lucas-C commented Oct 10, 2023

I introduced the unit tests I originally developped in py-pdf/pypdf#2170

I also added a pytest -vv execution as part of the GitHub Actions pipeline

@Lucas-C
Copy link
Member Author

Lucas-C commented Oct 10, 2023

@MartinThoma: I think you added a dependency to fpdf2 in https://github.com/py-pdf/pdfly/blob/main/pdfly/x2pdf.py#L6

But this dependency was not declared in https://github.com/py-pdf/pdfly/blob/main/pyproject.toml#L31

Which is why the unit tests are currently failing in the GitHub Actions pipeline:

Run pytest -vv
ImportError while loading conftest '/home/runner/work/pdfly/pdfly/tests/conftest.py'.
tests/conftest.py:6: in <module>
    from pdfly.cli import entry_point
pdfly/cli.py:19: in <module>
    import pdfly.x2pdf
pdfly/x2pdf.py:6: in <module>
    from fpdf import FPDF
E   ModuleNotFoundError: No module named 'fpdf'

If you agree, I can add fpdf2 to pdfly dependencies as part of this PR

@Lucas-C Lucas-C force-pushed the adding-tests branch 4 times, most recently from 16278cd to bd9134a Compare October 10, 2023 09:22
@MartinThoma MartinThoma changed the title Adding unit tests TST: Adding unit tests Oct 10, 2023
@MartinThoma
Copy link
Member

@Lucas-C Thank you for the many improvements 🙏

The PR looks awesome 🎉

One last question before we merge it: Where do the images come from?

@MartinThoma MartinThoma merged commit 0f786e8 into main Oct 11, 2023
6 checks passed
@MartinThoma MartinThoma deleted the adding-tests branch October 11, 2023 20:32
@MartinThoma
Copy link
Member

Very nice! Thank you 🙏

@Lucas-C
Copy link
Member Author

Lucas-C commented Oct 12, 2023

Thank you!

Now I'll have to fix those xfail-ing tests... 😅

We could also open issues with the hacktoberfest tag in order to invite contributors this month:
https://hacktoberfest.com/

@MartinThoma
Copy link
Member

I like the idea of inviting new contributors :-) I would need to check what is required by us if we do that. I have no idea.

@Lucas-C
Copy link
Member Author

Lucas-C commented Oct 13, 2023

I like the idea of inviting new contributors :-) I would need to check what is required by us if we do that. I have no idea.

I added a few issues with the hacktoberfest tag: hacktoberfest

MartinThoma added a commit that referenced this pull request Dec 17, 2023
## What's new

### New Features (ENH)
-  Add x2pdf command (#25) by @MartinThoma

### Bug Fixes (BUG)
-  boxes are floats, not int by @MartinThoma
-  Add missing fpdf2 dependency (#29) by @MartinThoma

### Documentation (DOC)
-  cat command by @MartinThoma
-  More examples for the cat subcommand by @MartinThoma
-  Add cat subcommand by @MartinThoma
-  Link to readthedocs by @MartinThoma
-  Add project governance file by @MartinThoma
-  Move readthedocs config file to root by @MartinThoma
-  Add docs (#24) by @MartinThoma

### Developer Experience (DEV)
-  Checkout sample-files in CI (#30) by @MartinThoma
-  Let dependabot update Github Actions by @MartinThoma
-  Add action for automatic releases by @MartinThoma

### Maintenance (MAINT)
-  Update dependencies (#42) by @MartinThoma
-  In the cat subcommand, replace the usage of the deprecated PdfMerger by PdfWriter (#34) by @kommade
-  Update .pre-commit-config.yaml by @MartinThoma
-  Adjust x2pdf syntax by @MartinThoma

### Testing (TST)
-  cat with two files (#41) by @MartinThoma
-  Test cat command with more parameters + validate result (#40) by @MartinThoma
-  Adding unit tests (#28) by @Lucas-C

[Full Changelog](0.2.14...0.3.0)
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