Skip to content

Commit 7fc5763

Browse files
committed
Updated README to modern version
1 parent 52233a4 commit 7fc5763

File tree

1 file changed

+69
-29
lines changed

1 file changed

+69
-29
lines changed

README.rst

Lines changed: 69 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,22 @@
11
Introduction
22
============
33

4+
.. image:: https://readthedocs.org/projects/Adafruit-PlatformDetect/badge/?version=latest
5+
:target: https://circuitpython.readthedocs.io/projects/platformdetect/en/latest/
6+
:alt: Documentation Status
7+
8+
.. image:: https://img.shields.io/discord/327254708534116352.svg
9+
:target: https://discord.gg/nBQh6qu
10+
:alt: Discord
11+
12+
.. image:: https://github.com/adafruit/Adafruit_CircuitPython_PlatformDetect/workflows/Build%20CI/badge.svg
13+
:target: https://github.com/adafruit/Adafruit_CircuitPython_PlatformDetect/actions
14+
:alt: Build Status
15+
16+
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
17+
:target: https://github.com/psf/black
18+
:alt: Code Style: Black
19+
420
This library provides best-guess platform detection for a range of single-board
521
computers and (potentially) other platforms. It was written primarily for use
622
in `Adafruit_Blinka <https://github.com/adafruit/Adafruit_Blinka>`_, but may be
@@ -21,47 +37,71 @@ generally dependent on the former. Platform info is gathered from:
2137

2238
- Distribution-specific files such as /etc/armbian-release.
2339

24-
The API is currently unstable and may change drastically in future releases.
40+
Dependencies
41+
=============
42+
This driver depends on:
2543

26-
Installation
27-
============
44+
* `Adafruit CircuitPython <https://github.com/adafruit/circuitpython>`_
45+
46+
Please ensure all dependencies are available on the CircuitPython filesystem.
47+
This is easily achieved by downloading
48+
`the Adafruit library and driver bundle <https://circuitpython.org/libraries>`_.
49+
50+
Installing from PyPI
51+
=====================
52+
.. note:: This library is not available on PyPI yet. Install documentation is included
53+
as a standard element. Stay tuned for PyPI availability!
54+
55+
.. todo:: Remove the above note if PyPI version is/will be available at time of release.
56+
If the library is not planned for PyPI, remove the entire 'Installing from PyPI' section.
57+
58+
On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from
59+
PyPI <https://pypi.org/project/Adafruit-PlatformDetect/>`_. To install for current user:
60+
61+
.. code-block:: shell
62+
63+
pip3 install Adafruit-PlatformDetect
2864
29-
On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from
30-
PyPI <https://pypi.org/project/adafruit-circuitpython-motorkit/>`_. To install for current user:
65+
To install system-wide (this may be required in some cases):
3166

32-
.. code-block:: shell
67+
.. code-block:: shell
3368
34-
pip3 install Adafruit-PlatformDetect
69+
sudo pip3 install Adafruit-PlatformDetect
3570
36-
To install system-wide (this may be required in some cases):
71+
To install in a virtual environment in your current project:
3772

38-
.. code-block:: shell
73+
.. code-block:: shell
3974
40-
sudo pip3 install Adafruit-PlatformDetect
75+
mkdir project-name && cd project-name
76+
python3 -m venv .env
77+
source .env/bin/activate
78+
pip3 install Adafruit-PlatformDetect
4179
42-
To install in a virtual environment in your current project:
80+
Usage Example
81+
=============
4382

44-
.. code-block:: shell
83+
.. code-block:: python
4584
46-
mkdir project-name && cd project-name
47-
python3 -m venv .env
48-
source .env/bin/activate
49-
pip3 install Adafruit-PlatformDetect
85+
from adafruit_platformdetect import Detector
86+
detector = Detector()
87+
print("Chip id: ", detector.chip.id)
88+
print("Board id: ", detector.board.id)
5089
51-
Usage
52-
=====
90+
# Check for specific board models:
91+
print("Pi 3B+? ", detector.board.RASPBERRY_PI_3B_PLUS)
92+
print("BBB? ", detector.board.BEAGLEBONE_BLACK)
93+
print("Orange Pi PC? ", detector.board.ORANGE_PI_PC)
94+
print("generic Linux PC? ", detector.board.GENERIC_LINUX_PC)
5395
54-
.. code-block:: python
96+
Contributing
97+
============
5598

56-
from adafruit_platformdetect import Detector
57-
detector = Detector()
58-
print("Chip id: ", detector.chip.id)
59-
print("Board id: ", detector.board.id)
99+
Contributions are welcome! Please read our `Code of Conduct
100+
<https://github.com/adafruit/Adafruit_CircuitPython_PlatformDetect/blob/master/CODE_OF_CONDUCT.md>`_
101+
before contributing to help this project stay welcoming.
60102

61-
# Check for specific board models:
62-
print("Pi 3B+? ", detector.board.RASPBERRY_PI_3B_PLUS)
63-
print("BBB? ", detector.board.BEAGLEBONE_BLACK)
64-
print("Orange Pi PC? ", detector.board.ORANGE_PI_PC)
65-
print("generic Linux PC? ", detector.board.GENERIC_LINUX_PC)
103+
Documentation
104+
=============
66105

67-
See https://github.com/adafruit/Adafruit_Python_PlatformDetect/blob/master/bin/detect.py for more possible detectable boards
106+
For information on building library documentation, please check out `this guide <https://learn.adafruit.com/creating-and-sharing-a-circuitpython-library/sharing-our-docs-on-readthedocs#sphinx-5-1>`_.
107+

0 commit comments

Comments
 (0)