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

Add type hints and/or reST docstrings #13437

Open
12 tasks
samhaese opened this issue Dec 17, 2023 · 7 comments
Open
12 tasks

Add type hints and/or reST docstrings #13437

samhaese opened this issue Dec 17, 2023 · 7 comments
Labels
good first issue great for new contributors, code change is envisioned to be trivial/relatively straight-forward source::community catch-all for issues filed by community members type::feature request for a new feature or capability

Comments

@samhaese
Copy link
Contributor

samhaese commented Dec 17, 2023

What is the idea?

A lot of the conda modules have no type hinting, incomplete type hinting, no docstrings, or docstrings with varying formats (reST, Google).

What should happen?

We should clean up the types and doc strings of one module or several small modules per PR until the code base has better documentation and type hints.

Type hints should follow mypy guide

Docstrings should follow Sphinx guide

Modules in progress:

(None)

Modules finished:

Tasks

@samhaese samhaese added the type::feature request for a new feature or capability label Dec 17, 2023
@travishathaway travishathaway added the source::community catch-all for issues filed by community members label Dec 18, 2023
@travishathaway
Copy link
Contributor

Hi @samhaese,

Thanks for creating this. We would be open to any pull request adding more type hinting or consolidating our documentation style. conda.deprecations is a good reference to use.

My advice to you if you want to submit such pull requests is to keep them narrow in scope (e.g. focus on one module at a time or limit lines to changed to around 1,000). This makes the pull requests smaller and easier for us to review. We have also begun to render our API documentation here recently:

Please make sure that it renders correctly there when making any changes.

Let us know if you need any help on this. We are happy to assist.

@travishathaway
Copy link
Contributor

travishathaway commented Dec 18, 2023

One more thing:

It would be nice if you could make a check list of the things that you think should be updated on this issue. That way, others could potentially pick up some of this work. We could add our own suggestions to this list too.

@samhaese
Copy link
Contributor Author

The task list and new layout of the issue has been added to help identify where people can easily contribute. I'll do another pass soon and mark modules completed that don't actually need any additional type hints or doc strings.

Maybe this is a "good first issue"?

@jezdez
Copy link
Member

jezdez commented Dec 22, 2023

FWIW, since this came up in #13445, we should make use of sphinx-autoapi's ability to use typehints automatically to render return types and not duplicate the information in the source code.

@jezdez jezdez added the good first issue great for new contributors, code change is envisioned to be trivial/relatively straight-forward label Dec 22, 2023
@Nathann03
Copy link
Contributor

Whoops didn't mean to do that

@Nathann03
Copy link
Contributor

I'll be starting to work on this issue if that is fine! First time contributor and ready to help!

@samhaese
Copy link
Contributor Author

@Nathann03 I've been keeping each pull request to one module at a time so far. As you look through the code, find a module you think you can tackle and submit a PR linking to this issue and I'll add it to the list at the top.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue great for new contributors, code change is envisioned to be trivial/relatively straight-forward source::community catch-all for issues filed by community members type::feature request for a new feature or capability
Projects
Status: 🆕 New
Development

No branches or pull requests

4 participants