Skip to content

Commit

Permalink
Update from template (#16)
Browse files Browse the repository at this point in the history
* Cruft link

* de-rej

* Update the cookiecutter
  • Loading branch information
Cadair committed Mar 6, 2024
1 parent 725c340 commit bf56135
Show file tree
Hide file tree
Showing 8 changed files with 180 additions and 4 deletions.
24 changes: 24 additions & 0 deletions .cruft.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"template": "https://github.com/OctoPrint/cookiecutter-octoprint-plugin",
"commit": "d0a2eb52875613c9d23d23d7890c938df502011a",
"checkout": null,
"context": {
"cookiecutter": {
"plugin_identifier": "matrix_notifier",
"plugin_package": "octoprint_matrix_notifier",
"plugin_name": "Matrix Notifier",
"repo_name": "octoprint-matrix-notifier-plugin",
"full_name": "Stuart Mumford",
"email": "stuart@cadair.com",
"github_username": "Cadair",
"plugin_version": "0.2.2",
"plugin_description": "Sends matrix notifications and snapshots of your print.",
"plugin_license": "AGPLv3",
"plugin_homepage": "https://github.com/Cadair/octoprint-matrix-notifier-plugin",
"plugin_source": "https://github.com/Cadair/octoprint-matrix-notifier-plugin",
"plugin_installurl": "https://github.com/Cadair/octoprint-matrix-notifier-plugin/archive/main.zip",
"_template": "https://github.com/OctoPrint/cookiecutter-octoprint-plugin"
}
},
"directory": null
}
2 changes: 1 addition & 1 deletion babel.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[jinja2: */**.jinja2]
silent=false
extensions=jinja2.ext.autoescape, jinja2.ext.with_, jinja2.ext.do, octoprint.util.jinja.trycatch
extensions=jinja2.ext.do, octoprint.util.jinja.trycatch

[javascript: */**.js]
extract_messages = gettext, ngettext
10 changes: 9 additions & 1 deletion extras/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@ Currently Cookiecutter generates the following helpful extras to this folder:
matrix_notifier.md
Data file for plugins.octoprint.org. Fill in the missing TODOs once your
plugin is ready for release and file a PR as described at
http://plugins.octoprint.org/help/registering/ to get it published.
https://plugins.octoprint.org/help/registering/ to get it published.

github/bug_report.yml
A GitHub issue form for bug reports. Adjust as desired & place in your
repository as `.github/bug_report.yml` to activate.

github/feature_request.yml
A GitHub issue form for feature requests. Adjust as desired and place in
your repository as `.github/feature_request.yml` to activate.

This folder may be safely removed if you don't need it.
96 changes: 96 additions & 0 deletions extras/github/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
name: 🐛 Report a bug
description: Create a bug report to help improve Matrix Notifier
body:
- type: markdown
attributes:
value: >-
**Thank you for wanting to report a bug in Matrix Notifier!**
* First, be sure you are running the [latest version of the Matrix Notifier plugin](https://github.com/Cadair/octoprint-matrix-notifier-plugin/releases).
* You will also need to [enable debugging on the plugin](https://docs.octoprint.org/en/master/configuration/logging_yaml.html).
* This may be done through the *Settings* > *OctoPrint* > *Logging* > *Logging Levels* section.
* Select the "octoprint.plugins.matrix_notifier" name, and make sure Level is "DEBUG".
* Save, then restart OctoPrint, which allows the developers to see debug information from the moment the plugin is loaded.
* Finally, when submitting a bug report, you **must** [include a Systeminfo Bundle](https://community.octoprint.org/t/what-is-a-systeminfo-bundle-and-how-can-i-obtain-one/29887), generated after the point the bug occurs. This allows the developers to examine the debug logs produced from your plugin installation.
Thank you for your help!
- type: textarea
attributes:
label: The problem
description: >-
Describe the issue you are experiencing here. Tell us what you were trying to do
step by step, and what happened that you did not expect.
Provide a clear and concise description of what the problem is and include as many
details as possible.
placeholder: |
1. ...
2. ...
3. ...
validations:
required: true
- type: markdown
attributes:
value: |
## Environment
- type: input
attributes:
label: Version of Matrix Notifier
description: Can be found in *Settings* > *Plugin Manager*, next to "Matrix Notifier".
validations:
required: true
- type: input
attributes:
label: Version of OctoPrint
description: Can be found in the lower left corner of the web interface.
validations:
required: true
- type: input
attributes:
label: Operating system running OctoPrint
description: >-
OctoPi, Linux, Windows, MacOS, something else? With version please? OctoPi's
version can be found in `/etc/octopi_version` or in the lower left corner of the
web interface.
validations:
required: true
- type: input
attributes:
label: Printer model & used firmware incl. version
description: If applicable, always include if unsure
- type: input
attributes:
label: Browser and version of browser, operating system running browser
description: If applicable, always include if unsure
- type: markdown
attributes:
value: |
## Logs and other files needed for analysis
- type: markdown
attributes:
value: >-
Please also be sure to upload the following files below:
* Systeminfo Bundle: See [here](https://community.octoprint.org/t/what-is-a-systeminfo-bundle-and-how-can-i-obtain-one/29887) if you don't know where to find that. Just attach down below as-is. Note that you'll need at least OctoPrint 1.6.0 for this to be available - we no longer accept bug reports created for older versions than this.
* If you are reporting an issue that involves communicating with you printer, **be sure to enable `serial.log` before reproducing and creating the Systeminfo Bundle**!
* Your browser's JavaScript console, if you are reporting a problem with the
user interface. See [here](https://webmasters.stackexchange.com/questions/8525/how-to-open-the-javascript-console-in-different-browsers) on where to find that.
* If possible, screenshots or videos showing the problem, especially if you
are reporting a problem with the user interface!
* GCODE files with which to reproduce, if you are reporting an issue with
GCODE file analysis or printing behaviour.
Please be aware that unless at least Systeminfo Bundle is included, your bug report
will not be processed and closed after a while.
- type: checkboxes
attributes:
label: Checklist of files to include below
options:
- label: Systeminfo Bundle (always include!)
required: true
- label: Contents of the JavaScript browser console (always include in cases of issues with the user interface)
- label: Screenshots and/or videos showing the problem (always include in case of issues with the user interface)
- label: GCODE file with which to reproduce (always include in case of issues with GCODE analysis or printing behaviour)
- type: textarea
attributes:
label: Additional information & file uploads
26 changes: 26 additions & 0 deletions extras/github/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: ✨ Request a feature
description: Request a new feature to implement in Matrix Notifier
title: "[Request]"
body:
- type: markdown
attributes:
value: >
**Thank you for wanting to request a feature in Matrix Notifier!**
- type: textarea
attributes:
label: Is your feature request related to a problem? Please describe.
description: A clear and concise description of what the problem is. Eg, "I'm always frustrated when [...]".
- type: textarea
attributes:
label: Describe the solution you'd like
description: A clear and concise description of what you want to happen.
validations:
required: true
- type: textarea
attributes:
label: Describe alternatives you've considered
description: A clear and concise description of any alternative solutions or features you've considered.
- type: textarea
attributes:
label: Additional context
description: Add any other context or screenshots about the feature request here.
17 changes: 17 additions & 0 deletions extras/matrix_notifier.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,24 @@ screenshots:
featuredimage: /assets/img/plugins/printstarted.png

compatibility:
# List of compatible versions
#
# A single version number will be interpretated as a minimum version requirement,
# e.g. "1.3.1" will show the plugin as compatible to OctoPrint versions 1.3.1 and up.
# More sophisticated version requirements can be modelled too by using PEP440
# compatible version specifiers.
#
# You can also remove the whole "octoprint" block. Removing it will default to all
# OctoPrint versions being supported.
octoprint:
- 1.4.0
# Compatible Python version
#
# It is recommended to only support Python 3 for new plugins, in which case this should be ">=3,<4"
#
# Plugins that wish to support both Python 2 and 3 should set it to ">=2.7,<4".
#
# Plugins that only support Python 2 will not be accepted into the plugin repository.
python: ">=3,<4"

---
Expand Down
5 changes: 4 additions & 1 deletion octoprint_matrix_notifier/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@

from .plugin import MatrixNotifierPlugin

__plugin_pythoncompat__ = ">=3,<4" # only python 3
# Set the Python version your plugin is compatible with below. Recommended is Python 3 only for all new plugins.
# OctoPrint 1.4.0 - 1.7.x run under both Python 3 and the end-of-life Python 2.
# OctoPrint 1.8.0 onwards only supports Python 3.
__plugin_pythoncompat__ = ">=3,<4" # Only Python 3

def __plugin_load__():
global __plugin_implementation__
Expand Down
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@
# Example:
# plugin_requires = ["someDependency==dev"]
# additional_setup_parameters = {"dependency_links": ["https://github.com/someUser/someRepo/archive/master.zip#egg=someDependency-dev"]}
additional_setup_parameters = {"python_requires": ">=3, <4", "extras_require": {"tests": ["pytest"]}}
# "python_requires": ">=3,<4" blocks installation on Python 2 systems, to prevent confused users and provide a helpful error.
# Remove it if you would like to support Python 2 as well as 3 (not recommended).
additional_setup_parameters = {"python_requires": ">=3,<4", "extras_require": {"tests": ["pytest"]}}

########################################################################################################################

Expand Down

0 comments on commit bf56135

Please sign in to comment.