Skip to content

Commit d72ff6d

Browse files
author
Martin O'Hanlon
authored
Merge pull request #43 from RaspberryPiFoundation/dev
v0.1.0
2 parents 7a237ff + 03be2b4 commit d72ff6d

14 files changed

+422
-20
lines changed

.github/CODE_OF_CONDUCT.md

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
2+
# Contributor Covenant Code of Conduct
3+
4+
## Our Pledge
5+
6+
We as members, contributors, and leaders pledge to make participation in our
7+
community a harassment-free experience for everyone, regardless of age, body
8+
size, visible or invisible disability, ethnicity, sex characteristics, gender
9+
identity and expression, level of experience, education, socio-economic status,
10+
nationality, personal appearance, race, caste, color, religion, or sexual
11+
identity and orientation.
12+
13+
We pledge to act and interact in ways that contribute to an open, welcoming,
14+
diverse, inclusive, and healthy community.
15+
16+
## Our Standards
17+
18+
Examples of behavior that contributes to a positive environment for our
19+
community include:
20+
21+
* Demonstrating empathy and kindness toward other people
22+
* Being respectful of differing opinions, viewpoints, and experiences
23+
* Giving and gracefully accepting constructive feedback
24+
* Accepting responsibility and apologizing to those affected by our mistakes,
25+
and learning from the experience
26+
* Focusing on what is best not just for us as individuals, but for the overall
27+
community
28+
29+
Examples of unacceptable behavior include:
30+
31+
* The use of sexualized language or imagery, and sexual attention or advances of
32+
any kind
33+
* Trolling, insulting or derogatory comments, and personal or political attacks
34+
* Public or private harassment
35+
* Publishing others' private information, such as a physical or email address,
36+
without their explicit permission
37+
* Other conduct which could reasonably be considered inappropriate in a
38+
professional setting
39+
40+
## Enforcement Responsibilities
41+
42+
Community leaders are responsible for clarifying and enforcing our standards of
43+
acceptable behavior and will take appropriate and fair corrective action in
44+
response to any behavior that they deem inappropriate, threatening, offensive,
45+
or harmful.
46+
47+
Community leaders have the right and responsibility to remove, edit, or reject
48+
comments, commits, code, wiki edits, issues, and other contributions that are
49+
not aligned to this Code of Conduct, and will communicate reasons for moderation
50+
decisions when appropriate.
51+
52+
## Scope
53+
54+
This Code of Conduct applies within all community spaces, and also applies when
55+
an individual is officially representing the community in public spaces.
56+
Examples of representing our community include using an official e-mail address,
57+
posting via an official social media account, or acting as an appointed
58+
representative at an online or offline event.
59+
60+
## Enforcement
61+
62+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
63+
reported to the community leaders responsible for enforcement at
64+
65+
All complaints will be reviewed and investigated promptly and fairly.
66+
67+
All community leaders are obligated to respect the privacy and security of the
68+
reporter of any incident.
69+
70+
## Enforcement Guidelines
71+
72+
Community leaders will follow these Community Impact Guidelines in determining
73+
the consequences for any action they deem in violation of this Code of Conduct:
74+
75+
### 1. Correction
76+
77+
**Community Impact**: Use of inappropriate language or other behavior deemed
78+
unprofessional or unwelcome in the community.
79+
80+
**Consequence**: A private, written warning from community leaders, providing
81+
clarity around the nature of the violation and an explanation of why the
82+
behavior was inappropriate. A public apology may be requested.
83+
84+
### 2. Warning
85+
86+
**Community Impact**: A violation through a single incident or series of
87+
actions.
88+
89+
**Consequence**: A warning with consequences for continued behavior. No
90+
interaction with the people involved, including unsolicited interaction with
91+
those enforcing the Code of Conduct, for a specified period of time. This
92+
includes avoiding interactions in community spaces as well as external channels
93+
like social media. Violating these terms may lead to a temporary or permanent
94+
ban.
95+
96+
### 3. Temporary Ban
97+
98+
**Community Impact**: A serious violation of community standards, including
99+
sustained inappropriate behavior.
100+
101+
**Consequence**: A temporary ban from any sort of interaction or public
102+
communication with the community for a specified period of time. No public or
103+
private interaction with the people involved, including unsolicited interaction
104+
with those enforcing the Code of Conduct, is allowed during this period.
105+
Violating these terms may lead to a permanent ban.
106+
107+
### 4. Permanent Ban
108+
109+
**Community Impact**: Demonstrating a pattern of violation of community
110+
standards, including sustained inappropriate behavior, harassment of an
111+
individual, or aggression toward or disparagement of classes of individuals.
112+
113+
**Consequence**: A permanent ban from any sort of public interaction within the
114+
community.
115+
116+
## Attribution
117+
118+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
119+
version 2.1, available at
120+
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
121+
122+
Community Impact Guidelines were inspired by
123+
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
124+
125+
For answers to common questions about this code of conduct, see the FAQ at
126+
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
127+
[https://www.contributor-covenant.org/translations][translations].
128+
129+
[homepage]: https://www.contributor-covenant.org
130+
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
131+
[Mozilla CoC]: https://github.com/mozilla/diversity
132+
[FAQ]: https://www.contributor-covenant.org/faq
133+
[translations]: https://www.contributor-covenant.org/translations

.github/CONTRIBUTING.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Contributing
2+
3+
Contributions to the picozero are welcome. Here is some advice.
4+
5+
1. picozero is 'lightweight', it is designed to be easy to use but also needs to run on a micro controller, please take this into account when considering feature requests or raising issues.
6+
2. see below for other stuff!
7+
8+
# Status
9+
10+
picozero is currently in Beta, pre release 1.0, you should consider the following:
11+
12+
- The API is not yet set, however, this doesn't mean that backwards compatibility is not important! It is a balancing act.
13+
- Requests for new features will need to be prioritised and responses to feature requests may take some time.
14+
- Refactoring of the code base is very likely and as a result pull requests may need rework.
15+
- Issues are likely to exist within the code base, be kind!
16+
17+
# Suggestions
18+
19+
If you have an idea for a new feature or would like to see a device included in picozero, please raise an [issue](https://github.com/RaspberryPiFoundation/picozero/issues). Please explain your reasoning clearly.
20+
21+
# Bugs
22+
23+
Please raise an [issue](https://github.com/RaspberryPiFoundation/picozero/issues) for any bugs found. Please include code examples and circuit diagrams if appropriate.
24+
25+
# Pull requests
26+
27+
All pull requests should be based on the [dev](https://github.com/RaspberryPiFoundation/picozero/tree/dev) branch of picozero.
28+

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behaviour:
15+
1. Setup this device like this '...'
16+
2. Run this code '....'
17+
3. This thing occurred '...'
18+
4. This error was reported '...'
19+
20+
Please include code in code blocks e.g.
21+
22+
```python
23+
print("picozero")
24+
```
25+
26+
**Expected behaviour**
27+
A clear and concise description of what you expected to happen.
28+
29+
**System information:**
30+
- OS: [e.g. Windows]
31+
- Development environment [e.g. Thonny]
32+
- picozero version: [available in `/Lib/picozero/__init__.py`]
33+
34+
**Additional context**
35+
Add any other context about the problem here.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this picozero
4+
title: ''
5+
labels: nice to have
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

README.rst

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
picozero
22
========
33

4+
|pypibadge| |docsbadge|
5+
46
A beginner-friendly library for using common electronics components with the Raspberry Pi Pico.
57

68
.. code-block:: python
@@ -19,9 +21,9 @@ A beginner-friendly library for using common electronics components with the Ras
1921
Status
2022
------
2123

22-
Pre-alpha - not yet for general release. Documentation is not yet available. There will be many bugs and issues.
24+
Beta. There will be bugs and issues. API changes are likely.
2325

24-
Full documentation will be available at `picozero.readthedocs.io <https://picozero.readthedocs.io>`_ :
26+
Documentation is available at `picozero.readthedocs.io <https://picozero.readthedocs.io>`_ :
2527

2628
- `Installation and getting started guide <https://picozero.readthedocs.io/en/latest/gettingstarted.html>`_
2729
- `Recipes and how-to's <https://picozero.readthedocs.io/en/latest/recipes.html>`_
@@ -32,3 +34,10 @@ Notes
3234

3335
picozero is inspired by `gpiozero <https://gpiozero.readthedocs.io/en/stable/>`_ (and reuses some of its underlying structure), but is by design lighter weight and aligned with the Raspberry Pi Pico. Thank you to everyone who has contributed to the gpiozero project.
3436

37+
.. |pypibadge| image:: https://badge.fury.io/py/picozero.svg
38+
:target: https://badge.fury.io/py/picozero
39+
:alt: Latest Version
40+
41+
.. |docsbadge| image:: https://readthedocs.org/projects/picozero/badge/
42+
:target: https://readthedocs.org/projects/picozero/
43+
:alt: Docs

docs/api.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,21 @@ Speaker
5656
:inherited-members:
5757
:members:
5858

59+
60+
DigitalOutputDevice
61+
-------------------
62+
.. autoclass:: DigitalOutputDevice
63+
:show-inheritance:
64+
:inherited-members:
65+
:members:
66+
67+
PWMOutputDevice
68+
---------------
69+
.. autoclass:: PWMOutputDevice
70+
:show-inheritance:
71+
:inherited-members:
72+
:members:
73+
5974
Button
6075
------
6176

@@ -87,3 +102,11 @@ TemperatureSensor
87102
:show-inheritance:
88103
:inherited-members:
89104
:members:
105+
106+
DigitalInputDevice
107+
------------------
108+
109+
.. autoclass:: DigitalInputDevice
110+
:show-inheritance:
111+
:inherited-members:
112+
:members:

docs/changelog.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@ Change log
33

44
.. currentmodule:: picozero
55

6+
0.1.0 - 2022-04-08
7+
~~~~~~~~~~~~~~~~~~
8+
9+
+ Beta release
10+
+ Documentation updates
11+
+ Minor bug fixes and refactoring
12+
613
0.0.2 - 2022-03-31
714
~~~~~~~~~~~~~~~~~~
815

docs/conf.py

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import sys
1515
# sys.path.insert(0, os.path.abspath('.'))
1616
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))
17+
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
1718

1819
# Mock out certain modules while building documentation
1920
class Mock:
@@ -45,7 +46,7 @@ def __getattr__(cls, name):
4546
author = 'Raspberry Pi Foundation'
4647

4748
# The full version, including alpha/beta/rc tags
48-
release = '0.0.2'
49+
release = '0.1.0'
4950

5051

5152
# -- General configuration ---------------------------------------------------
@@ -73,7 +74,23 @@ def __getattr__(cls, name):
7374
# The theme to use for HTML and HTML Help pages. See the documentation for
7475
# a list of builtin themes.
7576
#
76-
html_theme = 'alabaster'
77+
# The theme to use for HTML and HTML Help pages. See the documentation for
78+
# a list of builtin themes.
79+
#
80+
if on_rtd:
81+
html_theme = 'sphinx_rtd_theme'
82+
#html_theme_options = {}
83+
html_sidebars = {
84+
'**': [
85+
'globaltoc.html',
86+
'relations.html',
87+
'searchbox.html',
88+
],
89+
}
90+
else:
91+
html_theme = 'alabaster'
92+
#html_theme_options = {}
93+
#html_sidebars = {}
7794

7895
# Add any paths that contain custom static files (such as style sheets) here,
7996
# relative to this directory. They are copied after the builtin static files,

docs/contributing.rst

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
Contributing
2+
============
3+
4+
Contributions to the picozero are welcome. Here is some advice.
5+
6+
1. picozero is 'lightweight', it is designed to be easy to use but also needs to run on a micro controller, please take this into account when considering feature requests or raising issues.
7+
2. see below for other stuff!
8+
9+
Status
10+
------
11+
12+
picozero is currently in Beta, pre release 1.0, you should consider the following:
13+
14+
- The API is not yet set, however, this doesn't mean that backwards compatibility is not important! It is a balancing act.
15+
- Requests for new features will need to be prioritised and responses to feature requests may take some time.
16+
- Refactoring of the code base is very likely and as a result pull requests may need rework.
17+
- Issues are likely to exist within the code base, be kind!
18+
19+
Suggestions
20+
-----------
21+
22+
If you have an idea for a new feature or would like to see a device included in picozero, please raise an `issue`_. Please explain your reasoning clearly.
23+
24+
Bugs
25+
----
26+
27+
Please raise an `issue`_ for any bugs found. Please include code examples and circuit diagrams if appropriate.
28+
29+
Pull requests
30+
-------------
31+
32+
All pull requests should be based on the `dev <https://github.com/RaspberryPiFoundation/picozero/tree/dev>`_ branch of picozero.
33+
34+
.. _issue: https://github.com/RaspberryPiFoundation/picozero/issues

0 commit comments

Comments
 (0)