JRavi2 / Chat-Analyzer

A python program to analyze your Social Chats
12 stars 8 forks source link

Added Telegram test chats (WIP) #14

Open asaraf7 opened 2 years ago

JRavi2 commented 2 years ago

@asaraf7 Apologies for the delayed response. How exactly did you export the data? The exported data is supposed to have a format like this:

{
  "about": "...",
  "chats: {
    "about": "...",
    "list": [
      {
        "name": "Chat Name",
        "type": "Chat Type",
        "id": 12334,
        "messages": [...]
      }
    ]
}

The file that you've uploaded just has the "messages" part. In order for the program to recognize the export type, the format has to be similar to the one above.

asaraf7 commented 2 years ago

Yes, I have purposely kept the messages part only. If its okay, then I'll add the initial key-value pairs manually. That isn't a big deal

JRavi2 commented 2 years ago

@asaraf7 Yup, the messages part looks fine for now.

asaraf7 commented 2 years ago

Please check now. Sorry for delay.

JRavi2 commented 2 years ago

Great! Now you can add the tests in. You can use the previously added tests for WhatsApp and Signal for reference. Let me know if you need any help with them :)

asaraf7 commented 2 years ago

I've added the modified Tests for Telegram. If the PR seems okay, you can merge it.

JRavi2 commented 2 years ago

I think you're a bit confused about what tests are. Tests (in this case integration tests to be specific) are program(s) (tests/tests.py) that run the main program on some sample inputs (in this case the chat exports in tests/test_chats) and validate the output against the expected output.

Currently, in this PR, only the test data has been added. The actual tests which validate the output of the program are yet to be added.

asaraf7 commented 2 years ago

I think you're a bit confused about what tests are. Tests (in this case integration tests to be specific) are program(s) (tests/tests.py) that run the main program on some sample inputs (in this case the chat exports in tests/test_chats) and validate the output against the expected output.

Currently, in this PR, only the test data has been added. The actual tests which validate the output of the program are yet to be added.

Oh I see! So, in tests.py there are classes for Whatsapp, and signal. And you want me to add a similar one for telegram too? Am i correct?

JRavi2 commented 2 years ago

Yup, exactly!

asaraf7 commented 2 years ago

Yup, exactly!

Please give me some more time, since I'll have to get familiarized with some modules in your code.

JRavi2 commented 2 years ago

Sure, take as much time as you need. Lemme know if you need any help :)