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: README.md
+39Lines changed: 39 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -104,3 +104,42 @@ style reference is provided below for convenience:
104
104
url = {https://doi.org/10.5281/zenodo.7314631}
105
105
}
106
106
```
107
+
108
+
### Contribution Guidelines
109
+
110
+
To ensure code quality and consistency, we use **Ruff**, a fast Python linter and formatter. Before submitting a pull request, please ensure your code is formatted and linted correctly.
111
+
112
+
-----
113
+
114
+
### Installing and Running Ruff
115
+
116
+
Ruff is available on PyPI and can be installed using `pip`:
117
+
118
+
```bash
119
+
pip install ruff
120
+
```
121
+
122
+
Once installed, you can run Ruff from the command line. To check for linting errors and formatting issues, navigate to the project root and run:
123
+
124
+
```bash
125
+
ruff check .
126
+
ruff format --check .
127
+
```
128
+
129
+
To automatically fix most of the issues detected, you can use the `--fix` flag with the `check` command and run the `format` command without the `--check` flag:
130
+
131
+
```bash
132
+
ruff check --fix .
133
+
ruff format .
134
+
```
135
+
136
+
-----
137
+
138
+
### Disabling Formatting for Specific Sections
139
+
140
+
There may be instances where you need to disable Ruff's formatting on a specific block of code. You can do this using special comments:
141
+
142
+
***`# fmt: off`** and **`# fmt: on`**: These comments can be used to disable and re-enable formatting for a block of code.
143
+
***`# fmt: skip`**: This comment, placed at the end of a line, will prevent Ruff from formatting that specific statement.
144
+
145
+
You can also disable specific linting rules for a line by using `# noqa: <rule_code>`.
0 commit comments