feat: Split and add extra configuration to export_data method#580
Merged
vdusek merged 25 commits intoapify:masterfrom Oct 31, 2024
Merged
feat: Split and add extra configuration to export_data method#580vdusek merged 25 commits intoapify:masterfrom
vdusek merged 25 commits intoapify:masterfrom
Conversation
vdusek
requested changes
Oct 8, 2024
Collaborator
vdusek
left a comment
There was a problem hiding this comment.
Thanks for the contribution! I have a few comments...
Regarding the removal of export_data, I'm not sure we should do that. Removing it would break parity with the JS Crawlee and introduce a breaking change (in which case, you'd need to use the feat! commit prefix).
Maybe we can keep the export_data and call the appropriate methods within it, like this:
async def export_data(
self,
path: str | Path,
*,
content_type: Literal['csv', 'json'] = 'csv',
dataset_id: str | None = None,
dataset_name: str | None = None,
**kwargs: Any,
) -> None:
if content_type == 'csv':
self.export_data_csv(path, dataset_id=dataset_id, dataset_name=dataset_name, **kwargs)
elif content_type == 'json':
self.export_data_json(path, dataset_id=dataset_id, dataset_name=dataset_name, **kwargs)
else:
raise ValueError(f'Unsupported content type: {content_type}.')
janbuchar
reviewed
Oct 10, 2024
- This adds a `get_key_value_store(id, name)` context helper to
`BasicCrawlingContext`
- Also, push_data calls are held until the request handler terminates
successfully (same as in JS version)
- This is necessary for adaptive crawling (apify#249), among other things
- rm unused pipeline - use env var for node versions (same as we do for python)
1 task
vdusek
reviewed
Oct 31, 2024
vdusek
reviewed
Oct 31, 2024
Collaborator
|
hi @deshansh can you please send me your email or ping me on apify discord? |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Issues
Testing
Checklist