-
-
Notifications
You must be signed in to change notification settings - Fork 683
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
[WIP] Data importer #6911
Open
SchrodingersGat
wants to merge
172
commits into
inventree:master
Choose a base branch
from
SchrodingersGat:data-importer
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[WIP] Data importer #6911
+2,735
−276
Conversation
This file contains 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
Expose to admin interface also
- Use @register_importer tag for any serializer class
- Do not use one-time hard-coded values here
- Must be importable by tablib
- Remove "progress" field (will be calculated) - Added "timestamp" field - Added "complete" field to DataImportRow
- Provide "sensible" default values
- For large data files this may take a significant amount of time - Offload it to the background worker process
- Add "columns" field to DataImportSession - Add "errors" field to DataImportRow
- Simpler validation
- Ignore importer models in import/export
…into data-importer
- New mantine version requires string values
2 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
api
Relates to the API
enhancement
This is an suggested enhancement or new feature
Fund
This issue can be specifically funded for development
import / export
Data importing, exporting and processing
roadmap
This is a roadmap feature with no immediate plans for implementation
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.
This PR represents a major change in approach to how we import / export data.
Previously we have relied on external libraries for importing / exporting - which all come with various downsides.
The main idea of this PR is to utilize the existing DRF API framework for both importing and exporting of data. This should provide the following major advantages:
Framework
Uses existing DRF serializers, just need to register with the
@register_importer()
decorator.Related Issues
TODO
APIDownloadMixin
class (and all references)download_queryset
method in a many existing viewsverbose_name
if serializer does not provide alabel
attributeFurther Work
django-import-export
framework entirely