Skip to content

Import tags #165

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
merged 3 commits into from
May 23, 2025
Merged

Import tags #165

merged 3 commits into from
May 23, 2025

Conversation

Gabe-Torres
Copy link
Collaborator

@Gabe-Torres Gabe-Torres commented May 6, 2025

What Issue Does This PR Cover, If Any?

Resolves #120

Tags are correctly imported with their original IDs
Tag names are preserved
Topic tag associations are being created correctly for topics that exist
Found 3 topics in topic_tags.csv that don't exist in topics_obfuscated.csv
Topic ID 1, Topic ID 5818, Topic ID 5819. The import_topic_tag method handles this by only creating associations for topics that exist

Something to note -
The CSV is not ordered by ID. But when we look at the first 5 tags in the database, we see sequential IDs, though the data is correct, I think.

There are 10 extra tags in the database vs CSV, which is interesting. Maybe the destroy method isn't working as it should. Is it possible this is because of seeds? It doesn't seem to affect the import process.

@Gabe-Torres Gabe-Torres self-assigned this May 6, 2025
@hernanvicente hernanvicente changed the title WIP: import_tag method Import tags May 12, 2025
@hernanvicente hernanvicente marked this pull request as ready for review May 12, 2025 08:54
- Added import_tags method to handle tag imports from tags.csv
- Added import_topic_tags method to handle topic tag associations from topic_tags.csv
- Preserved original tag IDs from tags.csv during import
Copy link
Collaborator

@hernanvicente hernanvicente left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this @Gabe-Torres, I did push a commit with some necessary changes 👍. Here my comment

@hernanvicente hernanvicente requested a review from dcollie2 May 23, 2025 12:27
@dcollie2 dcollie2 merged commit c04b86a into main May 23, 2025
4 checks passed
@dcollie2 dcollie2 deleted the 102_import_tags branch May 23, 2025 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Import tags
3 participants