Yago González
92ceb991a3
api: Implement GET /server_settings.
2018-08-13 11:26:34 -07:00
Yago González
a17e8954a8
api: Implement POST /typing.
2018-08-09 18:37:15 -02:30
neiljp (Neil Pilgrim)
39fb287fba
matrix tests: tweak import and add __init__.py to ensure tests run.
2018-08-08 17:26:15 -07:00
neiljp (Neil Pilgrim)
28f05676f2
matrix: Use six.moves.configparser.
2018-08-08 17:26:15 -07:00
neiljp (Neil Pilgrim)
f007fc9aaa
matrix tests: Add test for case that zuliprc file does not exist.
2018-08-08 17:26:15 -07:00
neiljp (Neil Pilgrim)
1d01308caf
matrix tests: Add test for writing sample config using zuliprc.
2018-08-08 17:26:15 -07:00
neiljp (Neil Pilgrim)
8999f0a352
matrix bridge: Separate print output from sys.exit calls.
...
This appears to be necessary for acquiring the text for testing.
2018-08-08 17:26:15 -07:00
neiljp (Neil Pilgrim)
71b405e95d
zulip bridge: Use python instead of python3 in script.
...
This script moved from the bots package to the API package, and does not
explicitly require python3.
2018-08-08 17:26:15 -07:00
neiljp (Neil Pilgrim)
617e16cebb
bridges: Bring inter-realm (zulip) bridge into zulip/ & rename others.
2018-08-08 17:26:15 -07:00
neiljp (Neil Pilgrim)
fc416082aa
zulip: Update setup.py to install matrix bridge & add dependencies.
...
Dependencies added:
* matrix_client: for matrix bridge itself;
* configparser: for python2 compatibility.
2018-08-08 17:26:15 -07:00
neiljp (Neil Pilgrim)
ec9f72f516
matrix bridge: Add optional from-zuliprc to use with write-sample-config.
...
If specified, the new option uses the information to pre-populate the
sample configuration file.
2018-08-08 17:26:15 -07:00
Yago González
6f74d5414a
api: Implement POST /messages/<message_id>/reactions.
2018-08-08 17:23:21 -07:00
Yago González
49e919ac3a
api: Implement DELETE /messages/<message_id>/reactions.
2018-08-08 17:23:21 -07:00
Yago González
0ca25af06e
api: Implement POST /user_groups/create.
2018-08-08 17:22:35 -07:00
Yago González
2f463e2a88
api: Implement POST /users/me/presence.
2018-08-08 17:22:05 -07:00
neiljp (Neil Pilgrim)
8b4f23d6aa
matrix tests: Add test for zulip-to-matrix messages.
2018-08-03 16:16:40 -07:00
neiljp (Neil Pilgrim)
4b50ea2569
matrix tests: Refactor zulip message validity tests.
2018-08-03 16:16:40 -07:00
neiljp (Neil Pilgrim)
02799315ea
matrix tests: Add zulip message validity failure tests.
2018-08-03 16:16:40 -07:00
neiljp (Neil Pilgrim)
1e7b5ee5f2
matrix tests: Add zulip message validity success test.
2018-08-03 16:16:40 -07:00
neiljp (Neil Pilgrim)
e693c25abc
matrix tests: Add test for sample config generation.
2018-08-03 16:16:40 -07:00
neiljp (Neil Pilgrim)
c692c4712a
matrix tests: Refactor running script into helper function.
2018-08-03 16:16:40 -07:00
neiljp (Neil Pilgrim)
fd66eb61c7
matrix tests: Add minimal help test for no-args and with -h.
2018-08-03 16:16:40 -07:00
Tim Abbott
6d8ac7c3c0
api: Check for BAD_EVENT_QUEUE_ID code.
...
This is the best way to do this check, since it isn't subject to i18n
modifying the strings. The server feature was originally introduced
in zulip/zulip commit 709c3b50fcba333740bb337bac69a801dbbdc4ee.
Since it's only 1 year old and the outcome is quite bad if this check
weren't present, we preserve support for older servers.
2018-08-02 15:59:52 -07:00
Eeshan Garg
1127f973aa
pypi: Release version 0.5.2.
2018-07-26 21:19:12 -02:30
Yago González
91135fca09
api: Implement POST /users/me/subscriptions/properties.
2018-07-13 01:10:58 +05:30
Yago González
04d6c58cc4
api: Add example for managing alert words.
...
This example makes use of get_alert_words, add_alert_words and
remove_alert_words, three methods that interact with the
/users/me/alert_words REST API endpoint.
2018-07-12 16:40:58 -02:30
Yago González
3070106365
api: Implement DELETE /users/me/alert_words.
2018-07-12 16:40:58 -02:30
Yago González
c661d78b63
api: Implement POST /users/me/alert_words.
2018-07-12 16:40:58 -02:30
Yago González
c057e0df14
api: Implement GET /users/me/alert_words.
2018-07-12 16:40:58 -02:30
Yago González
f6646f9cba
api: Implement PATCH /users/me/subscriptions/muted_topics.
2018-07-09 15:05:04 -02:30
Yago González
2da5fb3484
api: Rename update-flags to update-message-flags.
...
Followup for #449 .
2018-07-04 18:14:48 +02:00
Yago González
4d9b3226fd
api: Implement GET /realm/emoji.
2018-07-03 20:01:56 -02:30
Yago González
a96c3f0db0
api: Implement POST /messages/flags.
2018-07-03 11:03:26 -07:00
Eeshan Garg
c2fdd547f7
PyPI: Release 0.5.1.
2018-07-01 12:05:59 -02:30
Shubham Dhama
918e63a220
zulip_bots: Fix get_storage request arguments in StateHandler.
2018-07-01 08:01:18 -04:00
Yago González
f8fd7b6fbf
api: Implement GET /messages/<message_id>/history.
2018-06-28 20:26:06 -02:30
Yago González
2da831bbe1
api: Fix mypy annotations for delete_message.
2018-06-28 20:26:06 -02:30
Yago González
e6972bcbb9
api: Add extra arguments to get-messages example.
2018-06-26 19:46:22 -02:30
Yago González
0e39ca5236
api: Remove recent-messages example.
...
The GET /messages action has been recently implemented into our
bindings. Therefore this example has been superseded by get-messages,
which is capable of fetch messages in a more fine-grained way.
2018-06-26 19:46:22 -02:30
Yago González
38f3e1a9f5
api: Implement GET /messages/<message_id>.
2018-06-26 19:42:49 -02:30
Yago González
e2f379675b
api: Implement DELETE /messages/<message_id>.
2018-06-26 19:40:27 -02:30
Yago González
005829192e
api: Implement PATCH /streams/<stream_id>.
2018-06-26 19:38:44 -02:30
Yago González
36566c26c1
api: Implement GET /messages.
2018-06-21 15:51:53 -02:30
Eeshan Garg
c636a5ac49
pypi: Release 0.5.0.
2018-06-07 12:05:18 -02:30
neiljp (Neil Pilgrim)
97b2a12d21
matrix bridge: Adjust to python2-compatible type annotations.
2018-06-04 15:55:14 -07:00
neiljp (Neil Pilgrim)
2703d4c720
matrix bridge: Update & improve README.md.
2018-06-04 15:55:14 -07:00
neiljp (Neil Pilgrim)
43e80b42da
matrix bridge: Add write-sample-config option & remove sample config.
2018-06-04 15:55:14 -07:00
neiljp (Neil Pilgrim)
78c64d069b
matrix bridge: Add description of script & some useful tips.
2018-06-04 15:55:14 -07:00
neiljp (Neil Pilgrim)
70ba4c9035
matrix bridge: Improve error handling by exception translation.
...
Also:
* introduces two internal Bridge_*Exception classes.
* import matrix_client.errors instead of matrix_client.api.
2018-06-04 15:55:14 -07:00
neiljp (Neil Pilgrim)
a6e39509d9
matrix bridge: Improve join/leave option.
...
Original '--no-noise' option had a parameter and did not disable;
new parameter is '--enable-join-leave', and sets same option for
compatibility.
2018-06-04 15:55:14 -07:00
neiljp (Neil Pilgrim)
d45b43a9b1
matrix bridge: Configure using config(parser) file instead of python module.
2018-06-04 15:55:14 -07:00
neiljp (Neil Pilgrim)
363720e908
matrix bridge: Add main() function to enable installation.
2018-06-02 09:26:40 -07:00
Tim Abbott
9e6b4edee6
integrations: Remove slack import script.
...
This was migrated to the Zulip server project some time ago.
2018-05-30 16:10:22 -07:00
novokrest
7a95c31162
mercurial: Rename hook file to zulip_changegroup.py.
...
Rename hook file from 'zulip-changegroup.py'
to 'zulip_changegroup.py' for importing as module.
2018-05-29 11:45:56 -07:00
novokrest
9b9070808f
mercurial: Update changegroup hook according to new mercurial API.
...
Fixes #322
2018-05-29 11:45:56 -07:00
Tim Abbott
6ca216024f
matrix: Fix typo in requirements.txt.
2018-05-29 11:05:01 -07:00
Tim Abbott
efcdc712bf
matrix: Edit matrix.org README further.
...
The README is still pretty rough, but this cleans it up a bit.
2018-05-22 14:01:24 -07:00
Rhea Parekh
4c9134815c
Matrix: Make minor changes to README.md and config.
2018-05-22 14:01:24 -07:00
Rhea Parekh
afb964b65a
Matrix: Add command line flag to ignore join/leave events.
...
Add command line flag 'no_noise' (which is true by default)
to ignore join/leave events. User can enable those events
by pass 'no_noise' as false.
2018-05-22 14:01:24 -07:00
Rhea Parekh
8e1274f555
Matrix: Change naming convention.
2018-05-22 14:01:24 -07:00
Eeshan Garg
00f22e175c
pypi: Release 0.4.7.
2018-05-21 20:02:43 -02:30
Rhea Parekh
bb39ce981d
Matrix: Refactor function 'matrix_to_zulip'
2018-05-16 11:12:00 -07:00
Rhea Parekh
c467b5fd03
Matrix: Handle login and joining room errors.
2018-05-16 11:12:00 -07:00
Rhea Parekh
9362755039
Matrix: Add more messages events and handle errors.
2018-05-16 11:12:00 -07:00
Rhea Parekh
979c0e50d6
Matrix: Update documentation and add requirements.txt.
2018-05-16 11:12:00 -07:00
Yago González
e9a518e93e
api: Warn when SSL/TLS validation is disabled.
2018-05-15 08:17:35 -07:00
Yago González
d85792524e
api: Allow disabling TLS verification via env vars.
2018-05-15 08:17:35 -07:00
Yago González
285464a367
api: Set required fields in the examples.
...
Now all the API examples have their corresponding arguments set as
required when they have to be present for the example to run.
2018-05-15 07:40:48 -07:00
Yago González
cb171409c5
api: Fix edit-message example.
...
The message ID necessarily has to be an integer, and if no casting is
made it was being considered a string, causing problems when running
the example.
2018-05-15 07:40:48 -07:00
Yago González
292a3bc067
api: Add execution permissions to welcome-message.
2018-05-14 11:04:57 -07:00
Yago González
817636cbc6
api: Implement /users/me/<stream_id>/topics.
2018-05-14 11:04:57 -07:00
Joshua Pan
33e8352998
requirements: Add 'security' extra_require for requests.
...
There were some issues running bots due to SSL issues.
Adding the extra_require requests[security] adds 3
additional packages that deal with these issues.
2018-05-14 04:28:53 -07:00
rht
e56a94c853
Dig a tunnel to matrix.
2018-05-07 09:07:36 -07:00
neiljp (Neil Pilgrim)
55d75b11bc
packaging: Add py.typed marker file & install in setup.py.
...
This follows the provisional new PEP 561:
https://www.python.org/dev/peps/pep-0561/ .
2018-05-02 12:13:26 -07:00
Eeshan Garg
f4bdb059db
pypi: Release version 0.4.6.
...
This includes a critical bug fix for call_on_each_event.
2018-04-27 01:43:42 -02:30
Tim Abbott
d40328a311
api: Fix call_on_each_events handling of empty event_types.
...
The root issue here is that we had been using `None` as a way of
encoding `event_types` as being an argument to not pass to the server
in the API codebase, but the marshalling to send this over the wire
didn't handle that possibility correctly.
This was incorrectly "fixed" in
409bb587429ec4dcb1220a8ed85ec1618ffde0ed; the root cause of the issue
was the refactor to the new approach for registering API endpoints.
2018-04-25 23:01:37 -07:00
Eeshan Garg
0f448579ab
pypi: Release 0.4.5.
...
We just made a minor change to our Git integration, so that warranted
a new release so I could update the docs on the zulip/zulip repo.
2018-04-23 18:50:56 -02:30
Eeshan Garg
5f20512601
integrations/git: Allow users to specify a stream for notifications.
...
Previously, all notifications went to "commits", now users can
modify the constant at the top to change that.
2018-04-23 18:38:16 -02:30
Eeshan Garg
2d46445ab5
pypi: Release version 0.4.4.
...
This includes some important changes after the release of pip 10.
2018-04-16 17:05:27 -02:30
neiljp (Neil Pilgrim)
55aff6f64b
mypy: Improve typing of bots & API; enforce no_implicit_optional.
2018-04-06 13:45:11 -04:00
Eeshan Garg
60e02ed979
pypi: Release version 0.4.3.
...
Making this release due to recent changes made to the Trello script.
2018-04-03 22:05:39 -02:30
Eeshan Garg
fa759fc97c
integrations/trello: Improve the Trello script.
...
This commit makes a bunch of improvements:
1. Use format() for string formatting instead of the old style.
2. Stop returning stuff where we don't have to.
3. URL generation should not be done by the script, especially
since our eventual goal is for the Zulip server to automatically
generate a webhook URL. So the user should be able to supply
the URL in the config file. Plus, this makes it easier to test
the script with non-Zulip URLs (such as RequestBin).
4. Removed unnecessary arguments.
2018-04-03 21:52:10 -02:30
neiljp (Neil Pilgrim)
0f29e9f71b
mypy: Improve type annotations in Zulip API.
...
- Reduce use of Any, eg. in Callable parameters & narrow List;
- Use Optional where appropriate in more locations.
2018-03-31 15:45:54 -07:00
neiljp (Neil Pilgrim)
83b41a2e9e
zulip: Amend default value of remove_subscriptions:principals to None.
...
Having a default parameter as '[]' may not be an issue with the current
implementation, but general practice is to default to None and assign
a default list subsequently.
2018-03-31 15:45:25 -07:00
Eeshan Garg
7e360c244c
pypa: Release version 0.4.2.
2018-03-31 17:19:23 -02:30
amanagr
aa5df127ae
API: Use session.headers.update
method to add user-agent header.
...
Directly assigning session.headers overrides the default header
paramers and removes `{'Accept-Encoding': 'gzip, deflate'}` from
the headers.
2018-03-30 13:10:04 -07:00
JazZ
2f4b276799
Add Trello integration script
...
This is a small Python script to create Trello Webhooks for Zulip.
It builds and sends the Trello API requests required to create the
Trello webhook.
2018-03-29 15:24:14 -04:00
Shivam Gera
fc1d134685
api: Use custom exceptions in API client.
...
This removes the use of RuntimeError, and replaces it with a custom
error class called ZulipError. In a few places, we use a subclass to
make it easier for code to interact with the error type.
2018-02-16 11:33:18 -08:00
Eeshan Garg
f74c94ba04
pypi_packaging: Release version 0.4.1.
2018-02-07 01:03:49 -03:30
XavierCooney
68ec3a5ef0
zephyr_mirror_backend.py: Remove duplicate import.
2018-01-16 08:07:09 -05:00
Eeshan Garg
67cdb6f8f0
zulip: Make a DELETE request in remove_subscriptions.
...
Previously, remove_subscriptions called the
PATCH /api/v1/users/me/subscriptions endpoint, which is more like
an ad-hoc endpoint for bulk adding/removing subscriptions for the
user that makes the request. However, making a DELETE request
allows an admin to pass in the `principals` argument to unsubscribe
other users from streams as well, which is more consistent with how
add_subscriptions works.
2018-01-12 07:29:06 -05:00
Eeshan Garg
4458276801
requirements: Remove runtime dependency on mock.
...
The zulip and zulip_botserver packages specify mock as a runtime
dependency, which is only needed for testing during development.
So, it made more sense to move it to requirements.txt so that
it can be installed by ./tools/provision during development.
2018-01-09 17:01:16 -03:30
neiljp (Neil Pilgrim)
d3220eefe7
Jabber: Report where Zulip config not found, clarifying typing.
2018-01-08 15:39:03 -05:00
neiljp (Neil Pilgrim)
b5c3442b57
mypy: Remove explicit typing & add assertions in jabber backend.
...
Usage indicates set_jabber_client must be called before using
JabberToZulipBot, so assertions express intent & satisfy mypy.
2018-01-08 15:39:03 -05:00
neiljp (Neil Pilgrim)
afee6d706f
mypy: Assert Zulip.[api_key|email] are not None, satisfying use in Zephyr.
2018-01-08 15:39:03 -05:00
neiljp (Neil Pilgrim)
aa718da3e1
Zephyr: For correctness & mypy, res.get('result') -> res['result'].
...
Also correct nearby error message (subscribing to -> receiving).
2018-01-08 15:39:03 -05:00
neiljp (Neil Pilgrim)
02d9ba8edd
mypy: Add cast for zephyr_mirror_backend logger variable.
2018-01-08 15:39:03 -05:00
neiljp (Neil Pilgrim)
466f5a7167
mypy: Amend zephyr mirror annotations for strict-optional.
2018-01-08 15:39:03 -05:00
neiljp (Neil Pilgrim)
2b172e08c7
mypy: Correct SVN integration & satisfy strict-optional typing.
...
The commit_notice_destination return value was previously not
checked against None, which indicates no message should be sent.
2018-01-08 15:39:03 -05:00
neiljp (Neil Pilgrim)
9502e0eb9a
hg integration: Use explicit sys.exit.
2018-01-08 15:39:03 -05:00
neiljp (Neil Pilgrim)
55df1886cc
mypy: Amend hg integration to simplify error handling/typing.
2018-01-08 15:39:03 -05:00
neiljp (Neil Pilgrim)
d26e44ebb2
mypy: Add client_cert assertion & amend annotation in Zulip API.
2018-01-08 15:39:03 -05:00
neiljp (Neil Pilgrim)
13bf6f7262
mypy: Add non-None session assertion in Zulip API.
2018-01-08 15:39:03 -05:00
neiljp (Neil Pilgrim)
2a2c8ae25f
API: Amend call_on_each_event error handling to not use .get().
...
mypy with strict-optional led to examination of res.get('result')
calls potentially raising TypeError ('error' in None).
Server code indicates this is safe, and other nearby code assumes
presence of fields in 'res' also.
2018-01-08 15:39:03 -05:00
Eeshan Garg
3030c73060
packages: Release 0.4.0.
2018-01-06 18:28:35 -03:30
Robert Hönig
06c5904347
Add 'mock' requirement for zulip and zulip_botserver.
...
These packages depend on mock. Previously, that dependency
was satisfied "by chance" because zulip_bots happened to
install 'mock'.
2018-01-06 16:39:52 +01:00
neiljp (Neil Pilgrim)
8b4e877546
mypy: Amend upload-file example, to pass with strict-optional.
2018-01-02 14:05:33 -05:00
neiljp (Neil Pilgrim)
9df922e7fa
mypy: Adjust zulip api slightly, to pass with strict-optional.
2018-01-02 14:05:33 -05:00
neiljp (Neil Pilgrim)
fc460dc12b
mypy: Rewrite trac integration for clarity & to pass strict-optional.
2018-01-02 14:05:33 -05:00
neiljp (Neil Pilgrim)
33ccc04a32
mypy: Amend code & typing of integrations, to pass with strict-optional.
2018-01-02 14:05:33 -05:00
Rhea Parekh
27842b2d24
slack importer: Add README.md.
2017-12-27 07:54:42 -05:00
Rhea Parekh
0bb50fdc4e
slack importer: Shift the slack data conversion files to zulip server repo.
2017-12-27 07:54:42 -05:00
neiljp (Neil Pilgrim)
bcca5230a3
mypy: Remove un-needed 'type: ignore' for session.auth.
2017-12-21 18:43:42 -05:00
fredfishgames
b865978546
Create welcome-message
api example.
2017-12-19 14:42:55 -05:00
neiljp (Neil Pilgrim)
28687f18ca
mypy: Add --disallow-any=generics & extend typing accordingly.
...
Also reset typing of ExternalBotHandler to Any after discussion.
2017-12-11 20:14:00 -06:00
Rhea Parekh
e5726fdc96
slack: fix type annonations.
2017-12-03 10:30:02 -08:00
Rhea Parekh
1f17c04115
slack: remove the messages and attachments mapping.
2017-12-03 10:30:02 -08:00
Rhea Parekh
455acb8e3b
slack: Make minor fixes in zerver_userprofile and zerver_realm mappings.
2017-12-03 10:30:02 -08:00
Rhea Parekh
8def7564dd
slack: Map recipients and subscriptions for private messages.
2017-12-03 10:30:02 -08:00
rht
cb1cafe194
slack: Add attachment.json skeleton.
...
Map the attachments but disable attachments
them for now.
2017-12-03 10:30:02 -08:00
rht
b7ab8b4257
slack: Add avatar and uploads records.json.
2017-12-03 10:30:02 -08:00
rht
9ce064b2c1
slack: Do minor fixes.
...
Minor fixes in zerver_userprofile mapping.
Remove TODO from REALM_ID task.
2017-12-03 10:30:02 -08:00
Rhea Parekh
7198aab1a9
slack: Fix zerver_message, zerver_defaultstream
...
and refactor zerver_usermessage implementation.
2017-12-03 10:30:02 -08:00
rht
6366448903
slack: Add minor changes.
...
Rename the function channelmessage2zerver_message to channelmessage2zerver_message_for_one_stream.
Compress the converted data with tar instead of zip.
Add changes in zerver_userprofile mapping and zerver_realm mappings.
Do the manage.py import from a directory instead.
2017-12-03 10:30:02 -08:00
Rhea Parekh
716570ceaa
slack: Add zerver_usermessage object and map flags_mask
2017-12-03 10:30:02 -08:00
rht
b3a7a4f937
Slack: Add zerver_defaultstream feature.
...
Thanks to @rheaparekh for pointing out the doc for sanity check ;)
2017-12-03 10:30:02 -08:00
rht
46fd234824
slack: Clarify var naming of sanitize text function.
2017-12-03 10:30:02 -08:00
Rhea Parekh
ce51d99c6a
slack: Sanitize the message text and fix Travis test.
2017-12-03 10:30:02 -08:00
rht
7db4e36752
slack: Add minor changes.
...
Set default value to be False for message's has_image
Update type signature to functions.
Set default to be false for msg's has_link.
2017-12-03 10:30:02 -08:00
Rhea Parekh
a02f0f98c1
slack: Map recipient and fix subscription mapping.
2017-12-03 10:30:02 -08:00
rht
704b742f82
slack: Handle avatar from slack if it is stored in gravatar.
...
Thank you @**Rhea** for the research.
2017-12-03 10:30:02 -08:00
rht
cd3db24bca
Add slack data importer.
...
This importer is more comprehensive than the existing one.
slack import: Reduce TODO count.
2017-12-03 10:30:02 -08:00
Eeshan Garg
c3ab265d3e
packaging: Upgrade to release 0.3.9.
2017-11-29 01:23:12 -03:30
Robert Hönig
d6a4c02ba5
Rename bot storage endpoint from state to storage.
2017-11-28 20:41:59 +01:00
Eeshan Garg
50b5ec0f49
packages: Release 0.3.8 for all PyPI packages.
2017-11-27 23:34:38 -03:30
Steve Howell
043d963a99
Fail fast for bad connections with the API and bots.
...
The API has aggressive retry logic for connecting to a
server, which may make sense for situation where you have
connection blips or server restarts.
When you're first connecting to the API, however, connection
failures are almost certainly a sign of misconfiguration, so
now we fail fast.
The bot lib takes advantage of this API change by catching the
ZulipError exception and exiting gracefully.
2017-11-21 14:21:04 -08:00
derAnfaenger
f41030b515
API: rename get_state & update_state to get_storage & update_storage.
2017-11-18 08:58:47 -08:00
derAnfaenger
66da09324e
zulip package: Add API functions to access state.
2017-11-18 08:58:47 -08:00
neiljp (Neil Pilgrim)
c24c1d2e61
mypy: Add 'type: ignore' comment due to patching function.
2017-11-15 13:43:08 -08:00
neiljp (Neil Pilgrim)
9ed0fa9e6f
mypy: Remove unnecessary 'type: ignore' in google calendar.
2017-11-15 13:43:08 -08:00
neiljp (Neil Pilgrim)
3e55124f4e
mypy: Remove 'type: ignore's now that python/mypy#1248 is fixed.
2017-11-15 13:43:08 -08:00
derAnfaenger
c6aed00aa1
integrations: Make twitter bot handle search terms more intelligently.
...
When invoked with search terms, twitter bot looks for these terms
in the content of a message to find out if they match. However,
Twitter can return messages that don't directly contain a search term.
This commit adds the tweeter user handle and expanded urls to the
places to look for a search term.
2017-11-07 11:13:29 -08:00
derAnfaenger
2553cf45a5
integrations: Use default client init from options for twitter bot.
...
This allows users to specify a config file with the
--config-file option.
2017-11-07 11:13:29 -08:00
derAnfaenger
7e7c7598b7
integrations: Add requirements for twitter bot.
2017-11-07 11:13:29 -08:00
Alena Volkova
fe6deb2e03
mypy: zulip: Fix errors in tests/test_default_arguments.py.
2017-10-27 00:56:06 -04:00
Alena Volkova
99785a1be4
mypy: zulip: Fix errors in tests/__init__.py.
2017-10-27 00:56:06 -04:00
Alena Volkova
671a078137
mypy: zulip: Fix errors in integrations/zephyr/process_ccache.
2017-10-27 00:56:06 -04:00
Alena Volkova
8becce7c98
mypy: zulip: Annotate integrations/svn/zulip_svn_config.py.
2017-10-27 00:56:06 -04:00
Alena Volkova
ab192fe937
mypy: zulip: Annotate integrations/perforce/zulip_perforce_config.py.
2017-10-27 00:56:06 -04:00
Alena Volkova
7ad3324aaa
mypy: zulip: Fix errors in integrations/log2zulip/log2zulip.
2017-10-27 00:55:54 -04:00
Alena Volkova
995dc33334
mypy: zulip: Fix errors in integrations/irc/irc_mirror_backend.py.
2017-10-26 17:02:14 -04:00
Alena Volkova
af957c18fe
mypy: zulip: Annotate integrations/git/zulip_git_config.py.
2017-10-26 17:02:14 -04:00
Eeshan Garg
4af8bcd46e
packaging: Upgrade package version (0.3.5 -> 0.3.7).
2017-10-21 01:10:25 -02:30
derAnfaenger
0e6ea0a439
api: Add comments clarifying the request logic.
2017-10-11 22:24:12 -07:00
derAnfaenger
a7bfe692fa
api: Fix unused long-polling retry parameter.
...
This parameter was intended to control whether we give a long timeout
and related behavior, but it was accidentally not being passed into
the second layer of the library from the first.
While we're fixing it, make it actually limit the length of a timeout
to something reasonable.
2017-10-11 22:24:01 -07:00
Eeshan Garg
1e8e1f17c4
release: Upgrade package versions (0.3.4 -> 0.3.5).
2017-10-09 14:13:32 -02:30
Tim Abbott
297b62efc6
log2zulip: Use simpler code for accessing production venv.
...
The only problem with this resulting code is that setup_path_on_import
only works if the Python versions are the same, so you need to run
this with Python 3 in that case.
We try to resolve that for use on Zulip servers with
zulip/zulip:47c5aae5b242fb6d2f5e860602e0fc0af68419bb; since that's the
main case where the code path runs, that should be good enough.
2017-10-06 16:37:56 -07:00
Tim Abbott
dc2132e629
zephyr_mirror: Eliminate --root-path arguments.
...
These were quite messy code, and now that almost nobody is running
their own zephyr mirroring script (vs. using webathena), making the
zephyr mirroring script deployable outside the package isn't super
valuable.
2017-10-05 13:24:59 -07:00
Tim Abbott
963e6d0ad8
zephyr_mirror: Always run backend script from current directory.
...
While this technically removes functionality, it's rare that it would
be useful to do this.
2017-10-05 13:17:10 -07:00
Tim Abbott
96f2100974
zephyr: Remove root-path import nonsense from check-mirroring.
...
We no longer need this in order to access the script's dependencies,
since it now is part of a proper package.
2017-10-05 13:02:58 -07:00
Tim Abbott
bc4e54a35d
zephyr_mirror: Restart self using __file__, not root-path.
...
This should do the same thing, but with less complexity.
2017-10-05 12:46:01 -07:00
Tim Abbott
7e5a320343
zephyr_mirror: Move stamp_path to not be based on root_path.
2017-10-05 12:37:49 -07:00
Tim Abbott
6395dc1a45
zephyr_mirror: Update process_cache for repository move.
...
This also has the side effect of stopping using the --root-path
argument, which should no longer be required.
2017-10-05 12:21:11 -07:00
Tim Abbott
807afd2032
zephyr: Use add_default_arguments in sync_public_streams.
2017-09-29 16:21:18 -07:00
Tim Abbott
baa09bc26c
log2zulip: Clean up extra config path and add comments.
...
That extra complexity isn't particularly valuable.
2017-09-15 07:04:36 -07:00
derAnfaenger
b53dc5de4c
log2zulip: Make paths Windows compatible.
2017-09-15 07:04:36 -07:00
derAnfaenger
761d4f44c1
log2zulip: Use default argparser.
2017-09-15 07:04:36 -07:00
derAnfaenger
3fb640a5d0
zulip: Use canonical way to require an arg in subscribe.
2017-09-15 13:24:32 +02:00
derAnfaenger
a06437c4ee
zulip: Use canonical way to require an arg in unsubscribe.
2017-09-15 13:24:28 +02:00
derAnfaenger
0a49638e82
mypy: Add annotations to api_examples.py
2017-09-15 13:24:24 +02:00
derAnfaenger
61de5578f2
mypy: Fix annotations in core zulip files.
2017-09-15 13:24:09 +02:00
derAnfaenger
59d65309c7
zulip: Exit with info after provisioning script.
2017-09-15 03:06:17 -07:00
derAnfaenger
091f532da6
zulip-api-examples: Check and print path to script.
2017-09-15 02:06:38 -07:00
derAnfaenger
6630deda6a
twitter bots: Merge twitter-bot and twitter-search-bot.
2017-09-15 00:55:01 -07:00
derAnfaenger
623557d189
zulip: Install all example scripts in the package's dir.
2017-09-14 04:46:13 -07:00
derAnfaenger
2f044b44bd
zulip: Move examples to zulip/examples.
2017-09-14 04:46:13 -07:00
derAnfaenger
2f62507987
api: Add script to print path of examples directory.
...
Partially fixes #92 .
2017-09-14 04:46:13 -07:00
derAnfaenger
ae4bf8bbf4
zulip: Store examples in the package's directory.
2017-09-14 04:46:13 -07:00
derAnfaenger
59320f6b28
zulip: Explain use cases for generate_option_group()
method.
2017-09-14 11:39:11 +02:00
derAnfaenger
631c64ca6c
zulip: Move from simplejson to json.
...
This removes the simplejson dependency.
2017-09-14 02:26:56 -07:00
derAnfaenger
d05e932968
log2zulip: Replace ujson with json.
2017-09-12 02:14:51 -07:00
derAnfaenger
c6e7ddfb03
zulip package: Make check for provision failsafe.
...
It is not guaranteed that the integration scripts in
the Zulip repository even specify a `provision` option.
Therefore, checking the value of this option would fail.
Updating this with getattr and a default value.
2017-09-12 11:08:58 +02:00
derAnfaenger
cb770ffee9
irc-mirror.py: Allow optional provisioning.
...
To do so, we need to import all required internal modules after the
script had the option to provision. The provisioning itself is then
done by zulip.init_from_options().
2017-09-12 01:39:21 -07:00
derAnfaenger
61b609e6f2
irc integration: Make IRCBot a separate module.
...
This will allow us to import IRCBot at a later point
in the code, necessary for provsioning support.
2017-09-12 01:39:21 -07:00
derAnfaenger
9acd9d932c
irc-mirror.py: Make zulip_client an argument of IRCBot.
...
This is the first step towards moving IRCBot to a
separate file.
2017-09-12 01:39:21 -07:00
derAnfaenger
ec18cbff26
zulip package: Add provision option for scripts.
...
If enabled in a script, this option will try to install dependencies
in the requirements.txt in the script's directory.
2017-09-12 01:39:21 -07:00
derAnfaenger
50d8c5f7fe
zulip package: Add requirements.txt for each integration.
2017-09-12 01:39:21 -07:00
derAnfaenger
fb2aff4611
zulip package: Add unittest
...
As the first unittest, this creates a test directory and
abnd adds it tho the excluded pip package files.
There are two `tests` directories now, one in zulip_botserver and one in
zulip. This confuses the unittest runner, leading to failed test imports.
Therefore, we need to tell the package importer that there are multiple
tests directories, all of which should be considered for a search.
2017-09-12 01:27:09 -07:00
Eeshan Garg
390054da62
python-zulip-api: Upgrade versions (0.3.3 -> 0.3.4).
2017-09-11 21:09:28 -02:30
derAnfaenger
b585bd2dfa
zulip setup.py: Remove redundant directory forward slash.
...
The slash caused pip install ./zulip to fail on Windows with
Python 3.5.
2017-09-06 09:01:22 +02:00
Eeshan Garg
6e798f317f
python-zulip-api: Upgrade versions (0.3.2 -> 0.3.3).
...
We now have "universal" wheel distributions. Universal wheels
support both Python 2 and Python 3.
2017-09-01 23:10:12 -02:30
Tim Abbott
bbed4a625d
log2zulip: Fix an extremely long line.
2017-08-30 10:01:48 -07:00
Greg Price
49fb205ae7
log2zulip: Fix to work on Python 3.
...
I'm not thrilled with the `replace` error handler losing information
if the logfile contains invalid UTF-8 for some reason; but that sure
beats a UnicodeDecodeError, and for this script I can't quite be
bothered to run the rather tricky riddle trail that Python 3 makes it
to pass arbitrary byte data through layers of ordinary text processing.
2017-08-30 09:57:57 -07:00
derAnfaenger
86729a862c
api: Remove unnecessary API key details.
...
Fixes #1 .
2017-08-29 14:24:19 -07:00
derAnfaenger
9d683e4669
api: Ensure automatic tilde expansion.
2017-08-29 14:20:48 -07:00
derAnfaenger
6db062ef75
api: Display help on wrong command-line arguments.
...
Fixes #93 .
2017-08-29 14:18:53 -07:00
derAnfaenger
26a774503b
twitter bots: Write internal config to separate file.
...
Tweaked by tabbott to remove duplicate write_config lines.
Fixes #88 .
2017-08-27 19:27:13 -07:00
Tim Abbott
5bc98bfdf7
send_message: Remove unnecessary API key details.
...
This removes a lot of clutter from this example.
This is the send_message part of #1 .
2017-08-24 10:58:29 -07:00
Alex Dehnert
5eaac7bfba
api: Use requests.Session.
...
Using requests.Session allows the requests library to reuse HTTP
connections, which is potentially helpful for performance.
Fixes #3 .
2017-08-24 10:39:42 -07:00
Tim Abbott
9c18c0b4ed
twitter: Fix buggy handling of config_file in Python 3.
...
This fixes the most broken part of #88 .
2017-08-22 17:20:54 -07:00