Skip to content
This repository was archived by the owner on Jan 31, 2019. It is now read-only.

Conversation

williamsimiao
Copy link
Contributor

@williamsimiao williamsimiao commented Jul 30, 2018

PR Description

Adiciona a funcionalidade de mensagens enviadas pelo bot a fim de lembrar o usuário de conversar com o bot. O usuário pode determinar o intervalo, em dias, que deseja receber esse lembrete usando o comando \lembrete.

New Feature Submissions

To run tests locally, use make if you're on Mac or Linux.

  1. Does your submission pass all the tests?
  2. Have you lint your code locally prior to submission?
  3. Have you written proper tests to your added code?

New Dialog Submissions

User messages have - -, bot messages have -

  1. Does all your user messages have lower letters?
  2. Have you lint your dialogs locally prior to submission?
  3. Have you written proper tests to your added dialogs on test_dialogs?
  4. Does your dialog have an existing category? If not, did you create it?

Changes to Core Features

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests or modified old ones for your core changes, as applicable?
  • Have you successfully run tests with your changes locally?

@qlty-cloud-legacy
Copy link

qlty-cloud-legacy bot commented Jul 30, 2018

Code Climate has analyzed commit a232535 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 74.3% (80% is the threshold).

This pull request will bring the total coverage in the repository to 89.6% (-3.5% change).

View more on Code Climate.

@codecov
Copy link

codecov bot commented Jul 30, 2018

Codecov Report

Merging #39 into master will increase coverage by 4.56%.
The diff coverage is 91.3%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #39      +/-   ##
==========================================
+ Coverage   81.42%   85.98%   +4.56%     
==========================================
  Files           6        7       +1     
  Lines         280      364      +84     
  Branches       22       26       +4     
==========================================
+ Hits          228      313      +85     
+ Misses         45       42       -3     
- Partials        7        9       +2
Impacted Files Coverage Δ
bot/application.py 86.38% <89.47%> (+6.8%) ⬆️
bot/periodic_messages_util.py 94.28% <94.28%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4a21ca4...d6e8d2a. Read the comment docs.

Copy link
Member

@alexandrebarbaruiva alexandrebarbaruiva left a comment

Choose a reason for hiding this comment

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

Adiciona testes automatizados à sua função nova, não consegui testar manualmente na minha máquina

@williamsimiao
Copy link
Contributor Author

users_custom_invervals.json.zip
Segue um exemplo do arquivo JSON para os intervalos customizados por usuário, a chave do dicionário é o ID do usuário e o valor é o intervalo em dias.

@alexandrebarbaruiva alexandrebarbaruiva added feature New feature or request devs This issue can be done by the dev team labels Sep 12, 2018
tapumar
tapumar previously approved these changes Sep 13, 2018
@tapumar
Copy link
Member

tapumar commented Sep 17, 2018

@williamsimiao , onde o arquivo "users_custom_invervals.json" é criado?

chatID = update.message.chat_id
if (intervals_dic.get(str(chatID) is not None)):
interval = int(intervals_dic.get(str(chatID)))
except FileNotFoundError:

Choose a reason for hiding this comment

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

é preciso criar o arquivo uma vez não encontrado

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Arquivo sendo criado no ultimo commit


def callback_lets_talk(self, bot, job):
bot.send_message(chat_id=job.context.message.chat_id,
text='Vamos conversar ?')

Choose a reason for hiding this comment

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

só remover o espaço entre conversar e ?

@alexandrebarbaruiva
Copy link
Member

@williamsimiao esta PR foi criada dia 30 de julho, atualiza ela e conserta as revisões!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
devs This issue can be done by the dev team feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants