Deprecate `number_of_learned_words`
lauslim12 opened this issue · comments
I want to deprecate this metric because I think it's not necessary for the visualizer to have it because you cannot measure your language learning progression by number of words anyways. You can learn more words naturally and not just through Duolingo, so it's kind of like defeating the purpose of this visualizer because it will show inaccurate numbers.
Tasks:
- Adjust the Duolingo Fetcher so that it doesn't get the number of words.
- Change the Synchronizer function in
main.py
so that it doesn't do the overcomplicated if statements that we're using at the moment. Because we already deleted thenumber_of_learned_words
, synchronization shouldn't require any if statements. Transforming the response from Duolingo API to our expected format should be enough. - Probably would have to adjust the tests as well depending on the changes.
- Create script, backfill data, and adjust the existing data store, delete all of the
number_of_learned_words
properties in the array of objects. - In the existing web visualizer, delete the graph for
number_of_learned_words
and adjust the JSDoc.
Bonus:
- Perhaps implementing Pydantic is also a good idea to have an additional safety when accessing dataclasses.
Just use 1 endpoint (Probably going to be difficult to keep them in sync, so I think it's better if we just use two endpoints to reduce the complexity. We need the normal endpoint to get the User ID anyways.{BASE_URL}/2017-06-30/users/{uid}/xp_summaries?startDate=1970-01-01
), but if this is the case, we have to calculate the streak manually. We have to find a good algorithm for this.- Next step after this is done is probably to refactor the codebase into a better one by using functional-style programming instead of Object Oriented Programming like the current state.