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

Added Slack DM ability to self.say #375

Open
wants to merge 245 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
245 commits
Select commit Hold shift + click to select a range
afd8457
Fix world time plugin
woohgit Oct 8, 2017
16b325f
WorldTime plugin does not require API keys
woohgit Oct 8, 2017
b774d83
Handle errors/exceptions too
woohgit Oct 8, 2017
5f86669
strip HTML tags for shell backend
woohgit Oct 8, 2017
c068a6a
Merge pull request #285 from woohgit/google_worldtime
skoczen Oct 9, 2017
24f4182
Merge pull request #287 from woohgit/strip_html_tags_for_shell_backend
skoczen Oct 9, 2017
3e63f77
Merge pull request #276 from mike-love/feature/dockerized
skoczen Oct 9, 2017
2ed4488
v1.0.1 release, with credits
Oct 9, 2017
437d92d
Fixes merge conflicts
Oct 9, 2017
1d092a3
Merge branch 'Tenzer-all-the-changes'
Oct 9, 2017
db3b483
Adds tox to dev reqs, and circle
Oct 9, 2017
d3c3c4e
Adds symlink support for cleanup
Oct 9, 2017
fb37ac9
Merges in py3 and master changes. (MASSIVE CONFLICTS)
Oct 9, 2017
576073c
Cleanup from style choices I didn't quite agree with, prints in 2.x, …
Oct 9, 2017
52fb864
Uses built-in html_to_text
Oct 9, 2017
bc2901d
Fixes up tests.
Oct 9, 2017
7d173fc
Friendlier location output
Oct 9, 2017
a9ab4ab
Merge pull request #288 from skoczen/feature/merges-in-py3
skoczen Oct 9, 2017
fb62839
Teaches will how to reply in slack threads.
Oct 10, 2017
45dd899
Merge branch 'feature/merges-in-py3' into feature/shell-backend
Oct 10, 2017
6695210
Finishes teaching Will how to handle threads in slack, and adds a bit…
Oct 10, 2017
b497f45
Handles mentions, even when the slack app doesn't auto-link.
Oct 10, 2017
588ab56
Minorly clean up will.plugin
wontonst Oct 10, 2017
008f329
Allow will.plugin.WillPlugin.say to accept a string room param
wontonst Oct 10, 2017
fcb9df3
Merge branch 'master' into master
chillipeper Oct 15, 2017
33a76e7
Adding custom filters support for jinja2 rendered_template decorator
Oct 15, 2017
6131f3b
Readme rendered_template update
Oct 15, 2017
a7047ed
Pulls handle_regexes
skoczen Oct 15, 2017
62aa87b
Renames and cleans up data.source mess, and makes SECRET_KEY automagi…
skoczen Oct 18, 2017
d5f11ff
Adds deprecation warnings for admin_only.
skoczen Oct 18, 2017
811c4ad
Encrypt by default
skoczen Oct 18, 2017
ebe836b
ACL 2.0
skoczen Oct 18, 2017
f11a4dc
Detects and auto-moves config.py.dist to config.py
skoczen Oct 18, 2017
534bf9b
Daaaamn. Will now auto-tracks replies. Simple as self.reply("Oh, hi!")
skoczen Oct 18, 2017
6e37740
Wipes all the old .reply(message, "actual reply") syntax out of the b…
skoczen Oct 18, 2017
ca22f97
Moves Roster to HipchatRoster, provides defaults for WILL_HANDLE, cle…
skoczen Oct 18, 2017
230f6d3
Moves RosterMixin, cleans up docs
skoczen Oct 18, 2017
2f1cbc2
Sorts a couple of the rocketchat TODOs
skoczen Oct 19, 2017
10db469
Merges in master, resolves conflicts, removes ListenerMixin.
skoczen Oct 19, 2017
984bd5e
Partway to fixed tests
skoczen Oct 19, 2017
f9c7f50
Adds pytz, locks sleekxmpp to 1.3.2
skoczen Oct 19, 2017
291ce60
Moves to original_incoming_event
skoczen Oct 19, 2017
1fc32cd
Main-room hipchat working.
skoczen Oct 19, 2017
cf9106c
Wires will up to hipchat private rooms with current spec
skoczen Oct 19, 2017
35e5754
Makes sure card is added.
skoczen Oct 19, 2017
d1d342c
Remind me working on all platforms, adds mention_handle to take care …
skoczen Oct 19, 2017
5eac5b2
Updates readme for 2.x
skoczen Oct 19, 2017
9468ecb
Attempt at start of weird hipchat bug.
skoczen Oct 20, 2017
7b01e95
Moves to EncryptionMixin, but it's not fully baked yet and I don't wa…
skoczen Oct 20, 2017
65290d2
Handles history null state
skoczen Oct 20, 2017
9482f7c
Merge remote-tracking branch 'upstream/master'
Oct 20, 2017
1e54430
Add Roy Zheng to AUTHORS, clean up trailing slashes
wontonst Oct 20, 2017
775e079
Provide a fallback in case yappi isn't installed.
skoczen Oct 22, 2017
8587846
Adds support for slack to specify by channel name or ID, as well as t…
skoczen Oct 23, 2017
5bf3298
Adds abstracted topic support, cleans up the worst bits left.
skoczen Oct 23, 2017
90ecd1d
Hipchat abstraction and cleanup
skoczen Oct 23, 2017
332e350
Merge branch 'feature/shell-backend' into feature/encrytion-mixin
skoczen Oct 23, 2017
5f14c47
Encryption mixin and storage working!
skoczen Oct 23, 2017
a777bc9
De-base64
skoczen Oct 23, 2017
706b256
Streamline, don't store in memory
skoczen Oct 23, 2017
fe6750d
Cleans up config.py documentation
skoczen Oct 23, 2017
6689a54
Gets tests passing.
skoczen Oct 24, 2017
f837d9d
Moves Room->HipChatRoom, consistency on HipChat
skoczen Oct 24, 2017
0366bfd
No longer require HIPCHAT_HANDLE or HIPCHAT_NAME, automatically get t…
skoczen Oct 24, 2017
26e57d8
Handles UTF8 in docstrings, provides room/channel fallbacks.
skoczen Oct 24, 2017
291eacc
Merge pull request #290 from wontonst/master
skoczen Oct 24, 2017
9c3c9dc
Merge pull request #291 from chillipeper/master
skoczen Oct 24, 2017
482da19
1.0.2 credits and version
skoczen Oct 24, 2017
71eaed8
Merge branch 'master' of github.com:skoczen/will
skoczen Oct 24, 2017
ddffaea
Ignores E722
skoczen Oct 24, 2017
502f44f
Adds docs for 1.0.2
skoczen Oct 24, 2017
a71711b
Adds missing paren.
skoczen Oct 24, 2017
98b4267
Merges in master and 1.0.2
skoczen Oct 24, 2017
7b688ab
Ports @wontonst 's room= improvements to 2.x
skoczen Oct 24, 2017
a01c584
Merge branch 'master' of github.com:skoczen/will
Oct 24, 2017
11e1775
Merge branch 'feature/shell-backend' of github.com:skoczen/will
Oct 24, 2017
a696afa
Fixes up rocket.chat, adds routing, gets code to same patterns, provi…
skoczen Oct 25, 2017
0092b42
Pep8 and Birthday :)
skoczen Oct 25, 2017
cc656a5
Moves reqs to a folder, moves profile to an arg.
skoczen Oct 25, 2017
21e0b6c
Updates circle with reqs folder
skoczen Oct 25, 2017
357fea5
Adds `service=` argument to .say() and similar, adds warnings if .rep…
skoczen Oct 25, 2017
425ec4d
Defaults to all reqs, updates config.py.dist, provides fallbacks for …
skoczen Oct 25, 2017
793a4af
Swaps to REQS_DIR
skoczen Oct 25, 2017
62fc8fc
Updates MANIFEST.in with new reqs structure, requests version.
skoczen Oct 25, 2017
b2e94a2
pulls eggs for testing
skoczen Oct 26, 2017
2c46496
Merge branch 'feature/shell-backend' of github.com:skoczen/will
Oct 26, 2017
d26792f
pull from docker base; allow branch as arg
Oct 26, 2017
bbb2d0a
fixed alpine typo
Oct 26, 2017
7c0e6d2
moved to python2.7 to enable beta2.0 version'
Oct 26, 2017
c83250b
move to base-2.7 to break out versions of python
Oct 26, 2017
d1bf6db
Moves to forked markdownify for 3.x support until PR is merged
skoczen Oct 26, 2017
3d474ef
Code cleanup
skoczen Oct 26, 2017
a9c0620
Bit more cleanup
skoczen Oct 26, 2017
c772e95
Explicitly notes that ZeroMQ won't be in 2.0.1.
skoczen Oct 26, 2017
b4258d6
Gets generate_will_project working smoothly, starts re-support of pyt…
skoczen Oct 27, 2017
8f6fc0b
Mostly gets things working in python 3
skoczen Oct 27, 2017
d18e832
Gets images to python 3 compatability
skoczen Oct 27, 2017
c7280c3
Fixes flake8
skoczen Oct 27, 2017
b07f9ac
Merge branch 'feature/shell-backend' of github.com:skoczen/will
Oct 28, 2017
723b9fc
Updates setup to handle forked packages, adds some birthday magic.
skoczen Nov 1, 2017
a3dc61c
Much better handling for startup when you're upgrading from Will v1 a…
skoczen Nov 1, 2017
6a6ff80
Adds default settings for Fuzziness.
skoczen Nov 1, 2017
2072d49
Fixes pep8
skoczen Nov 1, 2017
8677a6e
Documentation time!
skoczen Nov 1, 2017
1df6774
req cleanup
skoczen Nov 2, 2017
82ebed0
Moves to temporary forks
skoczen Nov 2, 2017
c46eec5
Adds upgrade to 2.x docs
skoczen Nov 2, 2017
54d7c1b
Documentation for 2.0.1beta1 release
skoczen Nov 2, 2017
deead3f
Lots of docs, consistency in backend method names
skoczen Nov 2, 2017
d4222bf
Fully fleshed out docs :)
skoczen Nov 2, 2017
a30c61e
ignore testing file so i do not stupidly commit passwords
Nov 3, 2017
b6e75b7
moving to a multi py version dist method
Nov 3, 2017
589fb02
create a base image for will that pulls from py2 alpine repo
Nov 3, 2017
9f3f22a
create a base image for will that pulls from py3 alpine repo
Nov 3, 2017
6cdda8e
create a will container definition that will pull from the will-base:py3
Nov 3, 2017
fdea72c
create a will container definition that will pull from the will-base:py2
Nov 3, 2017
8da567e
update docker compose to use latest image
Nov 3, 2017
fbf25b9
pull from docker base; allow branch as arg
Oct 26, 2017
98ba11c
fixed alpine typo
Oct 26, 2017
f9f570d
moved to python2.7 to enable beta2.0 version'
Oct 26, 2017
beef8a9
move to base-2.7 to break out versions of python
Oct 26, 2017
3edd39b
Merge branch 'feature/docker-updates' of github.com:mike-love/will in…
Nov 3, 2017
b016ae1
updates for new params and dist
Nov 3, 2017
80f3dd1
docker updates for new dist methods
Nov 3, 2017
2390d17
Merge branch 'feature/dockerized' into feature/docker-updates
Nov 3, 2017
d232dca
Interactive generation, documentation nav and transitions.
skoczen Nov 3, 2017
7d391a8
Documentation for all backends in, smarter generate_will - maybe the …
skoczen Nov 4, 2017
9e5774c
Tightens up docs
skoczen Nov 4, 2017
4723077
cleanup docker deployment docs & add the dockerfile specific instruct…
Nov 6, 2017
d387fbb
remove redundant 2.x in place of the more specific 2.7
Nov 6, 2017
0ebf013
cleanup docker deployment docs & add the dockerfile specific instruct…
Nov 6, 2017
1c84ed3
docker platform section is unnecessary we can just add to deploy
Nov 6, 2017
ea79528
Documents Slack token
skoczen Nov 6, 2017
c1fe3fe
Merge pull request #299 from mike-love/feature/docker-updates
skoczen Nov 6, 2017
fcc6924
Merge pull request #258 from skoczen/feature/shell-backend
skoczen Nov 6, 2017
974d43f
Updates release date and formatting
skoczen Nov 6, 2017
1106782
Documentation for Will 2.0 cleanup
skoczen Nov 6, 2017
023b036
Pulls builtin bonjour, doc formatting
skoczen Nov 6, 2017
4ec5e9c
Adds transition
skoczen Nov 6, 2017
78c7232
Merge branch 'master' of github.com:skoczen/will into HEAD
Nov 6, 2017
9a74df8
pipe yes to installer to get around interactive commands
Nov 7, 2017
2717331
add to latest dockerfile as well
Nov 7, 2017
633c41e
add to latest dockerfile as well
Nov 7, 2017
3d0f37c
Merge branch 'bugfix/dockerbuildprompts' of github.com:mike-love/will…
Nov 7, 2017
8750238
Start of 2.1 branch
skoczen Nov 8, 2017
45d2b7b
Bugfixes, 2.0.1-beta2 bump.
skoczen Nov 8, 2017
5d310f4
Merge pull request #301 from mike-love/bugfix/dockerbuildprompts
skoczen Nov 8, 2017
97bd732
Adds docs
skoczen Nov 8, 2017
3eaed59
Merges in master
skoczen Nov 8, 2017
5347fc8
Conditional on input loop.
skoczen Nov 12, 2017
68eecc7
Bumps version number, markdownify release.
skoczen Nov 12, 2017
b083174
Merge pull request #305 from skoczen/bugfix/cpu
skoczen Nov 12, 2017
d52f4a5
create build script
Nov 7, 2017
89363c9
add build to script
Nov 7, 2017
6a15c70
not always called from the right dir; need to get the script director…
Nov 7, 2017
877c075
now we should fail the build when a docker build fails
Nov 7, 2017
9892e09
add commit tag for tracking build details
Nov 9, 2017
5e95f44
add deployment and export the commit tag from non-production
Nov 9, 2017
683b159
fixed missing `
Nov 9, 2017
c317378
simplify this and correct dumb mistakes
Nov 9, 2017
249dbbb
wrong env var for the commit
Nov 9, 2017
995d9dc
will base being moved to own project
Nov 16, 2017
cdc41fe
build script will build locally from a remote branch tags and pushes …
Nov 16, 2017
3823bc1
GTAG does not make sense using CTAG for commit tag
Nov 16, 2017
7c33ed3
make the source repo a build arg
Nov 17, 2017
f64221e
make the source repo a build arg
Nov 17, 2017
9560f55
btag should be ctag and reflect the commit
Nov 17, 2017
553b870
update for added build arg
Nov 17, 2017
a81fe85
Adds start_thread, fixes color passing.
skoczen Nov 20, 2017
c23f2b2
Fixes inline linking for slack
skoczen Nov 20, 2017
6f59b5c
Documentation for 2.0.1b4
skoczen Nov 20, 2017
a822621
Little bit of magic, and instruction for handling start_thread in cas…
skoczen Nov 20, 2017
265553d
Merge pull request #309 from skoczen/release/2.0.1b4
skoczen Nov 20, 2017
4ba1b48
Adds docker cloud encrypted creds
skoczen Nov 20, 2017
a1171d8
2.0.1 release - pulls beta.
skoczen Nov 21, 2017
95d5514
Fixes hipchat all rooms bug, bumps to 2.0.2.
skoczen Nov 22, 2017
44599c0
Merge pull request #302 from mike-love/feature/travis-dockerbuild
skoczen Nov 22, 2017
c637296
Merge branch 'master' into feature/encrypted-credentials
skoczen Nov 22, 2017
61c4dea
Merge pull request #311 from skoczen/feature/encrypted-credentials
skoczen Nov 22, 2017
9170aa4
Updates travis docker encrypted pass
skoczen Nov 22, 2017
576fa29
All in one for travis build
skoczen Nov 22, 2017
6a39599
Updates build syntax on docker build script
skoczen Nov 22, 2017
5412eac
Shifts to beta to get master passing
skoczen Nov 23, 2017
a642d41
Switches to fabric command.
skoczen Nov 24, 2017
4a77b33
Fixes pep8
skoczen Nov 24, 2017
35bc23d
Adds dev reqs
skoczen Nov 24, 2017
ffc4d3c
Path prefix
skoczen Nov 24, 2017
fee4f5b
Adds docker as a service
skoczen Nov 24, 2017
3ade333
Updates to ctag name
skoczen Nov 24, 2017
a9faf09
Fixes args
skoczen Nov 24, 2017
ec37c3d
Adds latest
skoczen Nov 24, 2017
ca8733e
Switches to right tags
skoczen Nov 27, 2017
f43fdb9
Fully pulls base
skoczen Nov 27, 2017
00f1f6a
Shifts to base markdownify.
skoczen Nov 27, 2017
9109a48
Fixes py3 for dev mode
skoczen Nov 27, 2017
3e9a2f8
Adds docker login
skoczen Nov 28, 2017
7491140
Updates to 2.1, documents docker hub
skoczen Nov 28, 2017
b845a3d
Merge pull request #316 from skoczen/beta
skoczen Nov 28, 2017
97e174e
save "all_listener_regexes" to storage
acommasplice Dec 6, 2017
3a3da67
Attempt to work around WebSocketConnectionClosedException for slack
Feb 11, 2018
bd7b279
Fix for #337
netjunki Feb 24, 2018
c94f301
Candidate fix for #336 and #306
ostracon Mar 7, 2018
25dc27b
Merge pull request #339 from netjunki/patch-1
skoczen Mar 19, 2018
acdcead
Update AUTHORS
acommasplice Mar 19, 2018
3ba3b91
Merge pull request #325 from acommasplice/patch-1
skoczen Mar 19, 2018
64d8424
Merge pull request #340 from ostracon/master
skoczen Mar 21, 2018
1498a6b
Merge pull request #333 from mattcl/slack-reconnects
skoczen Mar 21, 2018
374ca8d
Sets up for 2.1.1
skoczen Mar 22, 2018
1ce6955
Fixes #332
skoczen Mar 22, 2018
3af1474
Sets confidence to 91, fixes the life-affirming #327.
skoczen Mar 22, 2018
babfb72
Fixes up tests, sets release date.
skoczen Mar 22, 2018
9a375c7
Fixes ctag import
skoczen Mar 22, 2018
b6b6c06
Use python3 str type check in hipchat room str conversion
wontonst Mar 29, 2018
ac18c24
Merge pull request #343 from wontonst/fix_py2_basestring
skoczen Mar 29, 2018
62dda7c
2.1.2 credits
skoczen Mar 29, 2018
15967f5
Add --backends option to generate_will_project
wontonst Apr 2, 2018
00ce1cc
Correct Slack default channel setting
reist Apr 23, 2018
d418c86
scheduled reminders should notify the user who requested them
unicolet May 2, 2018
be3aca3
Added support for slack attachments
eosman-tibco May 17, 2018
97970a2
Improve Slack Connection handling
eosman-tibco May 18, 2018
7b62ab3
Fixed import path
eosman-tibco May 28, 2018
dd5c461
credit
unicolet Jun 6, 2018
1cb02a9
Added contribution credit
Ashex Jun 6, 2018
599e8ea
Add self to authors
reist Jun 7, 2018
437f8be
Fix fabfile with new Fabric v2
reist Jun 7, 2018
9210307
Make channel logic more robust
reist Jun 7, 2018
eba732d
Merge pull request #363 from seekingalpha/fabric-2
skoczen Jun 13, 2018
2da427a
Merge pull request #351 from Ashex/slack_attachments
skoczen Jun 13, 2018
22150eb
Merge pull request #362 from seekingalpha/fix-slack
skoczen Jun 13, 2018
bdd2e6b
Merge branch 'master' into issue_348_notify_for_remind
skoczen Jun 13, 2018
1e55530
Merge pull request #349 from unicolet/issue_348_notify_for_remind
skoczen Jun 13, 2018
490ebbd
Merge pull request #345 from wontonst/will_generate_project_backends
skoczen Jun 13, 2018
6af8104
Merge branch 'master' into slack_reconnect
skoczen Jun 13, 2018
fb4de83
Merge pull request #353 from Ashex/slack_reconnect
skoczen Jun 13, 2018
cfea0f5
Adds release notes, authors, and version bump for 2.1.3.
skoczen Jun 13, 2018
dac4b60
Adds libffi-dev
skoczen Jun 13, 2018
c56df36
Moves to `before_install`
skoczen Jun 13, 2018
16036e0
Adds libffi-dev to dockerfiles.
skoczen Jun 13, 2018
4b4c364
Pulls docker builds for now.
skoczen Jun 13, 2018
15c8a32
Just pulls deploy block from docker for simplicity.
skoczen Jun 13, 2018
920a1d1
Fixes comma string bug.
skoczen Jun 13, 2018
9daf781
Moves back to fabric 1 :(
skoczen Jun 13, 2018
a35c2a8
Pulls fabric 2 from release (for now).
skoczen Jun 13, 2018
aa85060
Fixes lcd syntax.
skoczen Jun 13, 2018
fb58579
Added Slack DM ability to self.say
Jul 24, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Documentation time!
  • Loading branch information
skoczen committed Nov 1, 2017
commit 8677a6edc8cc45425175c1ce96216b3944d1f471
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ Eventually, you'll reach this screen of joy. Now, it's time to play!

#### Testing will out

Once your will is up and running, hop into any of your hipchat rooms, and say hello!
Once your will is up and running, hop into any of your chat rooms, and say hello!

`@will hi`

Expand Down
129 changes: 129 additions & 0 deletions docs/platforms/ubuntu.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
<img align="right" src="img/will-head.png" alt="Will's smiling face" title="Will's smiling face" class="will_head" />


# Meet Will

Will is the friendliest, easiest-to-teach bot you've ever used. He works on hipchat, in rooms and 1-1 chats.

He makes teaching your chat bot this simple:

```
@respond_to("hi")
def say_hello(self, message):
self.say("oh, hello!")
```

Lots of batteries are included, and you can get your own will up and running in a couple of minutes.

Will started by [Steven Skoczen](http://www.inkandfeet.com), and has been [contributed to by lots of folks](improve.md#shoulders).

Check out the quickstart below!

<div style="width:100%;clear:both;"></div>

# Quickstart

Here's how to set up your system and get will running. If you already write python, it'll probably take less than 5 minutes.

---

## Install prerequisites

Will doesn't need much, just python and a place to store things.

Will can store stuff in Redis, Couchbase, or local storage. Our recommended backend is redis, and we'll describe getting it set up below. [Information on using Couchbase or local storage is here](deploy.md#Storage-Backends).

#### Install redis > 2.4

Official documentation is at [redis.io](http://redis.io/).

If you're on Mac OS X, and using [homebrew](http://brew.sh/), you can simply:

```bash
brew install redis
```

On a Redhat (RHEL, Centos, Fedora) machine you can:

```bash
sudo yum install redis
sudo service redis enable
sudo service redis start
```

On a Debian (Ubuntu, Mint, KNOPPIX) machine to properly install follow the [Redis Quickstart](http://redis.io/topics/quickstart). But you can start more quickly with:

```bash
sudo apt-get install redis-server
redis-server
```

#### Install python > 2.6

Most modern operating systems (Mac OS X, Linux, BSDs, etc) ship with python installed, but if you don't have it, all the info is at [python.org](https://www.python.org/).

#### Install virtualenv

Virtualenv is a tool that lets you keep different python projects separate. It is highly recommended for will (and all other python development!)

The python guide has [a great tutorial on virtualenv](http://docs.python-guide.org/en/latest/dev/virtualenvs/), if you don't already have it running. I'd recommend installing the excellent `virtualenvwrapper` library it mentions as well.

#### Set up a virtualenv for will

If you are using virtualenv wrapper:

```bash
$ mkproject my_will
# ... some output, setting up the virtualenv
$ workon my_will
(my_will) $
```

You're now all ready to install will!



## Get will running locally

#### Setting up the project

Installing will is simple easy. Ready? Go!

From your virtualenv and the folder you want to set up your will in,

```bash
(my_will) $ pip install will
# ... output from a bunch of pip libraries installing

(my_will) $ generate_will_project
# ... output from will making your new project

(my_will) $ ./run_will.py
# .. the magic begins
```

That's it!

Note that the first time you run, you'll probably be missing some configuration. That's OK - `run_will` will check your environment, and walk you through getting and setting any necessary config. We'll go through the nitty-gritty later, but if you have any odd setup problems, look in `config.py` - that's where all of the non-sensitive data is stored.

![Uninitialized Environment output](img/uninitialized_env.gif)
This is totally normal output.

Eventually, you'll reach this screen of joy. Now, it's time to play!

![Screen of Joy](img/screen_of_joy.gif)

#### Testing will out

Once your will is up and running, hop into any of your hipchat rooms, and say hello!

`@will hi`

![Hi, Will](img/hi.gif)

`@will help`

![Help, will](img/help.gif)

You're up and running - now it's time to [teach your will a few things](plugins/basics.md)!

131 changes: 131 additions & 0 deletions docs/platforms/upgrading.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
# Upgrading from Will 1.0

Will 2.0 is finally here, and its main goal was to free people using Will from being locked into a single chat provider, and add some more flexibility to his brain. You can read the [release announcement](https://heywill.io/will2) for a bit more context!

While Will has picked up a bunch of features and improvements in 2.0, we've aimed to keep him backwards-compatable with 1.x and 0.x releases. If you weren't using any undocumented internal methods, upgrading should be as easy as:

```
pip install --upgrade will
```

From there, you can just `./run_will.py`, and things should Just Work.

You will, however, see a lot of output from Will, telling you that some names have changed, and asking you to update them in your config.py when you have time. You can either just follow those instructions, or the guide below.

## Updating your settings to Will 2

There are two big changes in the settings from Will 1 to Will 2, and both come from the fact that will now supports multiple chat backends.

### 1. Move to the new IO_BACKENDS syntax

If you're just planning to continue using HipChat, we'd recommend that you add this to your config.py:

IO_BACKENDS = "
"will.backends.io_adapters.hipchat",
"will.backends.io_adapters.shell",
# "will.backends.io_adapters.slack",
# "will.backends.io_adapters.rocketchat",
]

That will enable the HipChat and local shell stdin/stdout backend, for easy testing. If you want to also bring Will into a Slack or Rocket.Chat room in the future, just uncomment the backend!

### 2. Update the HipChat tokens to be namespaced.

You'll see this starting up, but when you have time, update your tokens as follows: (If you're using `WILL_` environment variables, please add the `WILL_` as needed:)

`USERNAME` becomes `HIPCHAT_USERNAME`

`TOKEN` becomes `HIPCHAT_V1_TOKEN`

`V2_TOKEN` becomes `HIPCHAT_V2_TOKEN`

`DEFAULT_ROOM` becomes `HIPCHAT_DEFAULT_ROOM`

`HANDLE` should be removed, as it's now pulled live from the HipChat servers and not used.

`NAME` should be removed, as it's now pulled live from the HipChat servers and not used.

`PASSWORD` becomes `HIPCHAT_PASSWORD`

`ROOMS` becomes `HIPCHAT_ROOMS`


### 3. If you're not using redis for storage, set it up for the pubsub backend.

At the moment, Redis is the only working pubsub backend, though ZeroMQ support is in the works, and we're looking to add a pure-python backend shortly.


### 4. Set SECRET_KEY.

Will now encrypts all messages on the pubsub wire and in storage by default. Without a SECRET_KEY set, he'll auto-generate one based on the machine MAC address, but this isn't a perfect solution, and will mean that he can't access his storage if there are hardware changes (or he's running in a virtualized environment.)

Please set `SECRET_KEY` as soon as possible.

The recommended way is to set it as an environmental variable, `WILL_SECRET_KEY`, in an environment that is secured and you trust. Any string will work, and entropy is good.


### 5. Set the new, Will 2.0 configuration and settings to your liking.

Will 2 ships with bunch of new features, and though we've provided sensible defaults, if you'd like, you can update your `config.py` with your preferences.

The simplest way to see everything is to have Will generate a `config.py.dist` that you can use for comparison:

`generate_will_project --config_dist_only`

It's worth reading through the new `config.py`, but here's a few areas specifically worth a look:

#### Platform and Decision-making

As mentioned above, there are now multiple IO mediums and platforms that Will can communicate on (and more are coming soon). Here's all the options

```
IO_BACKENDS = [
"will.backends.io_adapters.slack",
"will.backends.io_adapters.hipchat",
"will.backends.io_adapters.rocketchat",
"will.backends.io_adapters.shell",
]
```


Will 2 also comes with pluggable brains - split into Analysis, Generation, and Execution backends. The defaults are solid and behave similarly to Will 1.0 (the only difference is a high-confidence fuzzy matching engine), but if you're interested in making your Will more flexible, or adding more context to his responses, building custom backends is easy.

Here's all of the options, with the defaults uncommented. It's worth pulling this into your `config.py`.

```
# Backends to analyze messages and generate useful metadata
ANALYZE_BACKENDS = [
"will.backends.analysis.nothing",
"will.backends.analysis.history",
]

# Backends to generate possible actions, and metadata about them.
GENERATION_BACKENDS = [
# "will.backends.generation.fuzzy_best_match",
"will.backends.generation.fuzzy_all_matches",
"will.backends.generation.strict_regex",
]

# The "decision making" backends that look among the generated choices,
# and decide which to follow. Backends are executed in order, and any
# backend can stop further evaluation.
EXECUTION_BACKENDS = [
"will.backends.execution.best_score",
# "will.backends.execution.all",
]
```

There are also a few settings to tweak things like the fuzzy logic. These have sensible defaults, but you can tweak them to your liking.

```
# Confidence fuzzy generation backends require before Will responds
# https://pypi.python.org/pypi/fuzzywuzzy
FUZZY_MINIMUM_MATCH_CONFIDENCE = 90 # Defaults to 90%
FUZZY_REGEX_ALLOWABLE_ERRORS = 3
```

### That's it - let us know how it goes!

That's all you really need to know to flip the switch to Will 2.0. As there's a lot of new stuff in this release, it's possible that some bugs have slipped through the cracks. Please submit anything you find, no matter how small, [into the github issue tracker](https://github.com/skoczen/will/issues). We'll be active in fixing things ASAP and helping if you're stuck.

Thanks for using Will, and for going through the big upgrade! We're excited about what the future holds, and happy to get your bots free from platform lock-in.
17 changes: 8 additions & 9 deletions will/scripts/config.py.dist
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,13 @@ PLUGIN_BLACKLIST = [
"will.plugins.devops.pagerduty", # Because it requires a PAGERDUTY_SUBDOMAIN and PAGERDUTY_API_KEY key
]

# A secret key, used to namespace this instance of will and secure pubsub contents.
# Do *NOT* keep it in config.py. *DO* set it in the environment as WILL_SECRET_KEY,
# in a secured session. If a SECRET_KEY is not set, one will be auto-generated,
# but it may limit Will to reading data from this excecution only, and may not work
# on virtualized machines, or machines with many or changing MAC addresses
# SECRET_KEY = "DXQnJ2eHD6k2w3DvBTstN6kw9d9N4CeCLbjoK"

# ------------------------------------------------------------------------------------
# Platform and Decision-making
# ------------------------------------------------------------------------------------
Expand Down Expand Up @@ -201,14 +208,6 @@ FUZZY_REGEX_ALLOWABLE_ERRORS = 3
# Increasing the value will make will slower, but consume fewer resources.
# EVENT_LOOP_INTERVAL = 0.025

# A secret key, used to namespace this instance of will and secure pubsub contents.
# Do *NOT* keep it in config.py. *DO* set it in the environment as WILL_SECRET_KEY,
# in a secured session. If a SECRET_KEY is not set, one will be auto-generated,
# but it may limit Will to reading data from this excecution only, and may not work
# on virtualized machines, or machines with many or changing MAC addresses
# SECRET_KEY = "DXQnJ2eHD6k2w3DvBTstN6kw9d9N4CeCLbjoK"


# Turn up or down Will's logging level
# LOGLEVEL = "INFO" # DEBUG, INFO, WARNING, ERROR, CRITICAL
# LOGLEVEL = "DEBUG"
Expand All @@ -218,7 +217,7 @@ FUZZY_REGEX_ALLOWABLE_ERRORS = 3

# Turn on/off encryption in pub/sub and storage (default is on).
# Causes a small speed bump, but secures messages in an untrusted environment.
# ENABLE_INTERNAL_ENCRYPTION = False
# ENABLE_INTERNAL_ENCRYPTION = True
# ENCRYPTION_BACKEND = "aes"

# Mailgun config, if you'd like will to send emails.
Expand Down
Loading