@@ -39,6 +39,32 @@ libraries. Please ensure they are also available on the CircuitPython filesystem
39
39
This is easily achieved by downloading
40
40
`a library and driver bundle <https://github.com/adafruit/Adafruit_CircuitPython_Bundle >`_.
41
41
42
+ Installing from PyPI
43
+ --------------------
44
+ If the library is not planned for PyPI, remove the entire 'Installing from PyPI' section.
45
+ On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from
46
+ PyPI <https://pypi.org/project/adafruit-circuitpython-pcf8523/> `_. To install for current user:
47
+
48
+ .. code-block :: shell
49
+
50
+ pip3 install adafruit-circuitpython-pcf8523
51
+
52
+ To install system-wide (this may be required in some cases):
53
+
54
+ .. code-block :: shell
55
+
56
+ sudo pip3 install adafruit-circuitpython-pcf8523
57
+
58
+ To install in a virtual environment in your current project:
59
+
60
+ .. code-block :: shell
61
+
62
+ mkdir project-name && cd project-name
63
+ python3 -m venv .env
64
+ source .env/bin/activate
65
+ pip3 install adafruit-circuitpython-pcf8523
66
+
67
+
42
68
Usage Notes
43
69
===========
44
70
@@ -115,3 +141,61 @@ After the RTC is set, you retrieve the alarm status by reading the
115
141
if rtc.alarm_status:
116
142
print (" wake up!" )
117
143
rtc.alarm_status = False
144
+
145
+ Contributing
146
+ ============
147
+
148
+ Contributions are welcome! Please read our `Code of Conduct
149
+ <https://github.com/adafruit/Adafruit_CircuitPython_PCF8523/blob/master/CODE_OF_CONDUCT.md> `_
150
+ before contributing to help this project stay welcoming.
151
+
152
+ Building locally
153
+ ================
154
+
155
+ Zip release files
156
+ -----------------
157
+
158
+ To build this library locally you'll need to install the
159
+ `circuitpython-build-tools <https://github.com/adafruit/circuitpython-build-tools >`_ package.
160
+
161
+ .. code-block :: shell
162
+
163
+ python3 -m venv .env
164
+ source .env/bin/activate
165
+ pip install circuitpython-build-tools
166
+
167
+ Once installed, make sure you are in the virtual environment:
168
+
169
+ .. code-block :: shell
170
+
171
+ source .env/bin/activate
172
+
173
+ Then run the build:
174
+
175
+ .. code-block :: shell
176
+
177
+ circuitpython-build-bundles --filename_prefix adafruit-circuitpython-pcf8523 --library_location .
178
+
179
+ Sphinx documentation
180
+ -----------------------
181
+
182
+ Sphinx is used to build the documentation based on rST files and comments in the code. First,
183
+ install dependencies (feel free to reuse the virtual environment from above):
184
+
185
+ .. code-block :: shell
186
+
187
+ python3 -m venv .env
188
+ source .env/bin/activate
189
+ pip install Sphinx sphinx-rtd-theme
190
+
191
+ Now, once you have the virtual environment activated:
192
+
193
+ .. code-block :: shell
194
+
195
+ cd docs
196
+ sphinx-build -E -W -b html . _build/html
197
+
198
+ This will output the documentation to ``docs/_build/html ``. Open the index.html in your browser to
199
+ view them. It will also (due to -W) error out on any warning like Travis will. This is a good way to
200
+ locally verify it will pass.
201
+
0 commit comments