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

add support for zipfiles with implicit directories #37

Merged
merged 3 commits into from
Nov 15, 2023

Conversation

tyler-c2s
Copy link
Contributor

closes #36

Iterates through namelist of archive, and retrieves the parent directories of each file as a set

Created test zipfile with zip -r -D ../demo_finder_noimplicit.zip *

Copy link
Owner

@johntruckenbrodt johntruckenbrodt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @tyler-c2s,
thanks a lot for implementing this. Here just a few minor corrections. Furthermore, do you know in which Python version this syntax was introduced:

def namelist_with_implicit_dirs(root: ZipFile) -> List[str]:

The pyproject.toml currently specifies requires-python = ">=3.0", which should be updated accordingly.

spatialist/ancillary.py Outdated Show resolved Hide resolved
spatialist/ancillary.py Outdated Show resolved Hide resolved
@tyler-c2s
Copy link
Contributor Author

Furthermore, do you know in which Python version this syntax was introduced:

def namelist_with_implicit_dirs(root: ZipFile) -> List[str]:

The pyproject.toml currently specifies requires-python = ">=3.0", which should be updated accordingly.

Great point. Typing was introduced in py 3.5. Happy to limit to that version, or as python <= 3.7 is now End Of Life we could limit the version to >=3.8

recently introduced typing
@johntruckenbrodt
Copy link
Owner

Great. Thanks. I have quickly changed it myself. Let's stay with 3.5 as minimum requirement.

@johntruckenbrodt johntruckenbrodt merged commit a91f007 into johntruckenbrodt:main Nov 15, 2023
@tyler-c2s
Copy link
Contributor Author

appreciated, thanks for the quick review! 🚀

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.

finder fails for CDSE SAFE ZIP files without implicit directoruies
2 participants