Skip to content

Commit 3aba79b

Browse files
authored
Merge branch 'pymc-devs:main' into main
2 parents bc3d659 + 66b69c6 commit 3aba79b

File tree

88 files changed

+25605
-7263
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+25605
-7263
lines changed

.github/ISSUE_TEMPLATE/bug-report.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
name: 'Bug Report'
3+
about: Inform about errors and mistakes in the notebooks
4+
5+
---

.github/ISSUE_TEMPLATE/tracker.md

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
name: 'Tracker issue'
3+
about: Create a tracker issue for the GitHub project
4+
labels: tracker id
5+
6+
---
7+
8+
File:
9+
Reviewers:
10+
11+
> The sections below may still be pending. If so, the issue is still available, it simply doesn't
12+
> have specific guidance yet. Please refer to [this overview of updates](https://github.com/pymc-devs/pymc-examples/wiki/Notebook-updates-overview)
13+
14+
## Known changes needed
15+
Changes listed in this section should all be done at some point in order to get this
16+
notebook to a "Best Practices" state. However, these are probably not enough!
17+
Make sure to thoroughly review the notebook and search for other updates.
18+
19+
### General updates
20+
*
21+
22+
### ArviZ related
23+
*
24+
25+
## Changes for discussion
26+
Changes listed in this section are up for discussion, these are ideas on how to improve
27+
the notebook but may not have a clear implementation, or fix some know issue only partially.
28+
29+
### General updates
30+
*
31+
32+
### ArviZ related
33+
*
34+
35+
## Notes
36+
37+
### Exotic dependencies
38+
39+
### Computing requirements

.github/PULL_REQUEST_TEMPLATE.md

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
## Description
2+
<!-- Thank you so much for your PR!
3+
4+
To help us review your contribution, please provide the info requested below. Otherwise,
5+
we may leave reviews that are actually out of the scope of the current PR. -->
6+
7+
Addresses issue #xxx and aims to advance it to <!-- Tracker column: General Updates, ArviZ, Best Practices -->
8+
9+
<!-- We understand that PRs can sometimes be overwhelming, especially as the reviews start coming in.
10+
Please let us know if the reviews are unclear or the recommended next step seems overly demanding,
11+
if you would like help in addressing a reviewer's comments,
12+
or if you have been waiting too long to hear back on your PR.
13+
14+
Also, please consider reading the contributing guidelines and code of conduct carefully before submitting the PR. They are available at
15+
- https://github.com/arviz-devs/arviz/blob/main/CONTRIBUTING.md
16+
- https://github.com/arviz-devs/arviz/blob/main/CODE_OF_CONDUCT.md -->

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
*.pyc
22
.ipynb_checkpoints
3+
.vscode/*

.pre-commit-config.yaml

+11-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/nbQA-dev/nbQA
3-
rev: 0.5.5
3+
rev: 0.10.0
44
hooks:
55
- id: nbqa-black
66
additional_dependencies: [black==20.8b1]
@@ -9,6 +9,16 @@ repos:
99
- id: nbqa-pyupgrade
1010
additional_dependencies: [pyupgrade==2.7.4]
1111
args: [--py37-plus]
12+
- repo: https://github.com/MarcoGorelli/check-execution-order
13+
rev: v0.1.1
14+
hooks:
15+
- id: check-execution-order
16+
exclude: |
17+
(?x)^
18+
^examples/samplers/DEMetropolisZ_EfficiencyComparison\.ipynb$
19+
|examples/variational_inference/convolutional_vae_keras_advi\.ipynb$
20+
|examples/pymc3_howto/sampling_callback\.ipynb$
21+
|examples/gaussian_processes/GP-Latent\.ipynb$
1222
- repo: local
1323
hooks:
1424
- id: watermark

CODE_OF_CONDUCT.md

+78
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# PyMC3 Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, sex characteristics, gender identity and expression,
9+
level of experience, education, socio-economic status, nationality, personal
10+
appearance, race, religion, or sexual identity and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting PyMC3 developer Christopher Fonnesbeck via email
59+
([email protected]) or phone (615-955-0380). Alternatively, you
60+
may also contact NumFOCUS Executive Director Leah Silen (512-222-5449) or
61+
fill an anonymous report using [NumFOCUS Typeform](https://numfocus.typeform.com/to/ynjGdT).
62+
As PyMC3 is a member of NumFOCUS and subscribes to their code of conduct as a
63+
precondition for continued membership. All complaints will be reviewed and
64+
investigated and will result in a response that is deemed necessary and
65+
appropriate to the circumstances. The project team is obligated to maintain
66+
confidentiality with regard to the reporter of an incident. Further details of
67+
specific enforcement policies may be posted separately.
68+
69+
Project maintainers who do not follow or enforce the Code of Conduct in good
70+
faith may face temporary or permanent repercussions as determined by other
71+
members of the project's leadership.
72+
73+
## Attribution
74+
75+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
76+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
77+
78+
[homepage]: https://www.contributor-covenant.org

CONTRIBUTING.md

+106
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
# Guidelines for Contributing
2+
As part of the PyMC3 library documentation, the guidelines to contribute to
3+
pymc-examples are based on [PyMC3 contributing guidelines](https://github.com/pymc-devs/pymc3/blob/master/CONTRIBUTING.md). Please refer there
4+
for a detailed description of the Fork-PR contributing workflow, see "Steps" section,
5+
and note that you'll need to update the repository URLs and branch names.
6+
7+
This document therefore covers only some specific guidelines specific to this repository, mainly,
8+
an adapted version of the "Pull Request Checklist" and some extra guidelines for
9+
efficient collaboration with Jupyter notebooks.
10+
11+
## Before submitting a pull request
12+
The notebooks in pymc-examples are in the process of being updated and reexecuted.
13+
The main progress tracker is [this GitHub project](https://github.com/pymc-devs/pymc-examples/projects/1).
14+
15+
### About the notebook tracker project
16+
This project serves as both tracker and organizer of the work needed on each of the example notebooks in this repo.
17+
Each notebook will have its own issue where we can point out things to fix and discuss them.
18+
These issue tickets are placed on one of the columns in this project based on the state of the notebook:
19+
20+
* **To Do:** notebooks in this column are outdated, don't use ArviZ or InferenceData (or do so only partially), use deprecated pymc3 arguments or show other practices that should be updated and improved.
21+
* **General updates:** notebooks in this column have pymc3 code up to date with v3, but don't use ArviZ (or do so only partially)
22+
* **ArviZ:** notebooks in this column use ArviZ but still have bad examples of pymc3 usage.
23+
* **Best practices:** notebooks in this column use ArviZ and pymc3 best practices. This column alone does not represent any extra updates, it is only the place for notebooks fulfilling the requirements to be in both "general updates" and "ArviZ".
24+
* **v4:** notebooks in this column use ArviZ and have been updated and executed with pymc3 v4.
25+
26+
Therefore, all notebooks will be progressively updated along this path:
27+
28+
```
29+
/ --> General updates -- \
30+
To Do --< >--> Best Practices (--> v4)
31+
\ --> ArviZ -- /
32+
```
33+
34+
Each pull request should update a single notebook 1-2 positions to the right.
35+
Before starting a work on a pull request look at the tracker issue of the
36+
notebook you are planning to edit to make sure it is not being updated by someone
37+
else.
38+
39+
**Note on labels**: The labels on an issue will apply to the most immediate 1 position update.
40+
One issue can be labeled "good first issue" for updating from "To Do" to "General updates", but
41+
that does not mean that updating from "To Do"->"ArviZ" or
42+
"General Updates"->"Best Practices" won't be challenging.
43+
The same could be true the other way around.
44+
In case of doubt, don't hesitate to ask and read over the notebook to
45+
see what changes are expected.
46+
47+
If there are no comments and nobody is working on this notebook,
48+
comment on the ticket to make it evident to others, we will assign
49+
the issue to you as soon as possible.
50+
If the comment if more than two weeks old and there are no signs of
51+
activity, leave a comment for a maintainer to assign the issue to you.
52+
53+
We encourage you to submit a pull request as soon as possible after commenting
54+
and being assigned the issue and
55+
add `[WIP]` in the title to indicate Work in Progress.
56+
57+
### About PR timeline
58+
You are free and encouraged to work at your own pace as long as you keep
59+
track of your progress in the issues and PRs. There is no deadline nor
60+
maximum time an active PR can be open.
61+
62+
There is a maximum time of 2 weeks for inactive PRs,
63+
if there is no activity for two weeks,
64+
we will close the PR and the issue will be unassigned.
65+
We will try to ping you a few days before that happens,
66+
but not being receiving such ping does not mean you won't get unassigned.
67+
68+
If you know you won't be able to work during two weeks but plan to
69+
continue your work afterwards, let us know by commenting when you'll be able
70+
to retake the work.
71+
Alternatively, you can also contact your reviewers on [Discourse](https://discourse.pymc.io/)
72+
73+
As for review timeline, while you may get some reviews in a few hours or even some minutes
74+
if we happen to be working on related things, _you should not expect that to be the norm_.
75+
You should expect to receive review(s) for your PRs in 1-2 days. If two and a half days
76+
after submitting you still have not received any comment, let us know (i.e. tag whoever
77+
opened the issue you are addressing in a new PR comment. If at any point we were
78+
overwhelmed by PRs and delay this timeline, we will comment on your PR with an estimate
79+
of when you can expect a proper review.
80+
81+
### In the event of a conflict
82+
In the event of two or more people working on the same issue,
83+
the general precedence will go to the person who first commented in the issue.
84+
If no comments it will go to the first person to submit a PR for review.
85+
Each situation will differ though, and the core contributors will make the best judgement call if needed.
86+
87+
### If the issue ticket has someone assigned to it
88+
If the issue is assigned then precedence goes to the assignee.
89+
However if there has been no activity for 2 weeks from assignment date,
90+
the ticket is open for all again and will be unassigned.
91+
92+
## Pull request checklist
93+
94+
We recommended that your contribution complies with the following guidelines before you submit a pull request:
95+
96+
* Use the pull request title to describe the issue and mention the issue number in the pull request description. This will make sure a link back to the original issue is created. For example, use `Use ArviZ in sampler stats notebook` as a title and link to [#46](https://github.com/pymc-devs/pymc-examples/issues/46) in the description.
97+
* Please do not submit PRs that are not addressing an issue already present in the issue tracker.
98+
99+
* Prefix the title of incomplete contributions with `[WIP]` (to indicate a work in progress). WIPs may be useful to (1) indicate you are working on something to avoid duplicated work, (2) request broad review of functionality or API, or (3) seek collaborators.
100+
101+
* Make sure to run the whole notebook sequentially on a fresh kernel. You can do that with the
102+
"Restart & Run All" option before saving.
103+
104+
* No `pre-commit` errors: see the [Jupyter Notebook style](https://github.com/pymc-devs/pymc3/wiki/PyMC3-Jupyter-Notebook-Style-Guide) (and [Python code style](https://github.com/pymc-devs/pymc3/wiki/PyMC3-Python-Code-Style)) page from our Wiki on how to install and run it.
105+
106+
* Indicate how are you aiming to update the notebook (i.e. what is the target end column in the tracker). The pull request template has a template for this.

README.md

-2
This file was deleted.

0 commit comments

Comments
 (0)