Skip to content

Update client.py - #4517

Closed
tharris72 wants to merge 36 commits into
dask:mainfrom
tharris72:master
Closed

tharris72 wants to merge 36 commits into
dask:mainfrom
tharris72:master

Conversation

@tharris72

Copy link
Copy Markdown
Contributor

Adding the Returns numpy style documentation to the doc strings. This is for issue #3578.
Testing out the pull request to make sure it works. There are still more doc strings to update.

Adding the Returns numpy style documentation to the doc strings. This is for issue dask#3578
@martindurant

Copy link
Copy Markdown
Member

Please mark this PR as DRAFT and let us know when you are done.

more updates to the doc strings

@jrbourbeau jrbourbeau left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @tharris72! Distributed uses numpydoc for docstring formatting. I recommend looking through https://numpydoc.readthedocs.io/en/latest/format.html to make sure that these docstrings conform to numpydoc's style guide. Additionally, we also use flake8 and black for code formatting. Here's the relevant section in the contributing docs for how to install / use flake8 and black https://docs.dask.org/en/latest/develop.html#code-formatting. Let us know if you have any questions

Base automatically changed from master to main March 8, 2021 19:04
@tharris72
tharris72 marked this pull request as draft March 9, 2021 08:18
Tim Harris and others added 3 commits March 14, 2021 16:47
	modified:   distributed/client.py
	testing out the commit
	modified:   distributed/client.py
	modified:   distributed/client.py
	modified:   distributed/utils.py
@mrocklin

Copy link
Copy Markdown
Member

Thank you for doing this @tharris72 . Let us know when you are done. This is great to see.

@tharris72

Copy link
Copy Markdown
Contributor Author

I hope to work on this some more next week and hopefully I can finish it. I will keep you guys posted.

@jrbourbeau

Copy link
Copy Markdown
Member

Sounds good, let us know if you have questions or need any additional input from us 👍

	modified:   distributed/client.py
	modified:   distributed/pubsub.py
@tharris72
tharris72 marked this pull request as ready for review April 1, 2021 02:06
@tharris72

tharris72 commented Apr 1, 2021 •

Copy link
Copy Markdown
Contributor Author

I noticed that some of the _ methods have doc strings while others didn't. I didn't add any docstrings to the _ private methods. If you guys want me to add them let me know.
If you could look over the code and let me know what you think that would be a big help. If you guys want to me to change anything just let me know.

I didn't use flake8 and black to format the code. I will see if I can install them on my computer and do the check/formatting sometime later this week or next week.

If everything looks good can you recommend another first issue or something else I could contribute to?
Thanks for the help you guys have given me so far.

@jsignell

Copy link
Copy Markdown
Member

I just came across this @tharris72 and it looks good! You don't need to worry about adding docstrings to the private methods. It looks like this just needs to have main merged in and have flake8 and black run on it.

@GPUtester

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

Fixing the doc string warnings from flake8
more flake8 updates
more flake8 updates
more flake8 updates
more flake8 updates
more flake8 updates
more flake8 updates
more flake8 updates
more flake8 updates
ran black
@tharris72

Copy link
Copy Markdown
Contributor Author

I just came across this @tharris72 and it looks good! You don't need to worry about adding docstrings to the private methods. It looks like this just needs to have main merged in and have flake8 and black run on it.

I ran flake8 and black. The code changes are done but there is an import error
ImportError: cannot import name 'apply' from 'dask.compatibility' (/home/docs/checkouts/readthedocs.org/user_builds/distributed/envs/4517/lib/python3.7/site-packages/dask/compatibility.py)

I'm guessing something got changed. I'm not sure how to resolve this. I looked in 'compatibility' and there is no apply
We can change the status from draft to ready to merge/finished. I'm not sure how to change it.

@tharris72
tharris72 requested a review from jrbourbeau August 23, 2021 08:49
fixed the 'import apply' error
@tharris72

tharris72 commented Aug 23, 2021 •

Copy link
Copy Markdown
Contributor Author

I think it is dask.utils.apply
@martindurant
You were right. Thanks for the heads up! I fixed the import error.

@jsignell

Copy link
Copy Markdown
Member

It looks like there are a few last conflicts. Let me know if you would like me to push to your fork.

@tharris72

Copy link
Copy Markdown
Contributor Author

It looks like there are a few last conflicts. Let me know if you would like me to push to your fork.

You can push it and I will try to fix them.
Thanks for helping!

@jsignell

jsignell commented Sep 1, 2021

Copy link
Copy Markdown
Member

Ok I just pushed to your branch, so make sure to pull before doing any work.

Testing to see if uncommenting line 4 fixes the bug
@tharris72

Copy link
Copy Markdown
Contributor Author

I believe I merged the changes and I uncommented out a line in the github actions yaml file
(.github/workflows/ssh_debug.yaml). The tests ran and said that 12 tests were cancelled.

Ok I just pushed to your branch, so make sure to pull before doing any work.

I believe I merged the changes and I uncommented out a line in the github actions yaml file
(.github/workflows/ssh_debug.yaml). The tests ran and said that 12 tests were cancelled but there were no syntax erros.
Does this mean that everything works on my part or do I need to do more changes?
Thanks for the help. I really appreciate it!

@jsignell

Copy link
Copy Markdown
Member

It looks like there were some issues with the merge that you did, would you like me to push again? If you look at the diff: https://github.com/dask/distributed/pull/4517/files you'll see that there are a bunch of changes between this branch and main that you didn't intend to include.

This reverts commit a67b5de.

 Changes to be committed:
	modified:   distributed/protocol/tests/test_numpy.py
This reverts commit b7aae47.

 Changes to be committed:
	modified:   distributed/cli/tests/test_dask_scheduler.py
This reverts commit bd1d0a6.

 Changes to be committed:
	modified:   distributed/cli/tests/test_dask_worker.py
This reverts commit cff7e94.

 Changes to be committed:
	modified:   distributed/protocol/tests/test_netcdf4.py
@tharris72

Copy link
Copy Markdown
Contributor Author

It looks like there were some issues with the merge that you did, would you like me to push again? If you look at the diff: https://github.com/dask/distributed/pull/4517/files you'll see that there are a bunch of changes between this branch and main that you didn't intend to include.

I tried to revert the changes that were not in client.py. Can you check if the only changes I have are in client.py and if so I think the changes are ready to be merged. Thanks for the help!

@jsignell

Copy link
Copy Markdown
Member

I cherry-picked your commits onto a fresh branch. #5670

@jsignell jsignell closed this Jan 19, 2022
@tharris72

Copy link
Copy Markdown
Contributor Author

@jsignell Thanks for the help! I appreciate it!

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.

6 participants