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

Update core to use mattermostautodriver instead of mattermostdriver #337

Merged
merged 12 commits into from
Aug 26, 2022

Conversation

unode
Copy link
Collaborator

@unode unode commented Aug 22, 2022

As discussed at Vaelor/python-mattermost-driver#100 the latest release of mattermostdriver is missing several API endpoints. The fork python-mattermost-autodriver uses an approach that transforms Mattermost's OpenAPI documentation to Python code, ensuring all endpoints are readily available.

The current PR updates the core of mmpy_bot to use the new API driver. The core functionality is the same but as endpoints were automatically generated, some functions have different names. Unless I missed some, this PR should address all of them.

@attzonko
Copy link
Owner

attzonko commented Aug 23, 2022

Can you enable issues on that repo? 😄

Seems like the docs (https://embl-bio-it.github.io/python-mattermost-autodriver/) are broken:
image

@unode
Copy link
Collaborator Author

unode commented Aug 23, 2022

Issues enabled now. Docs are indeed still broken. I still didn't get around generating them as some of the auto-generated docstrings are quite messy.

I'll spend some time today digging into why integration tests are failing.

@unode
Copy link
Collaborator Author

unode commented Aug 25, 2022

Seems like integration test failures will also fail on main if we update to the latest mattermostdriver.
This PR has been updated to include fixes to the problems caused by switching from requests to httpx in the driver.

@unode unode force-pushed the autodriver branch 3 times, most recently from 65c2073 to 51053d0 Compare August 25, 2022 04:14
@unode
Copy link
Collaborator Author

unode commented Aug 25, 2022

@attzonko this is now ready. There were some issues with the new driver that should have now all been resolved.

@codeclimate
Copy link

codeclimate bot commented Aug 26, 2022

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

View more on Code Climate.

@attzonko attzonko merged commit 2da4b30 into main Aug 26, 2022
@unode unode deleted the autodriver branch August 26, 2022 23:27
unode added a commit to unode/mmpy_bot that referenced this pull request Feb 9, 2023
…ttzonko#337)

* create_ephemeral_post -> create_post_ephemeral

* create_reaction -> save_reaction

* create_direct_message_channel -> create_direct_channel

* get_channels_for_user -> get_channels_for_team_for_user

* get_thread -> get_post_thread

* get_reactions_of_post -> get_reactions

* webhooks.call_webhook -> call_webhook

* mattermostdriver -> mattermostautodriver
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.

2 participants