Skip to content

feat: export/import for ScrapedTags (#46)#48

Merged
astar-development-jb merged 5 commits into
mainfrom
feat/issue-46-scraped-tag-export-import
Jun 27, 2026
Merged

feat: export/import for ScrapedTags (#46)#48
astar-development-jb merged 5 commits into
mainfrom
feat/issue-46-scraped-tag-export-import

Conversation

@jaybarden1

@jaybarden1 jaybarden1 commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Mirrors existing FileClassification export/import pattern for ScrapedTag entities
  • Exports all tags to ~/Documents/Scrapper/ScrapedTags.json; imports with upsert semantics (match on Value + Category, update IncludeInSearch on existing rows)
  • Two new UI buttons in MainWindow: Export Tags / Import Tags with disable/enable lifecycle

Changes

  • ApplicationMetadata.ScrapedTagsExportFilePath — new export path; both paths switched from Path.Combine to CombinePath extension
  • DTOs/ScrapedTagExtensions — list-level ToDtos / ToDomain
  • Repositories/TagData — extracted to its own file (one type per file rule)
  • IScrapedTagRepositoryGetAllAsync + UpsertAsync (batched lookup, no N+1)
  • IScrapedTagService + ScrapedTagService — export/import via repository; wired into DI as interface
  • IImportExportServiceExportScrapedTagsToFile + ImportScrapedTagsFromFile
  • ImportExportService — implements both tag I/O methods; now sealed
  • MainWindowExportTagsButton + ImportTagsButton handlers following functional pipeline pattern

Test plan

  • 15 new unit tests (14 in GivenAnImportExportService, 1 renamed + 1 added in GivenAScrapedTagService)
  • 70 total tests, 0 failures
  • Build: 0 errors, all warnings pre-existing

Closes #46

🤖 Generated with Claude Code

jaybarden1 and others added 3 commits June 26, 2026 23:28
…ble rules

feat: add original C# developer guidelines file
fix: update settings.json to include 'graphify' in spell check
14 new tests in GivenAnImportExportService covering tag file I/O paths.
4 new tests in GivenAScrapedTagService covering export and upsert behaviour.
All fail to compile — production interfaces/classes do not exist yet.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- ApplicationMetadata.ScrapedTagsExportFilePath (~/Documents/Scrapper/ScrapedTags.json)
- DTOs/ScrapedTagExtensions: list-level ToDtos/ToDomain
- Repositories/TagData: extracted to own file (one type per file)
- IScrapedTagRepository: GetAllAsync + UpsertAsync (batched, no N+1)
- IScrapedTagService + ScrapedTagService: export/import via repository
- IImportExportService: ExportScrapedTagsToFile + ImportScrapedTagsFromFile
- ImportExportService: implements tag I/O methods; sealed
- MainWindow: ExportTagsButton + ImportTagsButton with disable/enable lifecycle
- 15 new tests (GivenAnImportExportService + GivenAScrapedTagService); 70 total, all green

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jaybarden1 jaybarden1 requested a review from a team June 27, 2026 02:15
jaybarden1 and others added 2 commits June 27, 2026 03:40
- ScrapedTagExtensions (DTOs): add single-item ToDomain/ToDto; list methods delegate to avoid duplication
- ScrapedTagExtensions (Repositories): add using aliases for all three qualified type names
- GivenAScrapedTagService: rename ActionTagCategory -> GenreCategory; simplify Returns(Task.FromResult) -> Returns
- GivenAnImportExportService: add when_importing_valid_tags_then_second_tag_category_is_mapped test

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Directory.Build.props:
- Fix test-project condition to match *.Tests.Unit / *.Tests.Integration
- Suppress CA1707 (snake_case test method names per repo convention)
- Suppress CA1859 (sut typed to interface in tests)

AStar.Dev.FunctionalParadigm:
- Split Result.cs into non-generic Result factory + Result{TResult,TError} record
  to resolve CA1000 (static members on generic type)
- Update all 9 test files to use Result.Success/Failure factory methods
- Suppress CA1716 (Option name is intentional FP convention)

AStar.Dev.Guard.Clauses:
- Rename parameter @object -> value (CA1720)

Project files:
- Remove per-project TargetFramework/Nullable/ImplicitUsings (inherited globally)
- Update xunit.runner.visualstudio 2.9.3 -> 3.0.0 (NU1603)
- Override Tmds.DBus.Protocol to 0.93.0 (NU1903)
- Suppress GHSA-2m69-gcr7-jv3q for SQLitePCLRaw (NU1903)

AStar.Dev.Wallpaper.Scrapper production:
- Fix unreachable code in SearchWorkflow/SearchWorkflowFunctional (CS0162)
- Remove unused imagePageService field in SearchWorkflowFunctional (CS0414)
- MainWindow implements IDisposable; dispose CTS on Close (CA1001)
- Add GC.SuppressFinalize to DisposeAsync in ViewModel + PlaywrightService (CA1816)
- Seal ImageSaveHelper (CA1852)
- StringComparison.OrdinalIgnoreCase in ImagePage (CA1309)
- Replace IndexOf(" ") with IndexOf(' ') in page classes (CA1865)
- Add CultureInfo.InvariantCulture to Parse/format calls (CA1305)
- FileClassificationService: client-side HashSet for OrdinalIgnoreCase matching (CA1304/CA1311/CA1862)
- StringComparison.Ordinal to StartsWith in ChromeCookieExtractor (CA1310)
- CultureInfo.InvariantCulture to Serilog sinks + StatusLogSink (CA1305)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@astar-development-jb astar-development-jb enabled auto-merge (squash) June 27, 2026 06:25
@astar-development-jb astar-development-jb merged commit 81c118f into main Jun 27, 2026
6 checks passed
@astar-development-jb astar-development-jb deleted the feat/issue-46-scraped-tag-export-import branch June 27, 2026 07:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: export/import for ScrapedTags

2 participants