dave-howard / vsdx

vsdx - A python library for processing .vsdx files
BSD 3-Clause "New" or "Revised" License
67 stars 25 forks source link

Update VisioFile.open_vsdx_file() and VisioFile.copy_shape() #6

Closed stevensultana closed 3 years ago

stevensultana commented 3 years ago

Should I add a test that the new Shapes tag is created? I imagine so right?

PS: this is my first ever PR, so pardon any missteps!

dave-howard commented 3 years ago

Hello Steve, Great to see this first pull request :) I have just pushed v0.2.8 which has unfortunately resulted in a few merge conflicts, and also see a few notes on the changes.

added the get_shapes() loop in VisioFile.open_vsdx_file() - _I have renamed this function (set_page_max_id) and called from copy_shape (via Page.set_maxids()) instead - so loop on load is no longer needed

updated VisioFile.copy_shape() to create the Shapes tag in case the destination page has no such tag - great, I was missing that, much improved commentary on that method also

updated tests to check exact shape ID is given to new shape - looks like this tests a shape with that ID exists, I have updated copy test to find shape by text and then validate that it's ID matches

good to see the added test also

if you can resolve the merge conflicts I will review and then accept the pull request

Thank you

dave-howard commented 3 years ago

Hi Steve - conflicts are minimal and I can make the changes I've described above, so I've merged and I 'll push again after those changes :)

dave-howard commented 3 years ago

Pushed here and to https://pypi.org/project/vsdx/0.2.9/