Skip to content

feat(database): init normalisation tool - #205

Closed
ShaunSHamilton wants to merge 31 commits into
mainfrom
feat_mikoyan
Closed

ShaunSHamilton wants to merge 31 commits into
mainfrom
feat_mikoyan

Conversation

@ShaunSHamilton

Copy link
Copy Markdown
Member

Checklist:

@ojeytonwilliams ojeytonwilliams left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hey, @ShaunSHamilton, could you add some tests for this? The logic for updating completed challenges and so on is pretty complicated, so it would be good to see a few tests of the transformation.

Comment thread database/migrations/mikoyan/src/main.rs Resolved
@ShaunSHamilton

Copy link
Copy Markdown
Member Author

could you add some tests for this? The logic for updating completed challenges and so on is pretty complicated

I think the logic is very simple, but could add tests. I do not see myself having time anytime soon, because it is quite involved writing tests for Mongodb operations (the fixture data is annoying).

@ojeytonwilliams

Copy link
Copy Markdown
Contributor

We do need to be confident in that scripts that modify user data, and some tests would really help with that. I don't really understand Rust, but something along the lines of

let unnormalized_user = doc! { blah }
let normalized_user = doc! { blah blah}
let result = normalized_user(&unnormalized_user)
// something to assert deep equality

should be possible, shouldn't it?

@ShaunSHamilton ShaunSHamilton changed the title feat(database): init migration tool feat(database): init normalisation tool Jul 19, 2023
@naomi-lgbt

Copy link
Copy Markdown
Member

can I block this on the principle that rust doesn't belong in the codebase? 🙃

@ShaunSHamilton

Copy link
Copy Markdown
Member Author

can I block this on the principle that rust doesn't belong in the codebase? 🙃

Once TypeScript becomes correct and statically typed, I will rewrite this in it.

@socket-security

socket-security Bot commented Jun 11, 2024 •

Copy link
Copy Markdown

New dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/[email protected] environment 0 39.5 kB dabh
npm/[email protected] None 0 429 kB explodingcabbage

View full report↗︎

@ShaunSHamilton

Copy link
Copy Markdown
Member Author

Closing as this is not the direction we plan to go. A new PR will be made to handle "normalization"-type tasks

@ShaunSHamilton
ShaunSHamilton deleted the feat_mikoyan branch July 10, 2024 07:18
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.

3 participants