Skip to content

Conversation

@binaryarun
Copy link
Collaborator

No description provided.

Comment on lines 205 to 206
{% prev %}
{% endprev %}
Copy link
Owner

Choose a reason for hiding this comment

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

{% prev %}Regex pattern{% endprev %}



## Previous Tags
Previous tag used to give the auto response for the chat query from the Chatbot.
Copy link
Owner

Choose a reason for hiding this comment

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

Previous tag is used to match previous bot message. A regex pattern is added between {% prev %} and {% endprev %}

setup.py Outdated

from setuptools import setup

version = __import__('chatbot.version').__version__
Copy link
Owner

Choose a reason for hiding this comment

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

use run_path instead of __import__

Comment on lines 37 to 52
1. response block

Sample response for the above user input.

```
{% response %}Please tell me more.{% endresponse %}
{% response %}Let's change focus a bit... Tell me about your family.{% endresponse %}
{% response %}Can you elaborate on that?{% endresponse %}
{% response %}Why do you say that %0?{% endresponse %}
{% response %}I see.{% endresponse %}
{% response %}Very interesting.{% endresponse %}
{% response %}%0.{% endresponse %}
{% response %}I see. And what does that tell you?{% endresponse %}
{% response %}How does that make you feel?{% endresponse %}
{% response %}How do you feel when you say that?{% endresponse %}
```
Copy link
Owner

@ahmadfaizalbh ahmadfaizalbh Jul 11, 2021

Choose a reason for hiding this comment

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

Inappropriate please fix

@ahmadfaizalbh ahmadfaizalbh marked this pull request as draft October 24, 2021 05:20
@sourcery-ai
Copy link

sourcery-ai bot commented Nov 14, 2021

Sourcery Code Quality Report

✅  Merging this PR will increase code quality in the affected files by 0.17%.

Quality metrics Before After Change
Complexity 9.27 🙂 9.19 🙂 -0.08 👍
Method Length 75.69 🙂 76.44 🙂 0.75 👎
Working memory 10.71 😞 10.68 😞 -0.03 👍
Quality 57.94% 🙂 58.11% 🙂 0.17% 👍
Other metrics Before After Change
Lines 1003 1046 43
Changed files Quality Before Quality After Quality Change
setup.py 54.66% 🙂 49.85% 😞 -4.81% 👎
chatbot/init.py 57.81% 🙂 57.80% 🙂 -0.01% 👎
chatbot/constants.py 96.68% ⭐ 94.23% ⭐ -2.45% 👎

Here are some functions in these files that still need a tune-up:

File Function Complexity Length Working Memory Quality Recommendation
chatbot/init.py Chat._get_within 29 😞 231 ⛔ 15 😞 25.07% 😞 Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
chatbot/init.py Chat.__generate_and_write_template 20 😞 208 ⛔ 15 😞 32.04% 😞 Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
chatbot/init.py Chat.__block_tags 14 🙂 256 ⛔ 15 😞 33.87% 😞 Try splitting into smaller methods. Extract out complex expressions
chatbot/init.py Chat.__process_learn 23 😞 185 😞 13 😞 34.47% 😞 Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
chatbot/init.py Chat._check_and_evaluate_condition 14 🙂 214 ⛔ 15 😞 36.30% 😞 Try splitting into smaller methods. Extract out complex expressions

Legend and Explanation

The emojis denote the absolute quality of the code:

  • ⭐ excellent
  • 🙂 good
  • 😞 poor
  • ⛔ very poor

The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request.


Please see our documentation here for details on how these metrics are calculated.

We are actively working on this report - lots more documentation and extra metrics to come!

Help us improve this quality report!

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