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

Create conversation object #11

Merged
merged 11 commits into from
Nov 29, 2014
Merged

Create conversation object #11

merged 11 commits into from
Nov 29, 2014

Conversation

gunthercox
Copy link
Owner

The goal for this pull request is to create an object that can be used to make managing conversations easier and more efficient.

I've also...

  • Increased the selection of html characters that get converted to ASCII
  • Fixed issue with while loop running forever because of recursive calls
  • Updated the Engram selector algorithm to use the new conversation objects
  • Seriously improved the modularity and maintainability of the codebase

@gunthercox gunthercox changed the title Fixed issue with while loop running forever because of recursive calls Create conversation object Nov 24, 2014
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.18%) when pulling 8869ca5 on conversation into 9719512 on master.

@coveralls
Copy link

Coverage Status

Coverage increased (+4.07%) when pulling 81b327e on conversation into 9719512 on master.

@coveralls
Copy link

Coverage Status

Coverage increased (+6.8%) when pulling 3649cd1 on conversation into 9719512 on master.

from fuzzywuzzy import process
import os
import csv
from conversation import Conversation
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be either chatterbox.conversation or .conversation in order for it to work in Python 3.

Copy link
Owner Author

Choose a reason for hiding this comment

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

Thanks 👍

@coveralls
Copy link

Coverage Status

Coverage increased (+7.13%) when pulling f820a45 on conversation into 9719512 on master.

self.TIMESTAMP = self.timestamp()
fmt = "%Y-%m-%d-%H-%M-%S"

self.TIMESTAMP = str(datetime.datetime.now().strftime(fmt))
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't strftime return a string?

Copy link
Owner Author

Choose a reason for hiding this comment

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

Right, it does.

@coveralls
Copy link

Coverage Status

Coverage increased (+9.46%) when pulling 7172173 on conversation into 9719512 on master.

text = re.sub(r'http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+', '', text)
try:
text = unicode(text)
except ImportError:
Copy link
Contributor

Choose a reason for hiding this comment

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

A NameError is actually thrown here, as Python can't find anything named unicode.

Copy link
Owner Author

Choose a reason for hiding this comment

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

Yeah, I actually have that change made locally. Haven't pushed up the change yet though.

@coveralls
Copy link

Coverage Status

Coverage increased (+8.64%) when pulling 10a07a2 on conversation into 9719512 on master.

@coveralls
Copy link

Coverage Status

Coverage increased (+8.86%) when pulling ffec9a6 on conversation into 9719512 on master.

gunthercox added a commit that referenced this pull request Nov 29, 2014
@gunthercox gunthercox merged commit a986a44 into master Nov 29, 2014
@gunthercox gunthercox deleted the conversation branch November 29, 2014 18:59
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.

None yet

3 participants