-
Notifications
You must be signed in to change notification settings - Fork 16
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
Rewritten printing logic and intelligent corner-filling #19
base: master
Are you sure you want to change the base?
Conversation
* feat: restructure, update - update from setup.py to pyproject.toml - use pdm - add support for "x" after the numbers in the decklists * feat: add pre-set sizes for papers - add a dedicated module for sizes and dimensions - add nptyping for better typehints * refactor: rewrite for flexibility and readability - remove pdf case from matplotlib function, since PDF output is handled by a separate method - add cache CLI argument for the following cache refactor - fix methods being shadowed by their local variables - replace Argparse with CLick - rewrite dimensions for better accessibility - decompose printing methods into classes for better extensibility * refactor: refactor caching and add few tests - modify cache location - add cache argument to each function that uses it to remove cache definition through side effects (globals are 'ew'!) - add some tests for units and dimensions * fix: patch errors from cache refactor - add conftest for fixtures - fix some broken tests - * fix: patch errors from cache refactor and plotting - add conftest for fixtures - fix broken tests - remove obsolete tests - change str -> Path where applicable - fix matplotlib plotting and FPDF2 printing issues, including issues rooted in the abstract base class. * feat: update pre-commit hooks and add example images - use the faster better RUFF instead of older things. - add conventional commits hook to encourage readable reflogs - add example card images for testing and offline development * ref: update python-package.yml * feat: use PDM in github action * feat: use PDM in github action - fix pre-commit dependency and stuff - remove invalid import - update README.md - update deps in pyproject.toml - remove prettier * fix: install correct deps in github actions * fix: use PDM to run tests in github actions * fix: tests - use correct fixtures --------- Co-authored-by: Adam Bajger <[email protected]>
* feat: Implement corner filling - fill the corners of the cards using their own edges, allowing filled border for cards of any border color. - make filled corners for borderless cards look good as well. - make the border-filling finctions static - rename CLI functions to generic names - designate output destination for tests * refactor: rewrite the corner-filling logic - since for each corner, the code gets executed similarly, make the methods share code as much as possible - add docstrings - fix method name shadowing * fix: wrong keyword
Shiee, found a bug with cropping. I will need to fix it, but later. |
- crop all sides the same - change the Image object from numpy.ndarray to PIL.Image - rework the image operations to use PIL - add cache and outputs into .gitignore - fix other minor typing issues
I examined the "inner border" crop and decided not to attempt to match the behaviour 100% |
Hello, I really appreciate your effort to add this feature. However this PR changes far too many things at once. Also, please avoid changing the overall structure and linter settings (ruff is amazing, though). These are kept identical to other projects. |
Hmm. With regard to the linter settings. Do you really believe that it needs to stay? I did not see any active projects that would seem to depend on linter settings etc. |
Yes, not all projects are public. Please leave the DevOps unchanged.
Several of the changes are completely unrelated to each other and could be separate PRs. |
I have rewritten the printing logic and few other things along the way:
So, round and round, not much has changed - just a small rewrite to make it easier to add a new feature.