Skip to content

Commit 6dd2b1d

Browse files
[rocprof-compute] updated formatting workflow and docs
* updated formatting workflow and docs * restored requirements.txt [rocm-systems] ROCm/rocm-systems#348 (commit 2936a46)
1 parent 3cd77e2 commit 6dd2b1d

File tree

4 files changed

+41
-41
lines changed

4 files changed

+41
-41
lines changed

CONTRIBUTING.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,45 @@ Now, when you commit code to the repository you should see something like this:
5252

5353
Please see the [pre-commit documentation](https://pre-commit.com/#quick-start) for additional information.
5454

55+
## Contribution Guidelines
56+
57+
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. This is the manual alternative to running ruff pre-commit hooks.
58+
59+
-----
60+
61+
## Installing and Running Ruff
62+
63+
Ruff is available on PyPI and can be installed using `pip`:
64+
65+
```bash
66+
pip install ruff
67+
```
68+
69+
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:
70+
71+
```bash
72+
ruff check .
73+
ruff format --check .
74+
```
75+
76+
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:
77+
78+
```bash
79+
ruff check --fix .
80+
ruff format .
81+
```
82+
83+
-----
84+
85+
## Disabling Formatting for Specific Sections
86+
87+
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:
88+
89+
* **`# fmt: off`** and **`# fmt: on`**: These comments can be used to disable and re-enable formatting for a block of code.
90+
* **`# fmt: skip`**: This comment, placed at the end of a line, will prevent Ruff from formatting that specific statement.
91+
92+
You can also disable specific linting rules for a line by using `# noqa: <rule_code>`.
93+
5594
## Coding guidelines
5695

5796
Below are some repository specific guidelines which are followed througout the repository.

README.md

Lines changed: 1 addition & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ To build the binary we follow these steps:
7575
NOTE: Since RHEL 8 ships with glibc version 2.28, this standalone binary can only be run on environment with glibc version greater than 2.28.
7676
glibc version can be checked using `ldd --version` command.
7777

78-
NOTE: libnss3.so shared library is required when using --roof-only option which generates roofline data in PDF format
78+
NOTE: libnss3.so shared library is required when using --roof-only option which generates roofline data in PDF format
7979

8080
To test the standalone binary provide the `--call-binary` option to pytest.
8181

@@ -104,42 +104,3 @@ style reference is provided below for convenience:
104104
url = {https://doi.org/10.5281/zenodo.7314631}
105105
}
106106
```
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>`.
1 KB
Loading

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ tabulate
1616
textual
1717
textual_plotext
1818
textual-fspicker
19-
tqdm
19+
tqdm

0 commit comments

Comments
 (0)