-
Notifications
You must be signed in to change notification settings - Fork 476
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
Release camelot-fork 0.20.1 #353
Conversation
This pull-requests does a lot of things. Since things are getting back to life over here I will explain them a bit more.
From my point of view it makes sense to release version 1.0 as a stable release where we support ghostscript and do minor bugfixes and keep our dependencies up to date. In version 2.0 we can add support for poppler/pdftopng. What do you tink? Which changes can be cherry-picked and which changes need to dropped? |
(cherry picked from commit 1632cfc)
…nd IO objects are accepted (cherry picked from commit 436998b)
Here Table.df is initialized as an empty DataFrame instead of None. This is for language servers to understand what members it might contain. For example, in the following line of code, ``` are_table_rows: List[bool] = [True] * table.df.shape[0] ``` Pyright complaints `Cannot access member "shape" for type "None"`. Such misunderstanding would not occur with this commit.
Cause: Empty horizontal and vertical dictionaries in t_bbox in method _text_bbox(t_bbox) Resolution: Added len check condition on t_bbox before updating (xmin, ymin, xmax, ymax) and initialised (xmin, ymin, xmax, ymax) to 0 if len is 0
changed the test name to be more aligned with other tests
@foarsitter @vinayak-mehta do you have a timeline around when this will be merged in? I'm running into issues installing camelot on python 3.10 because of Let me know if I can help at all. |
Sorry, there is no timeline. If you need a solution asap install the fork ( |
@foarsitter I would recommend to break a couple of changes out of this PR. That would have advantages:
Especially black+isort would be VERY desirable to have in its own PR. That PR should not add / change anything else + it should document which commands were executed. |
@foarsitter #358 applies only black |
This is a big one, let me go through it this weekend |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general looks good to me. Few minor comments.
Only concern that this would possibly be incompatible with the multithreading.
But maybe thats a concern after we merged this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want the license / copyright change to be explained / discussed.
Didn't know the cookiecutter template added a copyright with my name. Will remove it tomorrow. Thanks for checking. |
Found some references at other places that needed to be updated. Sorry for the inconvenience. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the many improvements 🙏
I am not super familiar with camelot (and especially its CI). As a lot of files were touched (+4583 -975! and 145 files!) I recommend making some smoke-tests locally to ensure basic functionality.
In general, this would have been easier to review if the automatic changes (ruff? black? pyupgrade? isort?) were done in separate PRs.
The changes your are describing are in separated commits, you can select commits on the top left in the What kind of smoke-tests do you have in mind? We are using the fork in production and all the tests of this PR are succeeding. Camelot has a pretty decent test coverage (88%) and a lot of different pdf types are tested: https://github.com/camelot-dev/camelot/tree/master/tests/files One of the reasons I'm using the hypermodern cookiecutter template is that it has a lot of documentation. In example you can read about all the Github actions this PR includes over here and how to make a release over here. I agree with you that the road I took is quite the spartan way but I think it is the fastest way forward. |
Interesting. Most of the time I don't look at single commits as they contain a lot of noise. As a maintainer of pypdf, I also don't like this model as it "packages" different unrelated changes. Hence it removes the freedom of choosing which of those I want to take in and which I don't want. The result is typically that it takes overall longer to merge those PRs + causes more work. In the case of camelot I can understand it though. It's been a while since the last release. Please take my comment here more as a general wish. It's not meant as criticism in this specific case.
Oh, nice! That should do it :-) |
So.. concluding.. all lights are green ❤️ It's a go 😃 can we get a merge? |
Interesting, I thought you could merge @bosd . Just to clarify: I can merge, but not release to PyPI. I'm a bit hesitant as I would rather like to support once in a while than become a core maintainer of another big project 😅 |
@MartinThoma yes I'm enable to merge. Since it is a large PR and a lot happened during last weekend I think it is appropriate to have a cooldown of a few days before merging so everyone can react. Releasing to |
Sounds good! Regarding the releases, I've opened #389 |
No, I don't have any permissions here to merge. As to my knowledge only @MartinThoma and @foarsitter are the only currently active maintainers. |
Squash and merge is the only option for merging.... That need to be changed before merging. |
For this specific PR I agree. In general, I prefer squash-and-merge. PRs should only contain one change (once we are back on track) |
So this means that dev is blocked/stalled again?? Or does any of you have the super powers to change this? |
As long there is nobody around with full permission for GitHub and pypi this project could be considered dead. |
@vinayak-mehta Can you please give me full access so that I can adjust the project settings (temporarily enabling a merge-commit for this specific PR)? |
@foarsitter It seems as if I will not get the necessary permissions any time soon. Would it be ok for you if I squash-merge this PR and then make a release to PyPI? |
Sure, no objection if its the only way forward. Go ahead :) |
https://github.com/camelot-dev/camelot/blob/master/.github/workflows/release.yml seems to have an issue: |
"Poetry could not find a pyproject.toml file in /home/runner/work/camelot/camelot or its parents" I don't know why this part is failing. However, the PyPI part should be removed as it's very likely not configured. |
This PR contains a ton of improvements. They are merged via a squash-commit, but the individual changes are visible in the PR: * Add hypermodern python to the original repo * Add conftest.py and skip tests that depend on poppler * Align the type of PDFHandler.filepath with PdfReader.stream so Path and IO objects are accepted * Pre-commit * Initialized Table.df as empty DataFrame * Fixed: ValueError: min() arg is an empty sequence * Fix: unwanted data leaks into the last cell * added test case for method bbox_no_intersection method * Update test fixtures and remove unused imports * Fixed ZeroDivisionError in text_in_bbox * camelot-fork 0.20.1 * chore: revert changes to README.md * Remove references from pyproject to the fork * Fix install ghostscript * Poetry update * Removed references to me as person or to the camelot-fork repo --------- Co-authored-by: Jinjun Liang <[email protected]> Co-authored-by: Manish Patwari <[email protected]> Co-authored-by: zhy <[email protected]> Co-authored-by: Rahul.Bhave <[email protected]> Co-authored-by: Constantine Parkhimovich <[email protected]>
Sorry for the dropping the ball big time here, I thought you both had all the permissions because you were members of the github organization, I didn't know github doesn't let you change minor repo level permissions even if you're an org member |
Leaving this here so the it can be merged if there is any interest.