Skip to content

Commit b825368

Browse files
committed
Small corrections, adding examples requirements in the design guide. SI units corrections and clarifications. Using const and Defaults to in class documentation. Building reference change.
1 parent 22b72ad commit b825368

File tree

1 file changed

+17
-9
lines changed

1 file changed

+17
-9
lines changed

docs/design_guide.rst

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Start libraries with the cookiecutter
1818
Cookiecutter is a tool that lets you bootstrap a new repo based on another repo.
1919
We've made one `here <https://github.com/adafruit/cookiecutter-adafruit-circuitpython>`_
2020
for CircuitPython libraries that include configs for Travis CI and ReadTheDocs
21-
along with a setup.py, license, code of conduct and readme.
21+
along with a setup.py, license, code of conduct, readme among other files.
2222

2323
.. code-block::sh
2424
@@ -252,7 +252,7 @@ At the class level document what class does and how to initialize it::
252252
"""DS3231 real-time clock.
253253

254254
:param ~busio.I2C i2c_bus: The I2C bus the DS3231 is connected to.
255-
:param int address: The I2C address of the device.
255+
:param int address: The I2C address of the device. Defaults to :const:`0x40`
256256
"""
257257

258258
def __init__(self, i2c_bus, address=0x40):
@@ -267,7 +267,7 @@ Renders as:
267267
DS3231 real-time clock.
268268

269269
:param ~busio.I2C i2c_bus: The I2C bus the DS3231 is connected to.
270-
:param int address: The I2C address of the device.
270+
:param int address: The I2C address of the device. Defaults to :const:`0x40`
271271

272272
Attributes
273273
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -516,6 +516,15 @@ when using ``const()``, keep in mind these general guide lines:
516516
- If user will not need access to variable, prefix name with a leading
517517
underscore, ex: ``_SOME_CONST``.
518518

519+
Libraries Examples
520+
------------------
521+
When adding examples, cookiecutter will add a ``<name>_simpletest.py`` file in the examples directory for you.
522+
Be sure to include code with the library minimal functionalities to work on a device.
523+
You could other examples if needed featuring different
524+
functionalities of the library.
525+
If you add additional examples, be sure to include them in the ``examples.rst``. Naming of the examples
526+
files should use the name of the library followed by a description, using underscore to separate them.
527+
519528
Sensor properties and units
520529
--------------------------------------------------------------------------------
521530

@@ -536,17 +545,17 @@ properties.
536545
+-----------------------+-----------------------+-------------------------------------------------------------------------+
537546
| ``gyro`` | (float, float, float) | x, y, z radians per second |
538547
+-----------------------+-----------------------+-------------------------------------------------------------------------+
539-
| ``temperature`` | float | degrees centigrade |
548+
| ``temperature`` | float | degrees Celsius |
540549
+-----------------------+-----------------------+-------------------------------------------------------------------------+
541550
| ``CO2`` | float | measured CO2 in ppm |
542551
+-----------------------+-----------------------+-------------------------------------------------------------------------+
543552
| ``eCO2`` | float | equivalent/estimated CO2 in ppm (estimated from some other measurement) |
544553
+-----------------------+-----------------------+-------------------------------------------------------------------------+
545554
| ``TVOC`` | float | Total Volatile Organic Compounds in ppb |
546555
+-----------------------+-----------------------+-------------------------------------------------------------------------+
547-
| ``distance`` | float | centimeters |
556+
| ``distance`` | float | centimeters (cm) |
548557
+-----------------------+-----------------------+-------------------------------------------------------------------------+
549-
| ``proximity`` | int | non-unit-specifc proximity values (monotonic but not actual distance) |
558+
| ``proximity`` | int | non-unit-specific proximity values (monotonic but not actual distance) |
550559
+-----------------------+-----------------------+-------------------------------------------------------------------------+
551560
| ``light`` | float | non-unit-specific light levels (should be monotonic but is not lux) |
552561
+-----------------------+-----------------------+-------------------------------------------------------------------------+
@@ -568,7 +577,7 @@ properties.
568577
+-----------------------+-----------------------+-------------------------------------------------------------------------+
569578
| ``duty_cycle`` | int | 16-bit PWM duty cycle (regardless of output resolution) |
570579
+-----------------------+-----------------------+-------------------------------------------------------------------------+
571-
| ``frequency`` | int | Hertz |
580+
| ``frequency`` | int | Hertz (Hz) |
572581
+-----------------------+-----------------------+-------------------------------------------------------------------------+
573582
| ``value`` | bool | Digital logic |
574583
+-----------------------+-----------------------+-------------------------------------------------------------------------+
@@ -592,9 +601,8 @@ mimic the structure in ``shared-bindings``.
592601
To test your native modules or core enhancements, follow these Adafruit Learning Guides
593602
for building local firmware to flash onto your device(s):
594603

595-
`SAMD21 - Build Firmware Learning Guide <https://learn.adafruit.com/micropython-for-samd21/build-firmware>`_
604+
`Build CircuitPython <https://learn.adafruit.com/building-circuitpython>`_
596605

597-
`ESP8266 - Build Firmware Learning Guide <https://learn.adafruit.com/building-and-running-micropython-on-the-esp8266/overview>`_
598606

599607
MicroPython compatibility
600608
--------------------------------------------------------------------------------

0 commit comments

Comments
 (0)