https://prefect.io logo
d

Donny Flynn

09/07/2021, 4:57 PM
Hi, I am trying to get my PR to pass some tests so it can be reviewed. It is getting hung-up here on, and I don't have access to see what is failing in CircleCI. I think it might be a module error, but I'm confused exactly how modules could properly work before being merged. Any help would be much appreciated, thanks! https://github.com/PrefectHQ/prefect/pull/4943/checks?check_run_id=3510950314
z

Zach Angell

09/07/2021, 5:29 PM
Hi @Donny Flynn I see the following failures in CircleCI You should be able to recreate these failures locally, there's some helpful info here https://docs.prefect.io/core/development/tests.html#running-tests
Copy code
=================================== FAILURES ===================================
_______________ TestCensusSyncTask.test_run_failing_on_poor_url ________________
[gw2] linux -- Python 3.7.11 /usr/local/bin/python

self = <tests.tasks.census.test_census.TestCensusSyncTask object at 0x7f04496fe610>

    def test_run_failing_on_poor_url(self):
        task = CensusSyncTask(api_trigger="<http://random_url.com|random_url.com>")
>       assert task.api_trigger is None
E       AssertionError: assert '<http://random_url.com|random_url.com>' is None
E        +  where '<http://random_url.com|random_url.com>' = <Task: CensusSyncTask>.api_trigger
Another one is a documentation error for the new task
Copy code
ValueError: prefect.tasks.census.census.CensusSyncTask.run has arguments without documentation: api_trigger, poll_status_every_n_seconds
And the last one is flake8 failing You should be able to reproduce by running
flake8 src/
on your branch
Copy code
#!/bin/bash -eo pipefail
flake8 src/
src/prefect/tasks/census/census.py:17:106: E501 line too long (106 > 105 characters)
src/prefect/tasks/census/census.py:18:106: E501 line too long (106 > 105 characters)
src/prefect/tasks/census/census.py:48:106: E501 line too long (109 > 105 characters)
src/prefect/tasks/census/census.py:57:71: W291 trailing whitespace
src/prefect/tasks/census/census.py:61:26: W605 invalid escape sequence '\/'
src/prefect/tasks/census/census.py:61:28: W605 invalid escape sequence '\/'
src/prefect/tasks/census/census.py:61:72: W605 invalid escape sequence '\/'
src/prefect/tasks/census/census.py:61:77: W605 invalid escape sequence '\/'
src/prefect/tasks/census/census.py:61:81: W605 invalid escape sequence '\/'
src/prefect/tasks/census/census.py:61:88: W605 invalid escape sequence '\/'
src/prefect/tasks/census/census.py:61:91: W605 invalid escape sequence '\d'
src/prefect/tasks/census/census.py:61:95: W605 invalid escape sequence '\/'
src/prefect/tasks/census/census.py:69:77: W291 trailing whitespace
src/prefect/tasks/census/census.py:87:106: E501 line too long (109 > 105 characters)
d

Donny Flynn

09/07/2021, 5:32 PM
Thanks @Zach Angell! I should be able to sort this out. This detail is much more than I could get to locally (I think I screwed something up with the modules), thanks again!
👍 1
Got it, that makes sense. Passing all tests now, thanks!
👍 1
4 Views