Skip to content

Commit e567eed

Browse files
committed
Merge branch 'master' into 0.7.x
2 parents be600f1 + 9a6f280 commit e567eed

File tree

3 files changed

+57
-29
lines changed

3 files changed

+57
-29
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ assignees: ''
66

77
---
88

9-
<!-- PLEASE don't delete any of the sections below, you will more than likely be asked for extra information if you do.
9+
<!-- PLEASE don't delete any of the sections below, you will more than likely be asked for extra information if you do. -->
1010

1111
**Description of the bug**
1212

CONTRIBUTING.md

Lines changed: 39 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,48 @@
1-
### Hey there! So you've decided to contribute to the plugin. Here's what you need to know.
1+
# Contribution Guidelines
22

3-
Please take note of the few things below for contributing to the plugin, it's not extensive and designed to make contributions as smooth as possible
3+
First, thank you for considering contributing to this project!
44

5-
- Please only create pull requests against:
6-
- `maintenance` for bug fixes or improvements
7-
- `devel` for new features
8-
- Never `master`, as this is downloaded by users so must remain untouched until release. (EXCEPTION: Documentation, like this)
9-
- If your changes are large or disruptive, please open an issue first to dicuss. There may be things in the pipeline that would conflict
10-
- Read the detail below so you understand how the plugin works!
5+
The guidelines here aim to make it as smooth as possible for contributors to understand how to contribute, what they can contribute
6+
and how the plugin works.
117

12-
### How does it work?
8+
There's a couple of things to consider before making your contribution:
139

14-
This plugin is currently written with 2 layers:
10+
- Please create pull requests against the `devel` branch unless indicated otherwise.
11+
There is an exception to this rule: documentation. See more below.
1512

16-
- The OctoPrint plugin class,
17-
- The effect runner class.
13+
- If your changes are large or disruptive, please open an issue first so that we can discuss. I don't want you to put in a lot
14+
of work only for it to end up going to waste as there were already different plans.
1815

19-
When a user starts the plugin, OctoPrint loads the plugin class. This spins off a new process of the effect runner class, which handles driving the LEDs
16+
- Read the additional points below for details on code style, testing and how everything fits together.
2017

21-
Operating flow goes a bit like this:
18+
### Documentation
2219

23-
- Event recieved by the plugin class (This may be an OctoPrint event, gcode command or pressing the on/off button.)
24-
- Evaluated, and decide what to do happens plugin side. Message constructed
25-
- Message put in a queue through to the effect runner class. Any active effect is stopped immediately and message is read
26-
- Analyse message, and decide what effect to run
20+
Contributing documentation changes is easy, since everything is formatted using markdown. The docs are built from
21+
the `docs` sub folder by GitBook, hosted at https://cp2004.gitbook.io/ws281x-led-status/.
2722

28-
All effects are kept in the sub-module `effects`, while there are useful functions that can be called cross module in the `util.py` file
23+
For the documentation for the current release of the plugin, please make it against the branch labelled for the minor version. (Currently `0.7.x`)
24+
This means that I can keep them versioned and not break things between releases.
25+
26+
When contributing additional features or configuration please try to document it where necessary, however do not put
27+
off your contribution because you are struggling to document it!
28+
29+
### Code style
30+
31+
The plugin has a pre-commit setup that runs black, prettier, isort and various other code-mods.
32+
33+
You can either set this up as a file watcher [as in the PyCharm example in OctoPrint's documentation (under pre-commit)](https://docs.octoprint.org/en/master/development/environment.html#pycharm).
34+
35+
You can also run this as a one-off using `pre-commit run --hook-stage manual --all-files`.
36+
37+
### Testing
38+
39+
Running the unit tests is simple, though they require additional dependencies.
40+
41+
If you installed OctoPrint in a development environment, using `pip install octoprint[develop]` or `pip install -e .[develop]` (in the checkout)
42+
these are already there. Otherwise, install them using `pip install pytest mock`
43+
44+
Run it: `pytest` (or `python -m pytest`)
45+
46+
### Anything else?
47+
48+
Nothing else important! Give your PR a suitable description and let me merge it :)

README.md

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@ Add some RGB LEDs to your 3D printer for a quick status update!
66

77
A highly configurable plugin for supporting WS2811, WS2812 and SK6812 LEDs attached to your Raspberry Pi.
88

9-
With lots of effects to choose from, you can customise the plugin to do things _exactly_ as you want them, to display the status from your 3D printer from a simple strip of LEDs
9+
With lots of effects to choose from, you can customise the plugin to do things _exactly_ as you want them, to display the status from your 3D printer from a simple strip of LEDs.
1010

1111
Features include:
1212

1313
- Reacting to printing events
1414
- Tracking heating & printing progress
1515
- Intercepting M150 commands
1616
- Quick on/off button from the navbar
17-
- 'Torch' button
18-
- A timer to turn the LEDs on or off at certain times
19-
- Easy to use but highly configurable settings interface, you can turn pretty much anything on or off.
17+
- 'Torch' function, to light up your printer
18+
- A timer to turn the LEDs on or off at certain times of day
19+
- Easy to use but highly configurable settings interface, you can turn pretty much anything on or off and configure it to how you like it.
2020
- LED Strip test
2121
- Power calculator
2222
- ... and more!
@@ -35,28 +35,36 @@ Setting up the plugin couldn't be easier! There are 3 main steps, with the heavy
3535

3636
Follow the detailed [setup guide](https://cp2004.gitbook.io/ws281x-led-status/guides/setup-guide-1) in the documentation to get up and running.
3737

38-
### Getting help
38+
## Getting help
3939

4040
Please read the [Get Help Guide](https://cp2004.gitbook.io/ws281x-led-status/guides/get-help-guide) as well as the [rest of the documentation](https://cp2004.gitbook.io/ws281x-led-status/), to see if your question has been answered there. Still got questions? Get in touch:
4141

4242
- On the [OctoPrint Discord](https://discord.octoprint.org)
4343
- On the [Community Forums](https://community.octoprint.org)
4444
- Open an issue with the [question template](https://github.com/cp2004/OctoPrint-WS281x_LED_Status/issues/new?assignees=&labels=type%3A+question&template=question.md&title=)
4545

46-
### Reporting problems
46+
## Reporting problems
4747

4848
Whilst I don't like bugs, I want to hear about them! Let me know by [opening an issue](https://github.com/cp2004/OctoPrint-WS281x_LED_Status/issues/new?assignees=&labels=type%3A+potential+bug&template=bug_report.md&title=%5BBug%5D)
4949

50-
# Support my work!
50+
## Contributing
51+
52+
I accept many forms of contribution, from fixing bugs, documentation and new features.
53+
Please see the [Contributing Guidelines](https://github.com/cp2004/OctoPrint-WS281x_LED_Status/blob/master/CONTRIBUTING.md) for more details or get
54+
in touch if you don't know where to start.
55+
56+
## Support my work!
5157

5258
I created this plugin in my spare time, so if you have enjoyed using it then please [support it's development!](https://github.com/sponsors/cp2004)
5359

5460
<a href="https://www.jetbrains.com/?from=cp2004"><img align="left" width="100" height="100" src="jetbrains-variant-2.png" alt="JetBrains Logo"></a> Thanks to JetBrains for supporting an open source license for their brilliant IDEs!
5561

5662
## Thanks
5763

64+
This was my first plugin and still my favourite, I have to say thanks for helping me develop it:
65+
5866
[jneilliii](https://github.com/jneilliii) for always answering my questions on discord, and making great plugins I could use as examples.
5967

60-
Andreas C. for jumping at the opportunity to beta-test, and providing great feedback!
68+
Andreas C. for jumping at the opportunity to beta-test, and providing great feedback as I was creating this!
6169

62-
And, of course, [Gina Häußge](https://github.com/foosel) for creating OctoPrint
70+
And, of course, [Gina Häußge](https://github.com/foosel) for creating OctoPrint and such a great community around it.

0 commit comments

Comments
 (0)