diff --git a/.cruft.json b/.cruft.json new file mode 100644 index 0000000..83b4e2b --- /dev/null +++ b/.cruft.json @@ -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 +} diff --git a/babel.cfg b/babel.cfg index aed0a1b..202a4ee 100644 --- a/babel.cfg +++ b/babel.cfg @@ -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 diff --git a/extras/README.txt b/extras/README.txt index de3d51a..6001202 100644 --- a/extras/README.txt +++ b/extras/README.txt @@ -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. diff --git a/extras/github/bug_report.yml b/extras/github/bug_report.yml new file mode 100644 index 0000000..468ee06 --- /dev/null +++ b/extras/github/bug_report.yml @@ -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 diff --git a/extras/github/feature_request.yml b/extras/github/feature_request.yml new file mode 100644 index 0000000..b744507 --- /dev/null +++ b/extras/github/feature_request.yml @@ -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. diff --git a/extras/matrix_notifier.md b/extras/matrix_notifier.md index 68e2492..90de533 100644 --- a/extras/matrix_notifier.md +++ b/extras/matrix_notifier.md @@ -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" --- diff --git a/octoprint_matrix_notifier/__init__.py b/octoprint_matrix_notifier/__init__.py index a90618a..5336f94 100644 --- a/octoprint_matrix_notifier/__init__.py +++ b/octoprint_matrix_notifier/__init__.py @@ -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__ diff --git a/setup.py b/setup.py index db2a277..5c9f302 100644 --- a/setup.py +++ b/setup.py @@ -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"]}} ########################################################################################################################