Skip to content

Commit fd906ba

Browse files
committed
removed the docs directory. updated most with the cookiecutter versions. remove .hgignore, obsolete
1 parent 05e16d5 commit fd906ba

File tree

15 files changed

+48
-1015
lines changed

15 files changed

+48
-1015
lines changed

.hgignore

Lines changed: 0 additions & 14 deletions
This file was deleted.

.pylintrc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ spelling-store-unknown-words=no
119119
[MISCELLANEOUS]
120120

121121
# List of note tags to take in consideration, separated by a comma.
122-
notes=FIXME,XXX,TODO
122+
# notes=FIXME,XXX,TODO
123+
notes=FIXME,XXX
123124

124125

125126
[TYPECHECK]
@@ -300,7 +301,7 @@ function-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
300301

301302
# Good variable names which should always be accepted, separated by a comma
302303
# good-names=i,j,k,ex,Run,_
303-
good-names=r,g,b,i,j,k,n,ex,Run,_
304+
good-names=r,g,b,w,i,j,k,n,x,y,z,ex,ok,Run,_
304305

305306
# Include a hint for the correct naming format with invalid-name
306307
include-naming-hint=no
@@ -422,7 +423,7 @@ max-returns=6
422423
max-statements=50
423424

424425
# Minimum number of public methods for a class (see R0903).
425-
min-public-methods=2
426+
min-public-methods=1
426427

427428

428429
[EXCEPTIONS]

.travis.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,14 @@ deploy:
1818
file_glob: true
1919
file: bundles/*
2020
skip_cleanup: true
21+
overwrite: true
2122
on:
2223
tags: true
2324

2425
install:
2526
- pip install pylint circuitpython-build-tools
2627

2728
script:
28-
- pylint adafruit_max7219/*.py
29-
- ([[ ! -d "examples" ]] || pylint --disable=missing-docstring,invalid-name examples/*.py)
29+
- pylint adafruit_max7219.py
30+
- ([[ ! -d "examples" ]] || pylint --disable=missing-docstring,invalid-name,bad-whitespace examples/*.py)
3031
- circuitpython-build-bundles --filename_prefix adafruit-circuitpython-max7219 --library_location .

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2016 Radomir Dopieralski
3+
Copyright (c) 2017 Radomir Dopieralski, Michael McWethy
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.rst

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ Introduction
66
:target: https://circuitpython.readthedocs.io/projects/max7219/en/latest/
77
:alt: Documentation Status
88
9-
.. image :: https://badges.gitter.im/adafruit/circuitpython.svg
10-
:target: https://gitter.im/adafruit/circuitpython?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge
11-
:alt: Gitter
12-
139
.. image :: https://img.shields.io/discord/327254708534116352.svg
1410
:target: https://adafru.it/discord
1511
:alt: Discord
@@ -91,6 +87,13 @@ adafruit_max7219.BCDDigits Example
9187
display.show_str(0,'{:9.2f}'.format(-1234.56))
9288
display.show()
9389
90+
API Reference
91+
=============
92+
93+
.. toctree::
94+
:maxdepth: 2
95+
96+
api
9497

9598
Contributing
9699
============
@@ -99,10 +102,26 @@ Contributions are welcome! Please read our `Code of Conduct
99102
<https://github.com/adafruit/Adafruit_CircuitPython_max7219/blob/master/CODE_OF_CONDUCT.md>`_
100103
before contributing to help this project stay welcoming.
101104

102-
API Reference
103-
=============
105+
Building locally
106+
================
104107

105-
.. toctree::
106-
:maxdepth: 2
108+
To build this library locally you'll need to install the
109+
`circuitpython-build-tools <https://github.com/adafruit/circuitpython-build-tools>`_ package.
107110

108-
api
111+
.. code-block:: shell
112+
113+
python3 -m venv .env
114+
source .env/bin/activate
115+
pip install circuitpython-build-tools
116+
117+
Once installed, make sure you are in the virtual environment:
118+
119+
.. code-block:: shell
120+
121+
source .env/bin/activate
122+
123+
Then run the build:
124+
125+
.. code-block:: shell
126+
127+
circuitpython-build-bundles --filename_prefix adafruit-circuitpython-max7219 --library_location .

api.rst

Lines changed: 5 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -3,104 +3,13 @@ Module classes
33
==============
44

55
Matrices
6-
********
6+
++++++++
77

88
.. module:: adafruit_max7219.matrices
9-
10-
.. class:: Matrix8x8(spi, cs)
11-
12-
Driver for a single MAX7219-based 8x8 LED matrix.
13-
14-
:param object spi: an spi busio or spi bitbangio object
15-
:param ~digitalio.DigitalInOut cs: digital in/out to use as chip select signal
16-
17-
.. method:: brightness(value)
18-
19-
control the brightness of the display
20-
21-
:param int value: 0->15 dimmest to brightest
22-
23-
.. method:: fill(color)
24-
25-
Fill the whole matrix with a specified color.
26-
27-
:param int color: None or False or 0 turn LED off, anything else turns LED on
28-
29-
.. method:: pixel(x, y, color=None)
30-
31-
Set the color of a single pixel.
32-
33-
:param int x: x postiion of LED in matrix
34-
:param int y: y position of LED in matrix
35-
:param int color: value > zero lights the decimal point, else unlights the point
36-
37-
.. method:: text(x, y, str)
38-
39-
Position and set text on display; used for text scrolling
40-
41-
:param int x: x postiion of LED in matrix
42-
:param int y: y position of LED in matrix
43-
:param string str: string to place in to display
44-
45-
.. method:: clear_all()
46-
47-
sets all leds to off; same as fill(0)
48-
49-
.. method:: show()
50-
51-
Update the display.
52-
9+
:members:
5310

5411
BCDDigits
55-
*********
56-
57-
.. module:: adafruit_max7219.bcddigits
58-
59-
.. class:: BCDDigits(spi, cs, nDigits=1)
60-
61-
Driver for one to 8 MAX7219-based 7-Segment LED display.
62-
63-
:param object spi: an spi busio or spi bitbangio object
64-
:param ~digitalio.DigitalInOut cs: digital in/out to use as chip select signal
65-
:param int nDigits: number of led 7-segment digits; default 1; max 8
66-
67-
.. method:: set_digit(d, v)
68-
69-
set one digit in the display
70-
71-
:param int d: the digit position; zero-based
72-
:param int v: integer ranging from 0->15
73-
74-
.. method:: show_dot(d, col=None)
75-
76-
set the decimal point for a digit
77-
78-
:param int d: the digit to set the decimal point zero-based
79-
:param int col: value > zero lights the decimal point, else unlights the point
80-
81-
.. method:: show_str(s,str)
82-
83-
displays a numeric str in the display. shows digits 0-9, -, and .
84-
85-
:param int s: start position to show the numeric string
86-
:param string str: the numeric string
87-
88-
.. method:: show_help(s)
89-
90-
display the word HELP in the display
91-
92-
:param int s: start position to show HELP
93-
94-
.. method:: brightness(value)
95-
96-
control the brightness of the display
97-
98-
:param int value: 0->15 dimmest to brightest
99-
100-
.. method:: clear_all()
101-
102-
sets all leds to off
103-
104-
.. method:: show()
12+
+++++++++
10513

106-
Update the display.
14+
.. module:: adafruit_max7219.bcddigits.py
15+
:members

conf.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@
1515
'sphinx.ext.viewcode',
1616
]
1717

18+
# Uncomment the below if you use native CircuitPython modules such as
19+
# digitalio, micropython and busio. List the modules you use. Without it, the
20+
# autodoc module docs will fail to generate with a warning.
21+
# autodoc_mock_imports = ["digitalio", "busio"]
22+
1823
intersphinx_mapping = {'python': ('https://docs.python.org/3.4', None),'CircuitPython': ('https://circuitpython.readthedocs.io/en/latest/', None)}
1924

2025
# Add any paths that contain templates here, relative to this directory.

0 commit comments

Comments
 (0)