-
Notifications
You must be signed in to change notification settings - Fork 3
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
Bugfixes in utils.split_textline, core.Table.to_excel + various linting changes #72
base: master
Are you sure you want to change the base?
Conversation
Looks like these tests are failing because there is no This change should fix it according to this link. |
Thanks for your pull-request @matt-dies-tenet3 As long the tests are succeeding, the coverage is increasing and the readability is improving I see no reason to decline your pull-request. We are not dealing with an ideal situation so we can bent the rules. Keep sending them in and if you want I can even make you maintainer. |
Hey again @foarsitter! Sorry for the delay on marking the PR as ready. Had to jump through a few hoops. Everything should be good for review now. |
@foarsitter Is this PR a candidate to get opened and merged in the new repo? |
Hi there @foarsitter!
First off, thanks for all the work you've done on
camelot-fork
, as well as helping to revivecamelot
. I read through this issue where I saw that you were added a maintainer to the project and are working to merge your changes in from this project to enable Python3.9+ compatibility. With that being said, I've usedcamelot-fork
a bit and have noticed some bugs alongside @josht3.Below is documentation on each of the changes:
core.py
:Table.to_excel
method bug-fix: With the installed version ofpandas
incamelot-fork
, thepd.ExcelWriter
object no longer has awrite
method. I've updated this method accordingly to write the file in the recommended manner.camelot
package left a lot to be desired. My personal use case made theTable
andTableList
objects most important, so I've added type hinting to these methods that enable type checkers and linters to provide useful hints when using these objects or functions that return them. For example, I used to get linting errors about iterating through aTableList
, whereas now I don't! The linter is also able to tell that the objects within the iterable areTable
s. Just a small QOL change that went a long way in my use-case, and likely will for others.lattice.py
:indices
has elements: This is a small but mighty change! We found errors consistently at this line. After returning fromlattice.get_table_index
, there is no check for whether theindices
list has any elements. This slight modification does the indices reduction if theindices
list has no elements.utils.py
:cut_text
elements remain "in bounds" of table insplit_textline
: The two changes here are for the horizontal and vertical axes within the table. The horizontal change ensures that the maximum cut point is the furthest right column, so it can no longer expand beyond the bounds of the table to the right. The vertical change ensures that the minimum cut point is 0, so it can no longer expand beyond the bounds of the table above it.handlers.py
,io.py
: Just organization of imports. These files were modified automatically by my import sorter. It doesn't particularly hurt or help at all, except maybe improving readability.