Skip to content
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

Feature/49 files in version #56

Merged
merged 7 commits into from
Jan 19, 2025
Merged

Conversation

francisduvivier
Copy link
Collaborator

No description provided.

Francis Duvivier added 7 commits January 19, 2025 18:51
…migrate init up and down

- init down was not working because of the messing with the schema and migrations table. Since there was real old data to migrate anyways, I just simplified it by cleaning up tables instead.
- The mockup data was hard to update without makeing all value completely new, this causes a hard to review git diffs. So in this commit, I have changed the script that creates the mock data to be deterministic while still having semi-random varied data.
  - Note that even though the data in the DB is now deterministic, the mockup-data.sql that is created by pg_dump is still not deterministic because it just dumps the data in disk order. However, in testing locally, when doing 3 populates (yes, 3, it is not the case for 2 for some reason) and then comparing the pg_dump or the first with the last did eventually produce the same mockup-data.sql file for me.
Copy link

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 31.74% 833 / 2624
🔵 Statements 31.74% 833 / 2624
🔵 Functions 34.5% 49 / 142
🔵 Branches 81.53% 53 / 65
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
migrations/20250113193413-files-table.js 0% 0% 0% 0% 1-59
src/setupPopulateDBApi.ts 0% 0% 0% 0% 1-461
src/controllers/public-rest.ts 41.55% 100% 22.22% 41.55% 46-47, 54-65, 72-82, 89-93, 100-105, 112-115, 122-126
src/db/PostgreSQLBadgeHubMetadata.ts 18.44% 100% 12.5% 18.44% 53-82, 85-89, 92-93, 103-131, 134-148, 151-155, 158-162, 165-179, 182-192, 195-198, 201-206, 209-214, 217-249, 252-253, 256-257, 279-311, 314-327, 330-345, 348-352
src/db/models/app/DBFileMetadata.ts 100% 100% 100% 100%
src/db/models/app/DBProject.ts 100% 100% 100% 100%
src/db/sqlHelpers/projectQuery.ts 13.51% 100% 0% 13.51% 12-36, 39-68
src/domain/BadgeHubData.ts 21.31% 100% 10.52% 21.31% 29-30, 33-34, 37-41, 44-45, 50-51, 54-55, 58-59, 62-63, 66-67, 70-83, 86-91, 98-99, 106-108, 111-128, 131-134, 137-154, 157-170
src/domain/BadgeHubMetadata.ts 100% 100% 100% 100%
src/domain/readModels/app/Category.ts 100% 100% 100% 100%
src/domain/readModels/app/FileMetadata.ts 100% 100% 100% 100%
src/domain/readModels/app/Project.ts 100% 100% 100% 100%
src/util/digests.ts 100% 100% 100% 100%
Generated in workflow #105 for commit 5649b0a by the Vitest Coverage Report Action

@francisduvivier francisduvivier linked an issue Jan 19, 2025 that may be closed by this pull request
@francisduvivier francisduvivier merged commit 2ae6feb into main Jan 19, 2025
3 checks passed
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.

REST API: Version File Listing
1 participant