You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
### License
4
4
5
-
<PROJECTNAME> is licensed under the terms in [LICENSE]<linktolicensefileinrepo>. By contributing to the project, you agree to the license and copyright terms therein and release your contribution under these terms.
5
+
MFD Code Quality is licensed under the terms in [LICENSE](LICENSE.md). By contributing to the project, you agree to the license and copyright terms therein and release your contribution under these terms.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
5
+
6
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
7
+
8
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
> This project is under development. All source code and features on the main branch are for the purpose of testing or evaluation and not production ready.
3
+
4
+
# MFD Code Quality
5
+
6
+
## Usage
7
+
8
+
This module provides set of code quality related methods with corresponding command line commands.
9
+
10
+
### Available commands
11
+
12
+
When installing `mfd-code-quality` package all these commands will become available from command line - in the same way as `pip` for example.\
13
+
So you can just type `mfd-help` in your terminal without a need to call it from Python.
14
+
15
+
16
+
> `mfd-configure-code-standard`\
17
+
> Prepare code standard configuration files into repository and setup pre commit.
18
+
19
+
> `mfd-create-config-files`\
20
+
> Prepare code standard configuration files into repository without setup of pre commit.\
21
+
> Mechanism of creating configs is the same as in 'mfd-configure-code-standard'.
22
+
23
+
> `mfd-code-standard`\
24
+
Run code standard test using ruff (format, check) or flake8. Depending on what is available. It copies configuration files before code standard check and remove their after check.
25
+
> It's not required to call `mfd-configure-code-standard` or `mfd-create-config-files` before running this command.
26
+
27
+
> `mfd-import-testing`\
28
+
Run import testing of each Python file to check import problems.
29
+
30
+
> `mfd-system-tests`\
31
+
Run system tests.
32
+
33
+
> `mfd-unit-tests`\
34
+
Run unittests, print actual coverage, but don't check its value.
35
+
36
+
> `mfd-unit-tests-with-coverage`\
37
+
Run unittests and check if diff coverage (new code coverage) is reaching the threshold.
38
+
39
+
> `mfd-all-checks`\
40
+
Run all available checks.
41
+
42
+
> `mfd-help`\
43
+
Log available commands.
44
+
45
+
> `mfd-format-code`\
46
+
Format code using ruff check --fix and ruff format
47
+
48
+
All commands can be combined with `--project-dir` parameter, which should point to the root directory of your repository.
49
+
If this parameter is not given current working directory will be assumed to be root directory.
50
+
51
+
### Configuration files
52
+
We are using 3 configuration files:
53
+
-`ruff.toml` - for ruff configuration
54
+
-`pyproject.toml` - for project/generic configuration
55
+
-`.pre-commit-config.yaml` - for pre-commit configuration
56
+
57
+
### Custom configuration
58
+
Some modules have custom configuration files. Files are stored in `mfd_code_quality/code_standard/config_per_module` directory. Configuration files are merged with generic one during configuration process.
59
+
60
+
## OS supported:
61
+
62
+
OS agnostic
63
+
64
+
## Issue reporting
65
+
66
+
If you encounter any bugs or have suggestions for improvements, you're welcome to contribute directly or open an issue [here](https://github.com/intel/mfd-code-quality/issues).
0 commit comments