Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Allow GeoDataset to list files in VSI path(s) #1399
base: main
Are you sure you want to change the base?
Allow GeoDataset to list files in VSI path(s) #1399
Changes from 65 commits
72702ef
b68dd5a
e90d01c
dfad079
7291f3e
6b41f18
2b2be02
3f91e97
f0d9475
7ca3cb7
d519061
a841fb7
2ee3c85
5c6e444
2da9c4a
e79061f
00594de
9ef7669
8a61108
e8367ca
014e5f5
0bf5d68
41e3dfb
56b1c76
e96cfa9
d03120d
dfc571e
aaea729
740dcec
ba014af
e00b356
65ef978
5192acd
9f800f1
93de375
37c4980
395b4bf
6f041ee
dc334d5
0b80c12
dbbcec7
0cc7e15
c990591
ccdbe9b
a2dd0d6
ecce011
08fde98
26920ae
3baa587
be142aa
e7659a9
c88111e
cffd707
04740a2
51a3d64
7b33550
b81591d
c786a57
bb3ad78
0824026
6a3d128
8ea368f
0ad5db2
87ea802
94c3835
3ddee3a
46e2375
2d54680
d1d8a4a
d22a594
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
We should probably be using the
tmp_path
fixture here instead of creating the archive in a git-tracked location. This will require the default function scope though.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 made a module-scoped fixture instead, but I can opt for class-scoped if it will only be used for TestGeoDataset.
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.
To simplify the testing drastically, I think I would rather:
tests/data/<whatever>
and store them in git so we don't have to generate and delete them on the flyThis will remove a lot of the code duplication and make things easier to add new tests for (just a single line in parametrize). What do you think?
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'll take a look! I like the idea.
Might be annoying to keep the archives up-to-date with the source if we ever modify them though. The tests does not seem to be much slower when archiving on the fly, but it would reduce code-complexity for the test
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'm still considering deleting this function. It's only used in a single place, and it's only 1 line long, so we could just replace the if-statement on line 693 with this line. I would like to keep the documentation somehow though.
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.
Thats a lot of documentation to have in-line in the other method :P
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.
Should we return a set instead of a list? The
files
method is the only place they are used and uses a set.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.
Thats ok by me. The only reason I did not is because similar methods returns a list (iglob, fnmatch etc).
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.
We could change this method to remove duplicates (set) and sort it, then return a list as well. Or is it better to be explicit about that in the files-property?