Agent CSV export/import#287
Draft
lukavdplas wants to merge 5 commits into
Draft
Conversation
lukavdplas
force-pushed
the
feature/agent-export
branch
from
February 26, 2026 17:13
3e541d4 to
8f4d6e4
Compare
XanderVertegaal
left a comment
Contributor
There was a problem hiding this comment.
I love the export script with attrgetter() - very neat! 👌
I left a few comments with the import script, which may need a bit more work.
| data = { | ||
| col: get(attr)(agent) for col, attr in export_fields | ||
| } | ||
| writer.writerow(data) |
Contributor
There was a problem hiding this comment.
With my automatically generated test dataset, I see a number of duplicates:
id,name,description,source_id,source_name,historical_person
...
512,Quods,,4,Modi sit voluptate.,Rachael White-Fowler
512,Quods,,4,Modi sit voluptate.,Rachael White-Fowler
512,Quods,,4,Modi sit voluptate.,Rachael White-Fowler
512,Quods,,4,Modi sit voluptate.,Rachael White-Fowler
512,Quods,,4,Modi sit voluptate.,Rachael White-Fowler
515,Quaes,,1,Ut dolor accusantium earum.,Mr Terence Jones
515,Quaes,,1,Ut dolor accusantium earum.,Mr Terence Jones
515,Quaes,,1,Ut dolor accusantium earum.,Mr Terence Jones
...In total my CSV has 1506 lines, but I only have 801 AgentDescription rows in my DB.
I'm not sure what causes this, but it is something to check.
XanderVertegaal
approved these changes
May 27, 2026
Contributor
Author
|
For the record, I did not yet fix the duplicate problem as I've not been able to reproduce it. Let's look at this together some time. I think this PR is low-priority right now anyway, so we can see when we get around to that. |
lukavdplas
marked this pull request as draft
May 27, 2026 16:50
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.
close #270