mirror of
https://github.com/nqrduck/nqrduck-module.git
synced 2024-09-07 22:10:34 +00:00
Linting.
This commit is contained in:
parent
5a4af800f0
commit
eea58c394b
8 changed files with 37 additions and 15 deletions
|
@ -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. 🎉
|
||||
|
||||
> 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
|
||||
> - Tweet about it
|
||||
> - 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)
|
||||
- [Join The Project Team](#join-the-project-team)
|
||||
|
||||
|
||||
## Code of Conduct
|
||||
|
||||
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
|
||||
to <support@nqrduck.cool>.
|
||||
|
||||
|
||||
## I Have a Question
|
||||
|
||||
> 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
|
||||
|
||||
> ### 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.
|
||||
|
||||
### 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. -->
|
||||
|
||||
|
||||
### 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.
|
||||
|
@ -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. -->
|
||||
|
||||
|
||||
### Improving The Documentation
|
||||
<!-- TODO
|
||||
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
|
||||
|
||||
|
||||
## Attribution
|
||||
|
||||
This guide is based on the **contributing-gen**. [Make your own](https://github.com/bttger/contributing-gen)!
|
||||
|
|
|
@ -7,24 +7,30 @@ Add a short description of the module here but describe the usage in the Usage s
|
|||
## Installation
|
||||
|
||||
### 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.
|
||||
|
||||
### 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:
|
||||
|
||||
```bash
|
||||
pip install .
|
||||
```
|
||||
|
||||
## 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.
|
||||
If it's an UI module ideally include a screenshot of the UI.
|
||||
|
||||
### Notes
|
||||
|
||||
Add additional notes here. This could be information about the usage of the module or additional information about the module.
|
||||
|
||||
## 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.
|
||||
|
||||
## 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.
|
||||
```
|
|
@ -40,9 +40,6 @@ extend-select = [
|
|||
"D", # pydocstyle
|
||||
]
|
||||
|
||||
[tool.ruff.lint.per-file-ignores]
|
||||
"__init__.py" = ["F401"]
|
||||
|
||||
[tool.ruff.lint.pydocstyle]
|
||||
convention = "google"
|
||||
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
"""Template for a NQRduck module."""
|
||||
# If the module is called "duck" the following line would be:
|
||||
# from .duck import Duck as Module
|
||||
|
||||
from .module import Module as Module
|
||||
from .module import Module as Module
|
||||
|
||||
__all__ = ["Module"]
|
||||
|
|
|
@ -1,8 +1,12 @@
|
|||
"""Template class for a NQRduck module controller."""
|
||||
|
||||
from nqrduck.module.module_controller import ModuleController
|
||||
|
||||
# If the module is called "duck" the class would be called "DuckController"
|
||||
|
||||
|
||||
class ModuleController(ModuleController):
|
||||
"""Template class for a NQRduck module controller."""
|
||||
|
||||
def __init__(self, module):
|
||||
"""Initialize the controller."""
|
||||
|
@ -10,4 +14,4 @@ class ModuleController(ModuleController):
|
|||
|
||||
def on_loading(self):
|
||||
"""This method is called when the module is loaded."""
|
||||
pass
|
||||
pass
|
||||
|
|
|
@ -1,9 +1,13 @@
|
|||
"""Template module model for a NQRduck module."""
|
||||
|
||||
from nqrduck.module.module_model import ModuleModel
|
||||
|
||||
# If the module is called "duck" the class would be called "DuckModel"
|
||||
|
||||
|
||||
class ModuleModel(ModuleModel):
|
||||
"""Template class for a NQRduck module model."""
|
||||
|
||||
def __init__(self, module):
|
||||
"""Initialize the model."""
|
||||
super().__init__(module)
|
||||
super().__init__(module)
|
||||
|
|
|
@ -1,14 +1,19 @@
|
|||
"""Template for a NQRduck module."""
|
||||
|
||||
from nqrduck.module.module import Module
|
||||
|
||||
# If the module is called "duck" the following line would be:
|
||||
# from .model import DuckModel
|
||||
from .model import ModuleModel
|
||||
|
||||
# If the module is called "duck" the following line would be:
|
||||
# from .view import DuckView
|
||||
from .view import ModuleView
|
||||
|
||||
# If the module is called "duck" the following line would be:
|
||||
# from .controller import DuckController
|
||||
from .controller import ModuleController
|
||||
|
||||
# If the module is called "duck" the following line would be:
|
||||
# Duck = Module(DuckModel, DuckView, DuckController)
|
||||
module = Module(ModuleModel, ModuleView, ModuleController)
|
||||
module = Module(ModuleModel, ModuleView, ModuleController)
|
||||
|
|
|
@ -1,19 +1,24 @@
|
|||
"""Template View for a NQRduck module."""
|
||||
|
||||
from nqrduck.module.module_view import ModuleView
|
||||
|
||||
# This is the widget that is loaded into the module view.
|
||||
# It is generated from the .ui file in the same directory using the pyuic6 command.
|
||||
from .widget import Ui_Form
|
||||
|
||||
from PyQt6.QtWidgets import QWidget
|
||||
from PyQt6.QtWidgets import QWidget
|
||||
|
||||
# If the module is called "duck" the class would be called "DuckView"
|
||||
|
||||
|
||||
class ModuleView(ModuleView):
|
||||
"""Template class for a NQRduck module view."""
|
||||
|
||||
def __init__(self, module):
|
||||
"""Initialize the view. This is usually quite similar for all modules."""
|
||||
super().__init__(module)
|
||||
|
||||
widget = QWidget()
|
||||
self._ui_form = Ui_Form()
|
||||
self._ui_form.setupUi(self)
|
||||
self.widget = widget
|
||||
self.widget = widget
|
||||
|
|
Loading…
Reference in a new issue