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

Remove flatpath #81

Merged
merged 33 commits into from
Feb 9, 2024
Merged

Remove flatpath #81

merged 33 commits into from
Feb 9, 2024

Conversation

c-git
Copy link
Contributor

@c-git c-git commented Feb 3, 2024

This area of the code had no tests!!!

So most of this PR is restructuring the code so tests could be added.
Decided to use insta to build out the tests.
It works pretty well.
Moved the snapshots into sub folders .

  • I discovered that we can chose to move the snapshots to a folder that is not inside the src directory by changing settings... So we need to decide where we want them.

I did trade off performance by converting the response to string before deserializing it into the struct but this allows us to store strings for testing and be closer to how the actual code works.

For problem_metadata I had to move the related structs into a separate module as they had a lot of functionality and it was getting confusing.

There is a lot of repeated code but not sure if it's worth trying to remove the duplication.

I did remove some amount of duplication where if they went out of sync it would cause problems.

@c-git c-git marked this pull request as ready for review February 3, 2024 21:40
@c-git c-git changed the base branch from leetcode-values-as-raw-string to develop February 3, 2024 21:41
@c-git c-git force-pushed the remove-flatpath branch 2 times, most recently from 3339c9b to 941ae9e Compare February 5, 2024 00:52
c-git added 26 commits February 5, 2024 22:03
We don't have test for this part of the code so working on that before I can finish
Needed to separate it  from the code that deserializes it for testing
Was trying to refactor to remove flat_path but then ran into the fact
that we don't have tests for that part of the code.
So in the process of adding test but trying to be careful not to hit
the leetcode API too much
@pawarherschel
Copy link
Contributor

please update the pull request description / message

pawarherschel
pawarherschel previously approved these changes Feb 9, 2024
Copy link
Contributor

@pawarherschel pawarherschel left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@pawarherschel pawarherschel left a comment

Choose a reason for hiding this comment

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

Seems good to me 👍

@pawarherschel pawarherschel merged commit 5f02af1 into develop Feb 9, 2024
4 checks passed
@pawarherschel pawarherschel deleted the remove-flatpath branch February 9, 2024 04:50
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.

2 participants