This commit is contained in:
jupfi 2024-06-01 21:06:26 +02:00
parent 5a4af800f0
commit eea58c394b
8 changed files with 37 additions and 15 deletions

View file

@ -6,6 +6,7 @@ First off, thanks for taking the time to contribute! 🦆❤️
All types of contributions are encouraged and valued. See the [Table of Contents](#table-of-contents) for different ways to help and details about how this project handles them. Please make sure to read the relevant section before making your contribution. It will make it a lot easier for us maintainers and smooth out the experience for all involved. The community looks forward to your contributions. 🎉 All types of contributions are encouraged and valued. See the [Table of Contents](#table-of-contents) for different ways to help and details about how this project handles them. Please make sure to read the relevant section before making your contribution. It will make it a lot easier for us maintainers and smooth out the experience for all involved. The community looks forward to your contributions. 🎉
> And if you like the project, but just don't have time to contribute, that's fine. There are other easy ways to support the project and show your appreciation, which we would also be very happy about: > And if you like the project, but just don't have time to contribute, that's fine. There are other easy ways to support the project and show your appreciation, which we would also be very happy about:
>
> - Star the project > - Star the project
> - Tweet about it > - Tweet about it
> - Refer this project in your project's readme > - Refer this project in your project's readme
@ -25,7 +26,6 @@ All types of contributions are encouraged and valued. See the [Table of Contents
- [Commit Messages](#commit-messages) - [Commit Messages](#commit-messages)
- [Join The Project Team](#join-the-project-team) - [Join The Project Team](#join-the-project-team)
## Code of Conduct ## Code of Conduct
This project and everyone participating in it is governed by the This project and everyone participating in it is governed by the
@ -33,7 +33,6 @@ This project and everyone participating in it is governed by the
By participating, you are expected to uphold this code. Please report unacceptable behavior By participating, you are expected to uphold this code. Please report unacceptable behavior
to <support@nqrduck.cool>. to <support@nqrduck.cool>.
## I Have a Question ## I Have a Question
> If you want to ask a question, we assume that you have read the available [Documentation](nqrduck.cool). > If you want to ask a question, we assume that you have read the available [Documentation](nqrduck.cool).
@ -67,6 +66,7 @@ You can also join the [Matrix Chat](https://matrix.to/#/#nqrduck:private.coffee)
## I Want To Contribute ## I Want To Contribute
> ### Legal Notice <!-- omit in toc --> > ### Legal Notice <!-- omit in toc -->
>
> When contributing to this project, you must agree that you have authored 100% of the content, that you have the necessary rights to the content and that the content you contribute may be provided under the project license. > When contributing to this project, you must agree that you have authored 100% of the content, that you have the necessary rights to the content and that the content you contribute may be provided under the project license.
### Reporting Bugs ### Reporting Bugs
@ -107,7 +107,6 @@ Once it's filed:
<!-- You might want to create an issue template for bugs and errors that can be used as a guide and that defines the structure of the information to be included. If you do so, reference it here in the description. --> <!-- You might want to create an issue template for bugs and errors that can be used as a guide and that defines the structure of the information to be included. If you do so, reference it here in the description. -->
### Suggesting Enhancements ### Suggesting Enhancements
This section guides you through submitting an enhancement suggestion for NQRduck, **including completely new features and minor improvements to existing functionality**. Following these guidelines will help maintainers and the community to understand your suggestion and find related suggestions. This section guides you through submitting an enhancement suggestion for NQRduck, **including completely new features and minor improvements to existing functionality**. Following these guidelines will help maintainers and the community to understand your suggestion and find related suggestions.
@ -133,7 +132,6 @@ Enhancement suggestions are tracked as GitHub issues.
<!-- You might want to create an issue template for enhancement suggestions that can be used as a guide and that defines the structure of the information to be included. If you do so, reference it here in the description. --> <!-- You might want to create an issue template for enhancement suggestions that can be used as a guide and that defines the structure of the information to be included. If you do so, reference it here in the description. -->
### Improving The Documentation ### Improving The Documentation
<!-- TODO <!-- TODO
Updating, improving and correcting the documentation Updating, improving and correcting the documentation
@ -144,6 +142,6 @@ Updating, improving and correcting the documentation
We use [Google Style Python Docstrings](https://www.sphinx-doc.org/en/master/usage/extensions/example_google.html) for docstrings We use [Google Style Python Docstrings](https://www.sphinx-doc.org/en/master/usage/extensions/example_google.html) for docstrings
## Attribution ## Attribution
This guide is based on the **contributing-gen**. [Make your own](https://github.com/bttger/contributing-gen)! This guide is based on the **contributing-gen**. [Make your own](https://github.com/bttger/contributing-gen)!

View file

@ -7,24 +7,30 @@ Add a short description of the module here but describe the usage in the Usage s
## Installation ## Installation
### Requirements ### Requirements
Describe the requirements for the module. Usually dependencies are handled via the pyproject.toml file but if the user needs to install additional software or libraries, it should be mentioned here. Also mention that the user needs to install the NQRduck core. Describe the requirements for the module. Usually dependencies are handled via the pyproject.toml file but if the user needs to install additional software or libraries, it should be mentioned here. Also mention that the user needs to install the NQRduck core.
### Setup ### Setup
Describe how to install the module. Usually the user needs to install the NQRduck core first. Then the user can install the module by running the following command in the terminal: Describe how to install the module. Usually the user needs to install the NQRduck core first. Then the user can install the module by running the following command in the terminal:
```bash ```bash
pip install . pip install .
``` ```
## Usage ## Usage
Describe how to use the module. This should include a short description of the module and how it is used together with the NQRduck core. Describe how to use the module. This should include a short description of the module and how it is used together with the NQRduck core.
If it's an UI module ideally include a screenshot of the UI. If it's an UI module ideally include a screenshot of the UI.
### Notes ### Notes
Add additional notes here. This could be information about the usage of the module or additional information about the module. Add additional notes here. This could be information about the usage of the module or additional information about the module.
## License ## License
Usually the modules are licensed under the MIT License. The license file should be included in the module. The license file should be named LICENSE and should be in the root directory of the module. Usually the modules are licensed under the MIT License. The license file should be included in the module. The license file should be named LICENSE and should be in the root directory of the module.
## Contributing ## Contributing
If you're interested in contributing to the project, start by checking out our [nqrduck-module template](https://github.com/nqrduck/nqrduck-module). To contribute to existing modules, please first open an issue in the respective module repository to discuss your ideas or report bugs. If you're interested in contributing to the project, start by checking out our [nqrduck-module template](https://github.com/nqrduck/nqrduck-module). To contribute to existing modules, please first open an issue in the respective module repository to discuss your ideas or report bugs.
```

View file

@ -40,9 +40,6 @@ extend-select = [
"D", # pydocstyle "D", # pydocstyle
] ]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"]
[tool.ruff.lint.pydocstyle] [tool.ruff.lint.pydocstyle]
convention = "google" convention = "google"

View file

@ -1,4 +1,7 @@
"""Template for a NQRduck module."""
# If the module is called "duck" the following line would be: # If the module is called "duck" the following line would be:
# from .duck import Duck as Module # from .duck import Duck as Module
from .module import Module as Module from .module import Module as Module
__all__ = ["Module"]

View file

@ -1,8 +1,12 @@
"""Template class for a NQRduck module controller."""
from nqrduck.module.module_controller import ModuleController from nqrduck.module.module_controller import ModuleController
# If the module is called "duck" the class would be called "DuckController" # If the module is called "duck" the class would be called "DuckController"
class ModuleController(ModuleController): class ModuleController(ModuleController):
"""Template class for a NQRduck module controller."""
def __init__(self, module): def __init__(self, module):
"""Initialize the controller.""" """Initialize the controller."""

View file

@ -1,8 +1,12 @@
"""Template module model for a NQRduck module."""
from nqrduck.module.module_model import ModuleModel from nqrduck.module.module_model import ModuleModel
# If the module is called "duck" the class would be called "DuckModel" # If the module is called "duck" the class would be called "DuckModel"
class ModuleModel(ModuleModel): class ModuleModel(ModuleModel):
"""Template class for a NQRduck module model."""
def __init__(self, module): def __init__(self, module):
"""Initialize the model.""" """Initialize the model."""

View file

@ -1,10 +1,15 @@
"""Template for a NQRduck module."""
from nqrduck.module.module import Module from nqrduck.module.module import Module
# If the module is called "duck" the following line would be: # If the module is called "duck" the following line would be:
# from .model import DuckModel # from .model import DuckModel
from .model import ModuleModel from .model import ModuleModel
# If the module is called "duck" the following line would be: # If the module is called "duck" the following line would be:
# from .view import DuckView # from .view import DuckView
from .view import ModuleView from .view import ModuleView
# If the module is called "duck" the following line would be: # If the module is called "duck" the following line would be:
# from .controller import DuckController # from .controller import DuckController
from .controller import ModuleController from .controller import ModuleController

View file

@ -1,3 +1,5 @@
"""Template View for a NQRduck module."""
from nqrduck.module.module_view import ModuleView from nqrduck.module.module_view import ModuleView
# This is the widget that is loaded into the module view. # This is the widget that is loaded into the module view.
@ -8,9 +10,12 @@ from PyQt6.QtWidgets import QWidget
# If the module is called "duck" the class would be called "DuckView" # If the module is called "duck" the class would be called "DuckView"
class ModuleView(ModuleView): class ModuleView(ModuleView):
"""Template class for a NQRduck module view."""
def __init__(self, module): def __init__(self, module):
"""Initialize the view. This is usually quite similar for all modules."""
super().__init__(module) super().__init__(module)
widget = QWidget() widget = QWidget()