-
Notifications
You must be signed in to change notification settings - Fork 3
Bugfix for error describing CSV with semi-colon delimeter #129
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
Merged
phargogh
merged 3 commits into
natcap:main
from
davemfish:bugfix/128-table-resource-init
Apr 8, 2026
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -287,9 +287,16 @@ def describe_file(source_dataset_path, scheme): | |
| {description["path"]}'.encode('utf-8')) | ||
| description['uid'] = f'sizetimestamp:{hash_func.hexdigest()}' | ||
|
|
||
| # We don't have a use for including these attributes in our metadata: | ||
| # These are other attributes sometimes returned by frictionless. | ||
| # We don't have a use for them in our metadata and we do not permit | ||
| # arbitrary extra attributes in our models. | ||
| description.pop('mediatype', None) | ||
| description.pop('name', None) | ||
| description.pop('profile', None) | ||
| description.pop('dialect', None) | ||
| description.pop('hash', None) | ||
| description.pop('sources', None) | ||
| description.pop('licenses', None) | ||
| return description | ||
|
|
||
|
|
||
|
|
@@ -357,6 +364,7 @@ def describe_vector(source_dataset_path, scheme, **kwargs): | |
|
|
||
| """ | ||
| description = describe_file(source_dataset_path, scheme) | ||
| description.pop('encoding', None) # does not make sense for binary data | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh maybe my above comment doesn't make sense if the attributes to keep depends on the datatype. |
||
|
|
||
| if 'http' in scheme: | ||
| source_dataset_path = f'/vsicurl/{source_dataset_path}' | ||
|
|
@@ -404,6 +412,7 @@ def describe_raster(source_dataset_path, scheme, **kwargs): | |
| """ | ||
| compute_stats = kwargs.get('compute_stats', False) | ||
| description = describe_file(source_dataset_path, scheme) | ||
| description.pop('encoding', None) # does not make sense for binary data | ||
| if 'http' in scheme: | ||
| source_dataset_path = f'/vsicurl/{source_dataset_path}' | ||
| info = pygeoprocessing.get_raster_info(source_dataset_path) | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
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 case frictionless adds some additional attributes in future releases, maybe it'd be more practical to have a list of attributes we want to keep and then delete the rest?