-
-
Notifications
You must be signed in to change notification settings - Fork 495
Update Contribution types, Reference, and In depth explanations in Contributing guide #2521
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
Changes from all commits
78c638b
3def7ae
3036a2a
78d1338
08d7293
ffddf78
7a9b204
7029785
f76dc7d
2ef314d
9b0739c
e85410b
0e3195a
17eca88
a824796
35d5ab9
c4a6531
cea1a50
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,9 @@ | ||
| # Contributing code via pull requests | ||
|
|
||
| While issue reporting is valuable, we strongly encourage users who are | ||
| inclined to do so to submit patches for new or existing issues via pull | ||
| requests. This is particularly the case for simple fixes, such as typos | ||
| or tweaks to documentation, which do not require a heavy investment | ||
| of time and attention. | ||
| inclined to do so to submit patches for new or existing issues via pull requests. | ||
| This is particularly the case for simple fixes, such as typos or tweaks to documentation, | ||
| which do not require a heavy investment of time and attention. | ||
|
|
||
| Contributors are also encouraged to contribute new code to enhance ArviZ's | ||
| functionality, also via pull requests. | ||
|
|
@@ -13,10 +12,21 @@ to ensure that any new contribution does not strongly overlap with existing | |
| functionality and open a "Feature Request" issue before starting to work | ||
| on the new feature. | ||
|
|
||
| (steps_before_working)= | ||
| :::{note} | ||
| Since version 1.0, ArviZ is organized as a metapackage that brings together functionality | ||
| from three packages: [`arviz-base`](https://github.com/arviz-devs/arviz-base), | ||
| [`arviz-stats`](https://github.com/arviz-devs/arviz-stats), and | ||
| [`arviz-plots`](https://github.com/arviz-devs/arviz-plots). | ||
|
|
||
| As a result, contributing to ArviZ typically means contributing to one of these packages rather | ||
| than to the main ArviZ repository itself. | ||
| When browsing issues or pull requests, keep in mind that most activity happens in the | ||
| corresponding package repositories. | ||
| ::: | ||
|
|
||
| (steps_before_working)= | ||
| ## Steps before starting work | ||
| Before starting work on a pull request double-check that no one else | ||
| Before starting work on a pull request, double-check that no one else | ||
| is working on the ticket in both issue tickets and pull requests. | ||
|
|
||
| ArviZ is a community-driven project and always has multiple people working | ||
|
|
@@ -25,50 +35,67 @@ that we all make the most of our time and we don't have two contributors | |
| working on the same changes. Let's see what to do when you encounter the following scenarios: | ||
|
|
||
| ### If an issue ticket exists | ||
| If an issue exists check the ticket to ensure no one else has started working on it. If you are first to start work, comment on the ticket to make it evident to others. If the comment looks old or abandoned leave a comment asking if you may start work. | ||
| If an issue exists, check the ticket to ensure no one else has started working on it. | ||
| If you are first to start work, comment on the ticket to make it evident to others. | ||
| If the comment looks old or abandoned, leave a comment asking if you may start work. | ||
|
|
||
| ### If an issue ticket doesn't exist | ||
| Open an issue ticket for the issue and state that you'll be solving the issue with a pull request. Optionally create a pull request and add `[WIP]` in the title to indicate Work in Progress. | ||
| Open an issue ticket for the issue and state that you'll be solving the issue with a pull request. | ||
| Optionally create a pull request and add `[WIP]` in the title to indicate Work in Progress. | ||
|
|
||
| ### In the event of a conflict | ||
| In the event of two or more people working on the same issue, the general precedence will go to the person who first commented on the issue. If no comments it will go to the first person to submit a PR for review. Each situation will differ though, and the core contributors will make the best judgment call if needed. | ||
| In the event of two or more people working on the same issue, | ||
| the general precedence will go to the person who first commented on the issue. | ||
| If there are no comments, it will go to the first person to submit a PR for review. | ||
| Each situation will differ though, and the core contributors will make the best judgment call if needed. | ||
|
|
||
| ### If the issue ticket has someone assigned to it | ||
| If the issue is assigned then precedence goes to the assignee. However, if there has been no activity for 2 weeks from the assignment date, the ticket is open for all again and can be unassigned. | ||
| If the issue is assigned, then precedence goes to the assignee. | ||
| However, if there has been no activity for 2 weeks from the assignment date, | ||
| the ticket is open for all again and can be unassigned. | ||
|
|
||
| (dev_summary)= | ||
| ## Development process - summary | ||
| ## Development process | ||
|
|
||
| ## Code Formatting | ||
| For code generally follow the | ||
| [TensorFlow's style guide](https://www.tensorflow.org/community/contribute/code_style) | ||
| or the [Google style guide](https://github.com/google/styleguide/blob/gh-pages/pyguide.md). | ||
| Both more or less follow PEP 8. | ||
| TODO: Details and sections to be added... | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just flagging that I'm not sure what are the sections to add here. Also, should "## Docstring formatting", "## Documentation for user facing methods", and "## Tests" be included here?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would mention the workflow is forking, developing locally, running checks (tox mention, see later) then opening a PR, plus a link to the PR step-by-step tutorial for anyone who might be new. Second paragraph probably a quick overview about using tox to help with devops tasks, plus a mention of I do think all these 3 sections should instead be subsections inside this one. |
||
|
|
||
| Final formatting is done with [black](https://github.com/ambv/black). | ||
|
|
||
| (docstring_formatting)= | ||
| # Docstring formatting and type hints | ||
| ## Docstring formatting | ||
|
|
||
| Docstrings should follow the | ||
| [numpy docstring guide](https://numpydoc.readthedocs.io/en/latest/format.html). | ||
| Docstrings should follow the [numpy docstring guide](https://numpydoc.readthedocs.io/). | ||
| Extra guidance can also be found in | ||
| [pandas docstring guide](https://pandas.pydata.org/pandas-docs/stable/development/contributing_docstring.html). | ||
| Please reasonably document any additions or changes to the codebase, | ||
| when in doubt, add a docstring. | ||
| Please reasonably document any additions or changes to the codebase; when in doubt, add a docstring. | ||
|
|
||
| While ArviZ does not include type hints in function and method definitions, | ||
| it uses [Docstub](https://docstub.readthedocs.io) to generate `.pyi` files | ||
| from numpydoc-style docstrings. | ||
| For this reason, clear and complete docstrings are important, | ||
| as they are used to generate type information for third-party tools such as type checkers and IDEs. | ||
|
|
||
| The different formatting and aim between numpydoc style type description and | ||
| [type hints](https://docs.python.org/3/library/typing.html) | ||
| should be noted. numpydoc style targets docstrings and aims to be human | ||
| readable whereas type hints target function definitions and `.pyi` files and | ||
| aim to help third party tools such as type checkers or IDEs. ArviZ does not | ||
| require functions to include type hints | ||
| however contributions including them are welcome. | ||
|
|
||
| ## Documentation for user facing methods | ||
| If changes are made to a method documented in the {ref}`ArviZ API Guide <api>` | ||
| please consider adding inline documentation examples. | ||
| You can refer to {func}`az.plot_posterior <arviz.plot_posterior>` for a good example. | ||
|
|
||
| ### Tests | ||
| Section in construction | ||
| If changes are made to a method documented in {ref}`ArviZ-base API <arviz_base:api_reference>`, | ||
| {ref}`ArviZ-stats API <arviz_stats:api_reference>`, or {ref}`ArviZ-plots API <arviz_plots:api_reference>`; | ||
| please consider adding inline examples, See Also links, | ||
| References when relevant (e.g., if it implements a published method), | ||
| and Notes with implementation details that might be relevant to users. | ||
| You can refer to {func}`~arviz_plots.plot_dist` and {func}`~arviz_plots.plot_forest` for good examples. | ||
|
|
||
| ## Tests | ||
|
|
||
| :::{caution} Section in construction | ||
| ::: | ||
tomicapretto marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| Tests are run through dedicated tox tasks, however, due to differences in architecture, | ||
| combinations of optional dependencies we might want to test and scope differences between libraries, | ||
| each library defines their own testing tasks. | ||
|
|
||
| Moreover, we also have package specific test organization and some extra pytest customization available in some cases. | ||
| Consequently, each library has its own contributing page on how to run the test suite or contribute to it: | ||
|
|
||
| * ArviZ-base: coming soon | ||
| * {ref}`ArviZ-stats <arviz_stats:contributing_testing>` | ||
| * {ref}`ArviZ-plots <arviz_plots:contributing_testing>` | ||
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.