Skip to content

Commit

Permalink
update documentation (circup) (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
jandelgado authored Jan 15, 2023
1 parent 388ea61 commit f35c2f9
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 35 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,16 @@ jobs:
- name: Set up Python 3.x
uses: actions/setup-python@v2
with:
python-version: "3.x"
python-version: "3.9"
- name: Checkout Current Repo
uses: actions/checkout@v3
- name: Build documentation
run: |
pip install ".[optional]"
cd docs
sphinx-build -E -W -b html . _build/html
ls -lR _build/html
- name: Upload documentation
uses: peaceiris/actions-gh-pages@v3
with:
Expand Down
44 changes: 14 additions & 30 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -85,32 +85,16 @@ To install in a virtual environment in your current project:
source .env/bin/activate
pip3 install circuitpython-jled
Installing to a Connected CircuitPython Device
----------------------------------------------

Create a directory called ``jled`` on the device and copy the following files
into this directory: ``jled.py``, ``jled_sequence.py``
``hal_pwm_circtuitpython.py``, ``hal_time_circuitpython.py``, ``play.py``,
``__init__.py```. Optionally also copy the ``jled_micropython.py`` example as
``main.py`` to the root of the filesystem. The overall structure is:

.. code-block::
/
├─ main.py
└─ jled
   ├─ __init__.py
   ├─ hal_pwm_circuitpython.py
   ├─ hal_time_circuitpython.py
   ├─ jled.py
   ├─ jled_sequence.py
   └─ play.py
Installing to a Connected CircuitPython Device with Circup
----------------------------------------------------------

TODO
``JLed`` is available in the `Circuitpython Community Bundle <https://github.com/adafruit/CircuitPython_Community_Bundle>`_
and can easily installed with `circup <https://pypi.org/project/circup/>`_ by
running::

$ circup install jled

Optionally copy also one of the example as ``main.py`` to the root of the filesystem.

Installing on a MicroPython device
----------------------------------
Expand All @@ -127,17 +111,17 @@ root of the filesystem. The overall structure is:
/
├─ main.py
└─ jled
   ├─ __init__.py
   ├─ hal_pwm_micropython.py
   ├─ hal_time_micropython.py
   ├─ jled.py
   ├─ jled_sequence.py
   └─ play.py
   ├─ __init__.[m]mpy
   ├─ hal_pwm_micropython.[m]mpy
   ├─ hal_time_micropython.[m]mpy
   ├─ jled.[m]mpy
   ├─ jled_sequence.[m]mpy
   └─ play.[m]mpy
To reduce memory consumption, Python source files can be compiled to binary
``mpy`` format using the `mpy-cross <https://pypi.org/project/mpy-cross/>`_
tool. For convenience, a script to compile and copy jled to a connected device
is provided here (see ``scripts/install_mp.sh``.
is provided here (see ``scripts/install_mp.sh``).

Documentation
=============
Expand Down
8 changes: 4 additions & 4 deletions optional_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# build and development time dependencies
pytest
pytest-cov
pytest==7.*
pytest-cov==4.*
mpremote
mpy-cross
sphinx
sphinx_rtd_theme
sphinx==5.*
sphinx_rtd_theme==1.*

0 comments on commit f35c2f9

Please sign in to comment.