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

Fix the todoist integration #27273

Merged
merged 5 commits into from Oct 7, 2019

Conversation

@boralyl
Copy link
Contributor

commented Oct 7, 2019

Description:

This fixes the todoist integration as mentioned in the forums. When v8.0.0 of the python library was released, the api changes were backwards-incompatible. This caused the current integration to fail to parse any data since the release.

The main change is the due parameter is now an object rather than having separate due_* properties. See the changelog.

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly. Update and include derived files by running python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt by running python3 -m script.gen_requirements_all.
  • Untested files have been added to .coveragerc.

If the code does not interact with devices:

  • Tests have been added to verify that the new code works.
@@ -206,7 +209,7 @@ def handle_new_task(call):
project_id = project_id_lookup[project_name]

# Create the task

This comment has been minimized.

Copy link
@boralyl

boralyl Oct 7, 2019

Author Contributor

This call now requires a kwarg.

@@ -216,11 +219,12 @@ def handle_new_task(call):
if PRIORITY in call.data:
item.update(priority=call.data[PRIORITY])

This comment has been minimized.

Copy link
@boralyl

boralyl Oct 7, 2019

Author Contributor

This is the primary change to get things working with the latest version. The due parameter is now an object

@@ -381,6 +389,16 @@ def __init__(
else:
self._project_id_whitelist = []

def _parse_due_date(self, data: dict) -> datetime:

This comment has been minimized.

Copy link
@boralyl

boralyl Oct 7, 2019

Author Contributor

Dates can be in 3 formats:
'2019-10-01'
'2019-10-01T12:00:00'
'2019-10-01T12:00:00Z'

boralyl added 2 commits Oct 7, 2019
@boralyl boralyl marked this pull request as ready for review Oct 7, 2019
@frenck

This comment has been minimized.

Copy link
Member

commented Oct 7, 2019

Thank you for your contribution thus far! 🎖 Since this is a significant contribution, we would appreciate you'd added yourself to the list of code owners for this integration. ❤️

Please, add your GitHub username to the manifest.json of this integration.

For more information about "code owners", see: Architecture Decision Record 0008: Code owners.

@MartinHjelmare MartinHjelmare changed the title Fixed the todoist integration. Fix the todoist integration Oct 7, 2019
boralyl added 2 commits Oct 7, 2019
Dev automation moved this from Needs review to Reviewer approved Oct 7, 2019
@balloob
balloob approved these changes Oct 7, 2019
Copy link
Member

left a comment

Looks great! Thanks.

Because it fixes a current broken integration, I will go ahead and tag this for 0.100. It will be available in beta today, released on Wednesday 🎉

@balloob balloob added this to the 0.100 milestone Oct 7, 2019
@balloob balloob merged commit feb1986 into home-assistant:dev Oct 7, 2019
11 checks passed
11 checks passed
CI Build #20191007.36 succeeded
Details
CI (FullCheck Mypy) FullCheck Mypy succeeded
Details
CI (FullCheck Pylint) FullCheck Pylint succeeded
Details
CI (Overview CheckFormat) Overview CheckFormat succeeded
Details
CI (Overview Lint) Overview Lint succeeded
Details
CI (Overview Validate) Overview Validate succeeded
Details
CI (Tests PyTest Python36) Tests PyTest Python36 succeeded
Details
CI (Tests PyTest Python37) Tests PyTest Python37 succeeded
Details
cla-bot Everyone involved has signed the CLA
codecov/patch Coverage not affected when comparing e011fca...90a433a
Details
codecov/project 94.25% (target 90%)
Details
Dev automation moved this from Reviewer approved to Done Oct 7, 2019
balloob added a commit that referenced this pull request Oct 8, 2019
* Fixed the todoist integration.

* Removing unused import

* Flake8 fixes.

* Added username to codeowners.

* Updated global codeowners
@lock lock bot locked and limited conversation to collaborators Oct 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Dev
  
Done
4 participants
You can’t perform that action at this time.